-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Opscode Chef provides configuration management to your infrastructure.
Make sure you have all the prerequisites to be productive with this Chef repository.
They are easy to uninstall later.
Download the chef-repo
cd ~
mkdir -p chef/cookbooks
cd chef
git clone git://github.com/jeremiahsnapp/chef-repo.git
Setup Librarian - (Bundler for your Chef Cookbooks)
How This Chef Repo Manages Cookbooks
This chef-repo has a ready-to-use Librarian Cheffile.
cd chef-repo
librarian-chef clean
librarian-chef install
(Optional) Create Encrypted Data Bag Key
Uncomment the chef.encrypted_data_bag_secret_key_path
line in Vagrantfile.
mkdir ~/.chef
openssl rand -base64 512 | tr -d '\r\n' > ~/.chef/chef_data_bag_key
This chef-repo has chef-solo-search cookbook which enables data bag search within a chef-solo run.
This requires the VM to have Chef >= 0.10.4.
Vagrant - (Easily Manages VirtualBox VM's)
This chef-repo has a ready-to-use Vagrantfile. The Vagrantfile will automatically download the appropriate vagrant box when 'vagrant up' is run.
The Vagrantfile is configured to apply the chef-repo/roles/test_chef_solo.rb role run_list which is configured to apply the 'role[web]' which will install and configure many things including:
This will take a while but you should see green colored chef output scroll by in your terminal. If you ever see any red colored output then the chef run had some errors.
vagrant up
Browse to http://127.0.0.1:8080
You should see the vm's web server.
vagrant ssh
If you change any cookbooks make sure librarian pulls the changes into chef-repo/cookbooks.
librarian-chef clean
librarian-chef install
You could have also just run 'librarian-chef install' to only pull changes instead of starting with a clean slate The choice is yours but sometimes it's nice to be sure everything is up to date from a clean slate
vagrant provision
vagrant halt
vagrant destroy