-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Chef Cookbook
By :

Habitat enables you to package your application and your configuration in a way that you can use the same package on your local development machine up to your production servers. All you need to change are some well-defined configuration parameters. Let's see how to install Habitat and use a pre-defined Habitat package.
Make sure that you have a cookbook named my_cookbook
and that the run_list
of your node includes my_cookbook
, as described in the Creating and using cookbooks recipe in Chapter 1, Chef Infrastructure.
Create your Berksfile
in your Chef repository including my_cookbook
:
mma@laptop:~/chef-repo $ subl Berksfile cookbook 'my_cookbook', path: './cookbooks/my_cookbook'
Let's run and configure nginx using Habitat:
Add the dependency on the habitat cookbook to your cookbook's metadata.rb
:
mma@laptop:~/chef-repo $ subl cookbooks/my_cookbook/metadata.rb depends "habitat","~>0.2.0"
Install the dependent cookbooks:
mma@laptop...
Change the font size
Change margin width
Change background colour