Skip to content

Instantly share code, notes, and snippets.

@Synchro
Created April 29, 2010 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Synchro/383665 to your computer and use it in GitHub Desktop.
Save Synchro/383665 to your computer and use it in GitHub Desktop.
#!/bin/sh
#Provides add-apt-repository
sudo apt-get install -y python-software-properties
#use jtimberman's chef ppa for installation
sudo add-apt-repository ppa:jtimberman/opschef
sudo apt-get update
sudo apt-get upgrade -y
#This step asks for a chef server url to put in /etc/chef/client.rb
sudo apt-get install -y chef
#copy /etc/chef/validation.pem from server to same location on client
#How to script this?
scp user@chefserver.local:/etc/chef/validation.pem /etc/chef/
#If you're using chef-solo, you need to get rid of the chef-client daemon
sudo /etc/init.d/chef-client stop
#or on Lucid:
service chef-client stop
#Stop daemon running on startup
sudo update-rc.d -f chef-client remove
# Verify chef-client works:
sudo chef-client
#or chef-solo:
sudo chef-solo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment