0
votes

I have coded two different modules for Puppet one which ensures Tomcat7 is installed and running and another one which deploys a web application into Tomcat webapps folder.

However, if I run puppet as a daemon with these two modules, the application is deployed every time pupped sync with puppetmaster, so I guess I should do the following:

  1. Add tomcat module to the list of manifests to be execute by such node. In this way I will be sure that Tomcat is up and running every 30 minutes.

And then:

A. Invoke a no-daemonize one-time task on puppet agent through the command below using tags to specify I want to run only the deploy application module.

puppet agent --server MYSERVER --no-daemonize --onetime --tags deploy_app

B. Modify my deploy application module somehow, maybe specifying the version of the application in the artifact , to deploy automatically from puppetmaster instead of calling puppet agent.

What is the right approach? What are companies usually doing to run this kind of tasks with Puppet?

I guess that if you deploy from puppetmaster it is difficult to know when was exactly deployed your application, so you are losing control in the deployment process, what I guess is not good.

1
Use packets manager as rpm or deb, to deploy any apps. - mr_tron
If you must deploy through Puppet then, yes, do use packages. Deploying you application software is not Puppet's strongsuit, any way. You may wish to look at MCollective. - Felix Frank
What Open Source deployment tool do you recommend for Linux boxes? - Captain Haddock
That depends on which distributive your Linux boxes are based. - mr_tron

1 Answers

0
votes

That really depends how you've written your manifest for deploying the artifact, but ideally you should be checking within the execution whether you need to update in the first place. You can do it by fetching the artifact to temporary location and running a binary diff on it.