[chef] Re: Re: Re: A case for 'run once' recipes


Chronological Thread 
  • From: Tim Uckun < >
  • To:
  • Subject: [chef] Re: Re: Re: A case for 'run once' recipes
  • Date: Thu, 24 Sep 2009 12:10:01 +1200
  • 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=NQc5ONuya3nzoFY8yltVTv0O6pa9Q5sKSf76YWPLVIcX0dSEWdDIScGp1kfFH2s4NT 352my4xGQYh8QaJuB6XvefRC7vo9X3QfWj5UJdGoPq0l6oEgMX9P4KI4za5JeUUmREJF 2AtzctOTk/11qaJhGZRUvDRaSvZ5q1jbI/9DU=

>
>        I agree with Caleb, the whole point of chef is to make your recipes
> idempotent. For the run once recipes that I have needed you can have the
> resource touch a file called .alreadydone or something and add a not_if {
> File.exists?('.alreadydone')} to the resource to emulate run once recipes.
> Perhaps you could wrap up this functionality into the resources themselves
> with a little work to have certain resources do this automatcially for you?


Idempotence is the prevailing paradigm amongst tools like chef but
personally I think there is a case for a "migrations" paradigm. IMHO
building and maintaining a server is not that different than building
and maintaining a database.  You start with the initial schema and it
evolves as time goes on.

Once good example of this are the installation of packages. Once a
package is installed there is no need to check every hour whether or
not it's installed is there? What if you want to remove a package (or
a user). You modify the configuration to remove the package and then
for ever after check once an hour to make sure it's not installed.

To me the idea of having server migrations makes a lot of sense.

I wonder what you all think.



Archive powered by MHonArc 2.6.16.

§