![]() ![]() ![]() However when developing testing Chef cookbooks, role definitions and node definitions, I prefer the process of provisioning the Vagrant VM to be identical in as many ways as possible to the process of provisioning production and staging VM’s.įor me this means using exactly the same commands (knife solo prepare, knife solo cook etc). ![]() This is very powerful when we’re using vagrant to make it easy for developers to provision environments which closely match production. When vagrant up is run for the first time, the vagrant image will be automatically provisioned. Rather than using our existing node definition files, we can effectively include the data from a node definition file, in our vagrantfile. Vagrant has excellant chef-solo support built in. Why not just use Vagrants built in chef and chef-solo support? Which means establish a connection to 127.0.0.1 on port 2222 using the vagrant generated private key file to authorise the user vagrant. Ssh -p 2222 -i /Users/ben/.vagrant.d/insecure_private_key Make sure Vagrant is available in terminal by typing vagrant and ensuring you get output similar to the following: You’ll also need VirtualBox installed as Vagrant in this scenario acts as a tool for managing VirtualBox instances. Go to and download then install the most recent version of Vagrant (I used 1.3.5). This can be especially useful when you’re testing changes to recipes and want to see how it will interact with your existing production configuration.įor more on this workflow, read on, for a general introduction to the power of Vagrant, start here: Instead it covers a very specific workflow I use for testing Chef Recipes. This section does not cover how to use Vagrant to create these re-usable environments. Vagrant is an extremely powerful tool in itself with a particular strength of making it easy to distribute local testing environments to developers which (almost) perfectly mirror your production configuration. Vagrant makes it easy to manage and distribute virtual machines. Using Vagrant to test Chef Cookbooks HomeĪbout Me Using Vagrant to test Chef Cookbooks ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |