10

I'm new to Puppet and while I've been using *nix systems for many years, I've never worked as a sysadmin or in ops.

I'm currently writing Puppet manifests for hosting a set of (PHP/MySQL/MongoDB, code in git) web applications. Clearly Puppet needs to have some knowledge of the actual applications because I'll set up a virtual host for each one, but I'm not sure whether Puppet should be managing things like code deployment and database creation.

Is Puppet an appropriate tool for application deployment? If not, can you recommend a more appropriate tool?

michaeltwofish
  • 209
  • 4
  • 11

6 Answers6

10

I'd look into either Capistrano or Fabric for deployments..

You'll have better control over how the deployment happens with these two tools.

Kenny Rasschaert
  • 9,045
  • 3
  • 42
  • 58
Mike
  • 22,310
  • 7
  • 56
  • 79
9

Puppet is used for deployments in many large organizations, but it's not always perfect. Much of it depends on your deployment methodology. Are you deploying to lots of machines at once? Do you do rolling deployments?

Some organizations use Puppet by building packages of their deployments and then having puppet enforce policy to be at the right version of that package. Because puppet has the concept of environments included, you can use environments to do deployments in stages (dev, test, prod for example).

Other organizations use puppet to orchestrate deployment by either firing off an rsync, git checkout or some recursively file copies using puppet (though that is rather slow).

There are other pretty good tools available for deployment too. I have used Whiskey Disk in the past (a simple ruby tool) and liked it a lot.

(Disclaimer, I work at Puppet Labs)

stahnma
  • 91
  • 3
4

If you want to build a package out of your application, you could look into FPM. Code is on GitHub.

  • Thanks for the tip. We're not building packages in this case, but FPM looks interesting, and we may use it for other tasks. – michaeltwofish Mar 25 '12 at 22:30
4

Puppet is not the appropriate tool for deploying applications in my opinion.

I use Jenkins for building and deploying our code to testing and staging.

Jenkins is originally a continuous integration server, but it is really flexible and modular. There exists lots of plugins for Jenkins that can help you deploy your applications:

For our application, I have configured Jenkins with the Publish over SSH which copies a successfully built WAR-file to the destination server and then executing a script which does the backup and deployment. Hope this helps!

pkhamre
  • 6,120
  • 3
  • 17
  • 27
2

A remote execution + configuration management tool would be good for application deployment. Salt is a good example of this.

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
baijum
  • 121
  • 3
1

Puppet is not really designed for deployment because when there is a large number of files involved you could run into issues. You can look into capistrano for app deployment.

http://rubyforge.org/projects/capistrano/

johnshen64
  • 5,865
  • 24
  • 17