CFChefiPuppetEngine Setup
Set up Chef
Creating a Chef workstation
Follow the instructions here to set up a Chef workstation so you can follow along. Mine is a Macbook Pro with RVM, ruby-1.9.2, and Chef installed from rubygems.
Create a new Hosted Chef organization or bring up a fresh open source chef-server instance.
Follow the instructions here to set up a Chef server so you can follow along.
Clone the affs-blog git repo
1 2 |
|
Configure the affs-blog repo to point to the chef-server
Download you knife.rb and validation.pem from Hosted Chef interface, or set up your open-source Chef server accordingly. See the knife configuraiton page here for help with knife
Upload the affs-blog repo contents to your Chef server
1
2
cd affs-blog
rake install
1 2 |
|
Verify your Chef infrastructure
1
2
3
knife node list # should be empty
knife node list # show your client cert
knife cookbook list # should list the contents of the affs-blog/cookbooks directory
Provision three Centos6 machines
The code that powers this article was written against 3 VMWare Fusion Centos 6 base installs with passwordless SSH to root setup. I stuck their IPs in my local /etc/hosts so I could address them as centos6-1
, centos6-2
, and centos6-3
respectively. Bare metal installs should work too.
WARNING: AWS or Rackspace based instances will NOT work when following along, since the code would grab the wrong IP off the network interfaces.
Protip: Since Centos6 comes with SELinux enabled by default, don’t forget to restorecon -R /root after you write your authorized_keys file.