0
votes

I'm very new to Chef and as I learned, to install apache using chef, there are 2 ways:

Method 1) download apache community cookbook at: http://community.opscode.com/cookbooks/apache2 and save the unzip under cookbooks directory

Method 2) in a recipe, default.rb, I can do: package "apache2"

so what is the benefit or differences between these 2 methods? Does method 1 by downloading cookbook will give more control and easy to customize its recipes?

Thanks

1

1 Answers

0
votes

The first method not only installs apache but also helps in managing the process and customize ,for example:

  1. customize your configuration files
  2. customize your server modes and modules
  3. enable or disable your site
  4. restart the apache service when any of the configuration files change
  5. and many other things that you should do from scratch if you take the second option

It also lets you customize the installation process only making some changes to the attributes of the recipe like, the site path, the name.

And also this cookbook validate this process for many others platform like:

amazon, arch, centos, debian, fedora, freebsd, redhat, scientific, ubuntu