So I spent some time building a “skeleton” repo for for chef-provisioning-fog and called it chef-provisioning-fog-example. Turns out I wasn’t the first person to think of this. Martin Smith had the exact same idea with chef-provisioning-rackspace. I tip my hat to him for coming up with this idea before me and allowing me to steal some of his ideas.
My main goal with this repo is, if you have an OpenStack cloud, and you need to provision a couple machines and have only a couple cookbooks to help bootstrap them this should get you off ground. There are much more advanced things you can do, but this is enough to show you the power that chef-provisioning-fog has.
An example use case is disposable ‘dev’ environments. There are certain work flows that need to build infrastructures from scratch, and leveraging chef-provisioning-fog can help provision the cluster in a repeatable effective manner. There is no reason why you couldn’t use a real chef server, or hosted chef with this also. I picked chef-zero for this example so you don’t have to worry about the overhead of chef server to start off.
Taken from the README the usage is pretty straight forward.
- Copy/download whatever you want in the
cookbooks/directory. (there is an example cookbook already there)
- Edit the .chef/knife.rb for your settings. Including the recipes that you want to run.
chef-client -z demo.rbor if you’ve renamed the file that file name.
- When you’re done, you can use the
chef-client -z destroy.rbto blow everything away.
- Edit/save this for what you want, this should be enough to bootstrap you now :D.