[chef] Re: Re: Re: Re: [Chef] Attribute precedence and Persistence issue.


Chronological Thread 
  • From: Mrigesh Priyadarshi < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: [Chef] Attribute precedence and Persistence issue.
  • Date: Sun, 24 Nov 2013 00:57:24 +0530

Hey Julian,

We considered that option but with that we would need to create all sort of permutation and combination with versions of different components in CHEF as roles. And that would restrict the options available to end user as well as create a bottleneck for us.
That why we were considering this option.
Can we reset the persisted data at end of chef-client run??


Warm Regards,

Mrigesh Priyadarshi
Mob:-+91-720-402-2510
             


On Sat, Nov 23, 2013 at 10:48 PM, Julian C. Dunn < " target="_blank"> > wrote:
On Sat, Nov 23, 2013 at 12:15 AM, Mrigesh Priyadarshi
< "> > wrote:

> Our use case is that we have a service portal and we want end users to
> provision their instance with custom configuration. We want to have a
> default configuration in cookbook so, if the user doesnt select any custom
> config for the installs the service portal will not generate any json file.
> And will run the chef-client with default values defined in cookbook but if
> they select any configuration chef-client should include those with the json
> file.
>
> In this scenario, what ever value we pass through the attrib file gets
> persisted as normal type and doesnt get reset in the next run if the json
> file is not passed.

Hi Mrigesh,

You might need to take a different approach then. As I mentioned, you
can think of Chef as being a "desired state" system, so persistence is
designed into it.

It would be better if, through your service portal, the user's
instance were assigned a certain Chef Role that contains all the
attributes pertinent to that role. Then, through the magic of
attribute precedence, those values will be the ones used by the system
instead of the defaults you defined in the cookbook.

http://docs.opscode.com/essentials_cookbook_attribute_files.html

I hope that helps.

- Julian

--
[ Julian C. Dunn < "> >          * Sorry, I'm    ]
[ WWW: http://www.aquezada.com/staff/julian    * only Web 1.0  ]
[ gopher://sdf.org/1/users/keymaker/           * compliant!    ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9       ]




Archive powered by MHonArc 2.6.16.

§