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?

1
  • 3
    If you're coming along to this later, all the answers are good, don't just read the one that I chose as the answer. Mar 25, 2012 at 22:28

6 Answers 6

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.

2
  • I +1'd this answer because it gave two solutions. Mar 23, 2012 at 3:45
  • I appreciate the pointers. We have Ruby elsewhere in our stack, so I'll look at Capistrano. Mar 25, 2012 at 22:28
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)

1
  • Thanks. Deployments are to two balanced servers, currently using manual rsync. Mar 23, 2012 at 0:52
4

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

1
  • Thanks for the tip. We're not building packages in this case, but FPM looks interesting, and we may use it for other tasks. Mar 25, 2012 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!

1
  • We're using Jenkins for CI, so this is definitely an interesting option to explore, thanks. Mar 25, 2012 at 22:30
2

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

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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.