Giter Club home page Giter Club logo

chefdash's Introduction

chefdash

chefdash is a simple dashboard for tracking Chef runs across a cluster. View a demo.

With chefdash you can:

  • Run chef-client on all nodes in a Chef environment simultaneously, or on a single node
  • View output in realtime and quickly see if any nodes failed
  • Automatically bootstrap new nodes

Planned Features

  • Provide an alternative to the Chef Web UI JSON editor
  • Expose knife ssh functionality for arbitrary commands

Install

  1. Clone the source and run the install script (only works on Ubuntu for now)

    Warning: the install script attempts to install nginx 1.4 or higher from the nginx deb repo. If you already have an older version of nginx installed, you'll need to remove it. (1.4 is required for websocket proxying)

    sudo apt-get install git
    git clone <source url> chefdash
    cd chefdash
    sudo ./install.sh

    Note: the install script is idempotent, which means if you want to upgrade to the latest chefdash, you can just git pull and run the script again.

  2. Login as the newly created chefdash user

    sudo -i -u chefdash
  3. Configure access to the Chef server

    If you already have a working knife configuration, just copy your .chef folder into the chefdash home folder (which is /var/lib/chefdash). Otherwise, set up knife according to Opscode's instructions:

    knife configure --initial
  4. Configure SSH

    Make sure the chefdash user has the ability to SSH into the nodes as root without a password:

    ssh-keygen
    cat ~/.ssh/id_rsa.pub # Copy this public key into the /root/.ssh/authorized_keys file on each node

    Worried about passwordless root access? Create a chefdash user on each of your nodes, then put this line in the /etc/sudoers file:

    chefdash ALL=(ALL) NOPASSWD: /usr/bin/chef-client

    This will allow the chefdash user to only execute chef-client as root.

    chefdash doesn't know what user to login as on your nodes. Configure SSH to automatically fill in the correct usernames:

    vim ~/.ssh/config
    # Sample configuration telling SSH to login as  user "ubuntu" on all nodes:
    # Host *
    #   User ubuntu
  5. Finish up

    exit out of the chefdash shell, then restart the chefdash service:

    sudo service chefdash restart

You're all set!

Bootstrap Setup

chefdash can bootstrap new nodes if you set it up correctly.

  1. Install knife

    curl -L https://www.opscode.com/chef/install.sh | sudo bash
  2. Set up knife

    You'll need the Chef validator key from your Chef server. You can find it in /etc/chef-server/.

    sudo cp chef-validator.pem /var/lib/chefdash/.chef/
    sudo vim /var/lib/chefdash/.chef/knife.rb
    # Set values for validation_client_name and validation_key
    # For example:
    # validation_client_name 'chef-validator'
    # validation_key '/var/lib/chefdash/.chef/chef-validator.pem'
  3. Restart chefdash

    sudo service chefdash restart

    You should see a "bootstrap" button on the homepage.

chefdash checks for the existence of knife before enabling the bootstrap button. Don't like it? Just add this line to /etc/chefdash/chefdash.py:

ENABLE_BOOTSTRAP = False

chefdash's People

Contributors

etodd avatar

Watchers

James Cloos avatar hide avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.