Deploy our own software using Puppet

automationdeploymentpuppet

(Apologies in advance for the stupidity in this question. I'm normally a programmer, not a sysadmin, but I've taken it upon myself to automate some things, and clean up some other things which are automated but not in the prettiest way. 🙂

I've been looking around at various tools for automation of software deployment to a bunch of servers, like cfengine, Puppet, and Chef. So far, Puppet looks the most appealing, but I've certainly not committed to anything yet.

These tools all look like they can do a great job of keeping a bunch of servers up-to-date with prepackaged software.

What I don't get is: how does one use a tool (like Puppet) to manage deployments of our own internal software? I think I'm at a loss because I've seen a thousand tutorials showing how to keep Apache ensure => latest (which is pretty cool), but nothing that quite corresponds to my use-case today, which is something more like:

  1. when a human being pushes The Button,
  2. pull branch A from the version-control repository B
  3. run command C to compile it
  4. copy the binaries D to servers E1 through E10
  5. on each server, run command F to make all changes take effect

Puppet sounds great, and I totally see the advantage of declarative, idempotent configuration over some shell scripts, but I've not seen any tutorials for "you want to update your shell scripts to Puppet (or Chef, or cfengine) so here's what you should do". Is there such a thing? Is it obvious to other people how to take the things provided in the Puppet docs and replicate the behavior I want? Am I just not getting it?

What it's sounding like to me, so far, is that the human being (#1) would manually package the software (#2 and #3) external to Puppet, manually update the Puppet config, which would trigger Puppet to update the servers … maybe? (I'm a little confused here, as I'm sure you can tell.)

Thanks!

Best Answer

We use puppet, but we don't use it for our application deployments. As you said, you could package your software into debs or rpms, configure your private repository everywhere, and use puppet to control versions, but you're still at the mercy of waiting for the next 30 minute refresh on all your servers.

What I would do (and this is close to what we do, but we use rails so there's no compile step):

  • Use puppet to configure everything on the server except the application itself. Dependencies, web servers, users, paths, etc.
  • Have your automated build server (bamboo, hudson, cruise control, etc.) put the compiled artefacts in a repository manager like Nexus.
  • Use capistrano to push build to your servers.

Chef might have more real-time push capabilities; I'm not very familiar with it.

Related Topic