- From: Hedge Hog <
>
- To:
- Subject: [chef] Re: Re: Changing a cookbook's folder-name - how painful?
- Date: Thu, 9 Dec 2010 06:27:48 +1100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=obDZSNe4SXn3LX1c36Ws0gDPz+rEXPFRaBcyuKwH43tJytltgj1ZzNLPmPnwhgYdi5 l8ut5tBZNbHSG8zbfRG3jBJcbvaj675fWm+ePnVjZVuMxzNcrV77f3DWy+t5icX0kmvT rfuaJbhSb+iUbM673OXNse6giHcZt1sEUz8HU=
On Thu, Dec 9, 2010 at 4:13 AM, Daniel DeLeo
<
>
wrote:
>
On Wed, Dec 8, 2010 at 1:33 AM, Hedge Hog
>
<
>
>
wrote:
>
> Hi,
>
> I'm in the process or revisiting my idea to use Bundler to manage
>
> groups of individual cookbooks in to ./chef-repo/cookbooks.
>
> I've made some progress. Hence I have a couple of questions:
>
> - If I change a cookbook's folder name (i.e. under
>
> ./chef-repo/cookbooks), where am I going to have propagate that
>
> change? E.g. cookbooks/apache2 -> cookbooks/apache2-<hash>. So far I
>
> can guess a couple of places, but it would be nice to have a list of
>
> everywhere that change must be made.
>
> - Is there a way or one place to map a cookbook's folder name to some
>
> name that is referenced else where? Some way of abusing Role's
>
> override_attributes or some such thing?
>
> - WRT to Chef environments, will these map to a folder structure under
>
> the cookbooks folder, e.g. cookbooks/prod/apache2-<hash1>,
>
> cookbooks/staging/apache2-<hash2>
>
>
>
> Appreciate any insights.
>
>
This is going to be tough. The cookbook loader uses the directory name
>
as the name of the cookbook, so you'd have to change the run lists of
>
all of the nodes and roles to use `recipe[apache2-123def]`. If you're
>
committed to what you've got so far, you might be able to use a rake
>
task or similar to create symlinks with the hash part removed.
>
I'm struggling to see if or how environments show up 'on-the-disk' in
the chef-repo.
From the feature file I see the HTTP API uses:
./environments/<env>/cookbooks
It seems this does not map to the chef-repo - or at least looking at
what is currently in the environments branch.
There are a lot of feature files and I haven't memorized Chef's
internal workflows, so I'd appreciate any hint about what feature
file(s) to dig into.
Best wishes.
>
Dan DeLeo
>
>
>
>
>
> --
>
> πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
>
> [The fox knows many things, but the hedgehog knows one big thing.]
>
> Archilochus, Greek poet (c. 680 BC – c. 645 BC)
>
> http://wiki.hedgehogshiatus.com
>
>
>
--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://wiki.hedgehogshiatus.com
Archive powered by MHonArc 2.6.16.