How to install Chef Server 0.10 on Ubuntu 12.4
This is an example of quick installation Chef Server 0.10 on Ubuntu 12.4
Chef Server is an opensource configuration management tool written by OpsCode.
1. Select Ubuntu Machines
We need two ubuntu machines. The first machine will be used for Chef Server host (Server), the second one is for Chef Client host (Client).
2. Both Client and Server preparation
All steps are doing under root permissions, so we need to switch user to root.
sudo -iAt first we need to add OpsCode sources to the apt-get utility.
echo "deb http://apt.opscode.com/ precise-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.listIn second step we need to add OpsCode keys
mkdir -p /etc/apt/trusted.gpg.d
gpg --keyserver keys.gnupg.net --recv-keys 83EF826A
gpg --export [email protected] | sudo tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/nullWe need to update packages list.
apt-get updateAdditionally install keyring utility to keep OpsCode key up to date.
apt-get install opscode-keyringRun upgrade to ensure that your system is up to date
apt-get upgradeInstall Ruby if needed
apt-get install ruby1.8 rubygems2. Only Server preparation
On the server machine we need to install Chef Server packages.
apt-get install chef chef-serverEnter URL like this: http://chef.example-server.com:4000
Enter RabbitMQ password and WebUI admin password.
Create directory for user “ubuntu” (Cloud Version of the Ubuntu) and copy certificates
mkdir -p /home/ubuntu/.chef
cp /etc/chef/validation.pem /etc/chef/webui.pem /home/ubuntu/.chef
chown -R ubuntu:ubuntu /home/ubuntu/.chefSwitch user
su - ubuntuConfigure knife
knife configure -iFill the fields:
Please enter the chef server URL: http://chef.example-server.com:4000
Please enter the location of the existing admin client’s private key: [/etc/chef/webui.pem] .chef/webui.pem
Please enter the location of the validation key: [/etc/chef/validation.pem] .chef/validation.pem
You will get the message “Configuration file written to /home/ubuntu/.chef/knife.rb”
3. Only Client preparation
Install chef-client on Ubuntu machine:
apt-get install chefCopy validation.pem to /etc/chef/validation.pem
Run the client:
chef-client