You know how to use Chef to manage the software on individual machines and you know how to use knife to bootstrap individual nodes. Chef Provisioning helps you to use the power of Chef to create your whole infrastructure for you.
No matter whether you want to create a cluster of Vagrant boxes, Docker instances, or Cloud servers, Chef Provisioning lets you define your infrastructure in a simple recipe and run it idempotently.
Let's see how to create a Vagrant machine using a Chef recipe.
Make sure that you have your
web_server roles ready to create an nginx site, as described in Creating nginx virtual hosts section in chapter 6, Users and Applications.