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
- Provide an alternative to the Chef Web UI JSON editor
- Expose knife ssh functionality for arbitrary commands
-
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. -
Login as the newly created
chefdash
usersudo -i -u chefdash
-
Configure access to the Chef server
If you already have a working knife configuration, just copy your
.chef
folder into thechefdash
home folder (which is/var/lib/chefdash
). Otherwise, set up knife according to Opscode's instructions:knife configure --initial
-
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
-
Finish up
exit
out of the chefdash shell, then restart the chefdash service:sudo service chefdash restart
You're all set!
chefdash can bootstrap new nodes if you set it up correctly.
-
Install knife
curl -L https://www.opscode.com/chef/install.sh | sudo bash
-
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'
-
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