[chef] Re: Nexus for Deployment


Chronological Thread 
  • From: Peter Norton < >
  • To:
  • Subject: [chef] Re: Nexus for Deployment
  • Date: Fri, 7 Dec 2012 10:59:41 -0500

If you're using a chef server, it will contain the recipes so you do not want or need the maven/nexus artifact unless you're going to use it to further automate something like environment creating/updating.

If you're using chef-solo, you can use the infrastructure zip since you need to copy your cookbooks to your target system and this is a fine way to do it.

There are a lot of details left to be done in either of the above cases, like how to ensure, with chef server, that you're using the version(s) of cookbooks that you intend to.

Once most of the code design is complete, the recipe shouldn't have to change to support newer versions.  E.g. once you know what your conf file will look like you should be able to deploy your app, make config changes via node attributes or role attributes, etc. without having to change the recipes, while you fix bugs and add features.  Once you hit this point of relative stability (and it'll happen pretty early on - you should only *have* to change a cookbook once in a great while, compared to app code changes) you really won't want to maintain the cookbook together with the code.  This is because after that point you will not know what has changed in the cookbook, you'll just be releasing cookbooks that have version number bumps but no code changes so the constant versioning will make it harder to understand when a change has actually been made to your infrastructure.

-Peter


On Fri, Dec 7, 2012 at 10:39 AM, Nayan Hajratwala < " target="_blank"> > wrote:
Chef Newbie here ... please be gentle.

The team I'm working with is planning to use Chef for deployment, but our approach seems to have some issues and I think it might be partly a conceptual misunderstanding.

The project is Java with artifacts being created by Maven and deployed into Nexus. Each deployed artifact is uniquely identified by an SCM revision number (101 in the example below). No SNAPSHOT builds.

My current thinking is that we create a new Maven module in our existing project that contains all the needed Chef recipes. This way, the correct infrastructure configuration will always be tied to the correct code.

The Maven artifacts would be deployed by our build server to Nexus such as:
  * web-client-1.5.101.war      <-- for web server
  * batch-client-1.5.101.jar    <-- for batch server
  * infrastructure-1.5.101.zip  <-- chef recipes

Now here's where I get confused.

  * Should an external Chef process (chef server?) be responsible for picking up a specific version of infrastructure.zip and running the recipes in it on the target machines?
  * Should the recipes be stored apart from the code? But if so, how does it hang together with the deployable artifacts?
  * Am i just thinking of this all wrong?

Thanks!

---
Nayan Hajratwala - 734.658.6032 - http://agileshrugged.com - @nhajratw





Archive powered by MHonArc 2.6.16.

§