0

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.

4

1 回答 1

0

这实际上取决于您如何编写清单以部署工件,但理想情况下,您应该首先在执行中检查是否需要更新。您可以通过将工件获取到临时位置并在其上运行二进制差异来实现。

于 2014-11-21T11:54:51.133 回答