On 12/20/2011 05:26 PM, Kenneth Lo wrote:
> So the question is, given the service resource is also within the same
> module with the file, how do I make sure we can do the following
> sequentially?:
>
> 1. Shutdown the tomcat instance (service resource in tomcat module)
> 2. Update the application war file (file resource in tomcat module)
> 3. Start the tomcat instance
I'm pretty sure you cannot do that with a single 'tomcat service' resource.
Moreover, you won't be able to build a mechanism for the semantics of
"if the file needs a change, do this thing first", because puppet can
only notify resources *after* the fact.
Is it strictly necessary to kill tomcat before the war file is touched?
If not, just do a single restart after touching the file.
Otherwise, I'd build it like this:
file { "war-file-in-alternate-location": source => ...,
notify => Exec["deployment-script"]
}
exec { "deployment-script": refreshonly => true, ... }
The "deployment script" is a script you roll via puppet, which will
kill tomcat, copy the newly rolled war file and then start tomcat anew.
Puppet-wise, this is KISSiest way I can think of.
HTH,
Felix
Hi,
On 12/20/2011 05:26 PM, Kenneth Lo wrote:
> So the question is, given the service resource is also within the same
> module with the file, how do I make sure we can do the following
> sequentially?:
>
> 1. Shutdown the tomcat instance (service resource in tomcat module)
> 2. Update the application war file (file resource in tomcat module)
> 3. Start the tomcat instance
Hi:
I have a pretty general high-level question regarding application deployment using puppet infrastructure.
Being new with puppet here we have a pretty simple module setup where we are utilizing a basic package-file-service combo for an tomcat application server, and with some additional war files for our apps.
One of the engineering requirement regarding app deployment is to make sure tomcat shutdown cleanly before we move in with the new app war files.
The way we handle new app release is via file resource that point to different puppet source based on the release tag.
So the question is, given the service resource is also within the same module with the file, how do I make sure we can do the following sequentially?:
1. Shutdown the tomcat instance (service resource in tomcat module)2. Update the application war file (file resource in tomcat module)3. Start the tomcat instance
We've been using mcollective to manually shutdown the service before applying puppet run, but I'm not sure if the sequence is correct. Thanks in advance.
--KLThis message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
“What are the problems this requirement is intended to solve?”
What I was told from my eng team is that tomcat’s hot-deployment for our app will eventually break, so we want to always make sure tomcat is stop before the deployment, and starting up fresh.
We will probably go with Doug’s suggestion earlier and re-package our app and process via rpm directly.
--KL
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1901 / Virus Database: 2109/4698 - Release Date: 12/23/11
Hot-deploy can be risky. The biggest issue I've seen is a low permgen. Hot deploy puts twice the requirement on permgen.
puppi::project::war { "myapp": source => "http://repo.example42.com/deploy/prod/myapp.war", deploy_root => "/store/tomcat/myapp/webapps", report_email => "sysa...@example42.com", }