[chef] Re: Re: Re: Re: First-run Resources


Chronological Thread 
  • From: Niek Bartholomeus < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: First-run Resources
  • Date: Thu, 16 Jan 2014 14:43:23 +0100

Hi Tensibai,

Sure that's a possibility. In my specific case however I have no access to the source code, I just have a war file to deploy. But even if I had I would probably still favor a chef-only solution for this, keeping my app CM tool agnostic. 

So does anyone know how to programmatically grant permission to one node to create or modify a different node's attributes?

Thanks,

Niek.


On Wed, Jan 15, 2014 at 3:24 PM, Tensibai < " target="_blank"> > wrote:

Le 2014-01-15 13:08, Niek Bartholomeus a écrit :

Hi Jeppe,

Thanks for your suggestion, that’s indeed a good alternative. 

However, in case the first-run script is more complex I may not always know
what state to probe for to find out whether the script has fully completed.
Let’s say it failed while creating the last table of the table structure. I
would have to know the name of this last table (and check for its existence) to
be sure it has finished successfully. For that reason I thought using an
attribute to flag the successfulcompletion of the script would make this more
explicit and less brittle.

Thanks,

Niek.

Maybe a silly idea but whatever: 

Why not create an "installed" table at the successfull completion time, well, use a specific entry in your DB as your flag attribute ...

Or more complex have a table referencing each table you need with the actual version, each create table/alter table should after update it's entry in this table so you may check each table structure is up-to-date and if not try a failback on this table.

Tensibai

 




Archive powered by MHonArc 2.6.16.

§