Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

war project assumes removing war will undeploy webapp #97

Open
kgeis opened this issue Feb 25, 2014 · 7 comments
Open

war project assumes removing war will undeploy webapp #97

kgeis opened this issue Feb 25, 2014 · 7 comments

Comments

@kgeis
Copy link
Contributor

kgeis commented Feb 25, 2014

I run Tomcat with autoDeploy set to false because I know that my application leaks memory across deployments and I don't want that in production. Puppi archives off the WAR file and expects that Tomcat will automatically undeploy the application. This doesn't happen, and puppi hangs.

If puppi is moving the WAR and expecting the exploded directory to disappear, I would recommend the following flow instead:

  1. stop service
  2. archive WAR
  3. delete exploded WAR directory
@alvagante
Copy link
Member

You can use the check_deploy parameter to avoid Puppi's check for deploy and removal of a WAR and the predeploy_customcommand and/or postdeploy_customcommand parameters to manually remove the war and manage the service (for which there is also the disable_services parameter)

@kgeis
Copy link
Contributor Author

kgeis commented Feb 25, 2014

Thank you for instructions to work around my problem. I feel like I'd need to override the war type so extensively that I should just write my own type. Do you recommend I take this route?

@alvagante
Copy link
Member

It should not be necessary, but consider that the defines you see in puppi::project::* should be considered as sample deploy procedure, with various parameters that allow customization, but you can write your own deploy sequences (I did this for special cases too).
If you write a new one that can be parametrized and reused, it would be good to have it in the upstream puppi module.

@kennyg
Copy link
Contributor

kennyg commented Apr 19, 2014

I have the same use case. I need to undeploy a war file and the exploded directory. I've resorted to extending the rollback command to remove the files by placing a command in the rollback directory, such as 45-Project-ForceUndeploy. It would be great if we had a puppi undeploy command that would handle this. Consider this a feature request.

@alvagante
Copy link
Member

Do you think that a parameter like "remove_wardir" could make sense?
If empty (default) nothing is done, if present the procedure removes $deploy_root/$remove_wardir after the removal of the war.
Would this work for you @kennyg @kgeis ?

@kgeis
Copy link
Contributor Author

kgeis commented Apr 20, 2014

I think this would work for me.

I had previously switched my Tomcats not to autodeploy. I don't like running Tomcat with autodeploy in production, but I figure that by using Puppi, the tool I'm using to deploy restarts anyway. So I turned it back on to get Puppi to work.

@kennyg, I assume from your username that your first name is Ken[neth] and your last name starts with a G. I'm really amused that there are two of us right here! I've used that handle elsewhere.

@kennyg
Copy link
Contributor

kennyg commented Apr 20, 2014

@example42, yes that would work for me. I have multiple projects using the same deploy root. I use puppi deploy to deploy them. I could you use a puppi undeploy command, to remove unused projects when the war file version changes from say version 1.0 to 1.1.

@kgeis, you assumed right. turns out there are a lot of people that use this handle, and i've run into a few of them on my travels online.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants