[chef] Re: Re: application deployments


Chronological Thread 
  • From: Jay Perry < >
  • To:
  • Subject: [chef] Re: Re: application deployments
  • Date: Thu, 12 Jul 2012 22:00:03 -0400

Hi Andrea,

I think I will stick with using my own cookbooks for now but would like to have something like the application cookbook that we can use for all our application deploys which will be rpms.  Basically I want to avoid of repeating the same code for each application.

Thanks for the reassurance that putting the version info in a role is an acceptable solution and not a bad practice.

Thanks,
Jay

On Thu, Jul 12, 2012 at 3:12 PM, Andrea Campi < " target="_blank"> > wrote:
On Thu, Jul 12, 2012 at 6:13 PM, JayP < "> > wrote:
> Hi,
>
> We just started using chef for our application deployments which are rpms so at
> the moment we are using the package resource to handle this installation.  I
> was directed to the application cookbook
> (https://github.com/opscode-cookbooks/application) but it seems this cookbook
> doesn't support rpm's and also requires the application to be pulled from a
> repository.  Are there plans to update the application cookbook to support rpms
> or any other suggestions?

I've thought about that while working on that cookbook, and while I
get the reasoning about this, I'm still kind of conflicted.

On the one hand, if you simply need to install rpms, manage some files
with templates and start/restart a service, you won't get much out of
the application cookbook. You can do all that with your own recipes,
without having to learn a whole new set of conventions.
For example, the application cookbook keeps the last few checkouts,
and creates a symlink to the "current" version, and tries to do that
in a reliable way.
How would you map that to installation via RPMs?

On the other hand, it would be nice to use the same DSL regardless of
where the app comes from.
In my case, I can see myself using git in staging and pre-build
archives (coming from Jenkins) in production.
In other words, once you've gone past the learning curve with the
application cookbook, you'll want to manage everything in the same
way.

> In addition I wanted to get some suggestions on how best to manage the version
> number of the application rpm being deployed into qa/staging/production.  Since
> we have a separate continuous integration pipeline for our infrastructure code
> (cookbooks) and the rev'ing of the cookbook in the production.json file is
> automated through our CI system I would rather not store the application rpm
> version in the environment files.  I was thinking of storing this in the
> application role and namespace it like so ['app']['version']['production'] =
> "1.0".  Any thoughts around this or suggested approaches?

I think this is very appropriate, that's pretty much what I do.

Andrea




Archive powered by MHonArc 2.6.16.

§