[chef] Re: How do you extend / customize an existing cookbook?


Chronological Thread 
  • From: Sachin Sagar Rai < >
  • To:
  • Subject: [chef] Re: How do you extend / customize an existing cookbook?
  • Date: Sat, 11 Aug 2012 16:50:55 +0545

Ohia!

This is the similar question that I've been try to fix for a while, but still couldn't figured out the right way to do.

Not the same cookbook, but I've also posted the similar one at this thread. http://lists.opscode.com/sympa/arc/chef/2012-08/msg00130.html

+1 to this question.

Love to hear from the chef mentors!!

-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow

On Thursday, August 2, 2012 at 10:42 AM, John Wong wrote:

Hey guys,

The wiki was very vague about how to do it.
Right now I have my custom configuration files. The Nginx cookbook defines the templates for these configuration files, so by default they are installed.

1. Do I just put my nginx.conf inside files/ directory?
2, Do I edit the template files directly when I need to? Does this prevent me from getting update from the community? I suppose I will merge the changes?

3. I need the directory  /etc/nginx/sites-enabled contains my custom conf file. How do I tell the cookbook or chef to use files/custom.conf?  Where do I put it?

4. I am so new to chef cookbook. I only knew how to I specify default_attributes or override_attributes in my role files.

5. If I add new template or definitions, or new files, doesn't it mean I am writing my cookbook, rather than using the community's one?

I am so unclear how to do these things. Please guide me. Thanks.

John




Archive powered by MHonArc 2.6.16.

§