What to do if community cookbooks not suitable. What are my options?

Now I have the following paths:

  1. Write you full
  2. Write you full based on non suitable community cookbook
  3. Using chef-edit

May be are any other ways that I do not know yet?

Thank you.


Best regards,

CVision Lab System Administrator
Vladmir Skubriev

First I evaluate whether using the community cookbook is close enough to
save me effort. If so, I fork the cookbook, make my edits and contribute a
patch back to the maintainer. If the maintainer is no longer active, I
maintain my fork. If the cookbook is completely off, I'll start from
scratch and write my own cookbook.

On Tue, May 7, 2013 at 6:57 AM, Vladimir Skubriev
skubriev@cvisionlab.comwrote:

Now I have the following paths:

  1. Write you full
  2. Write you full based on non suitable community cookbook
  3. Using chef-edit

May be are any other ways that I do not know yet?

Thank you.

--
Best regards,

CVision Lab System Administrator
Vladmir Skubriev

Or option 4 - change your requirements so that the community cookbook fits.

The main reason for considering this is that cookbooks don’t stand alone, but rather depend on each other. If you throw out one community cookbook, that may later prevent you from using a dozen other community cookbooks, too.

Especially if the cookbook in question is a very basic one, say the apache cookbook, creating your own will mean that you’ll have to recreate quite a few other cookbooks.

There also is option 5. If the original cookbook does part of what you need, you may be able to create a wrapper cookbook that calls the community cookbook and then adds your specific features.

-----Original Message-----
From: Vladimir Skubriev [mailto:skubriev@cvisionlab.com]
Sent: Tuesday, May 7, 2013 6:58 AM
To: chef@lists.opscode.com
Subject: [chef] What to do if community cookbooks not suitable. What are my options?

Now I have the following paths:

  1. Write you full
  2. Write you full based on non suitable community cookbook 3. Using chef-edit

May be are any other ways that I do not know yet?

Thank you.


Best regards,

CVision Lab System Administrator
Vladmir Skubriev

If its just that you need to change attributes or perhaps some templates to
suite your needs then fork the cookbook and rewrite it in your local repo.

I prefer to write my own cookbooks in full since most are yum packages with
alot of special configuration needs.

Thats how I do it atleast =)

Jens Skott
Tel: +46-8-5142 4396
Schibsted Centralen IT

On Tue, May 7, 2013 at 3:57 PM, Vladimir Skubriev
skubriev@cvisionlab.comwrote:

Now I have the following paths:

  1. Write you full
  2. Write you full based on non suitable community cookbook
  3. Using chef-edit

May be are any other ways that I do not know yet?

Thank you.

--
Best regards,

CVision Lab System Administrator
Vladmir Skubriev

If that's all you're doing, make a wrapper recipe that does node.set on the
attributes you need to set yourself and then call include_recipe
"thatcookbook::recipe"

If the values are not configurable, make a PR on the cookbook making those
values configurable and then do the above.

Maintaining your own fork just to set configs is a large amount of overhead
for something you need not do at all.

On Tue, May 7, 2013 at 11:16 AM, Jens Skott jens.skott@schibsted.se wrote:

If its just that you need to change attributes or perhaps some templates
to suite your needs then fork the cookbook and rewrite it in your local
repo.

I prefer to write my own cookbooks in full since most are yum packages
with alot of special configuration needs.

Thats how I do it atleast =)

Jens Skott
Tel: +46-8-5142 4396
Schibsted Centralen IT

On Tue, May 7, 2013 at 3:57 PM, Vladimir Skubriev <skubriev@cvisionlab.com

wrote:

Now I have the following paths:

  1. Write you full
  2. Write you full based on non suitable community cookbook
  3. Using chef-edit

May be are any other ways that I do not know yet?

Thank you.

--
Best regards,

CVision Lab System Administrator
Vladmir Skubriev

On 07.05.2013 21:52, Kevin Keane Subscription wrote:

Or option 4 - change your requirements so that the community cookbook fits.

The main reason for considering this is that cookbooks don't stand alone, but rather depend on each other. If you throw out one community cookbook, that may later prevent you from using a dozen other community cookbooks, too.

Especially if the cookbook in question is a very basic one, say the apache cookbook, creating your own will mean that you'll have to recreate quite a few other cookbooks.

There also is option 5. If the original cookbook does part of what you need, you may be able to create a wrapper cookbook that calls the community cookbook and then adds your specific features.

-----Original Message-----
From: Vladimir Skubriev [mailto:skubriev@cvisionlab.com]
Sent: Tuesday, May 7, 2013 6:58 AM
To: chef@lists.opscode.com
Subject: [chef] What to do if community cookbooks not suitable. What are my options?

Now I have the following paths:

  1. Write you full
  2. Write you full based on non suitable community cookbook 3. Using chef-edit

May be are any other ways that I do not know yet?

Thank you.

--
Best regards,

CVision Lab System Administrator
Vladmir Skubriev

Wrapper cookbook are created with chef-edit (chef-rewind) or there are
other ways ?

--
Best regards,

CVision Lab System Administrator
Vladmir Skubriev

A wrapper cookbook is really just a regular cookbook; you create it the same way as any other. The recipes in the cookbook simply do whatever you need, and then call the corresponding recipe in the community cookbook with include_recipe.

-----Original message-----
From:Vladimir Skubriev skubriev@cvisionlab.com
Sent:Tue 05-07-2013 10:08 pm
Subject:[chef] Re: RE: What to do if community cookbooks not suitable. What are my options?
To:chef@lists.opscode.com;

Wrapper cookbook are created with chef-edit (chef-rewind) or there are
other ways ?


Best regards,

CVision Lab System Administrator
Vladmir Skubriev