web app deployment

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

web app deployment

James Sanderson

My first post – please be gentle!

 

We’ve been using jetty for some time (currently 9.4.19), not embedded we start up the server and use xml deployment files to deploy and undeploy our web applications.

 

One puzzling question I have is how can I find out when the deployment or un-deployment has completed and whether it was successful or not; clearly we could ping a status url in the app to see if its alive or not – but this seems a bit on the clunky side.

 

Ideally I would love a command line to deploy / undeploy a war from a running jetty but I cant seem to find how to do that.

 

Any pointers would be appreciated.

 

thanks

James

 



Zellis is the trading name for Zellis Holdings Ltd and its associated companies “Zellis”.

The contents of this email are confidential to Zellis and are solely for the use of the intended recipient. If you received this email in error, please inform the sender immediately and delete the email from your system. Unless Zellis have given you express permission to do so, please do not disclose, distribute or copy the contents of this email.

Unless this email expressly states that it is a contractual offer or acceptance, it is not sent with the intention of creating a legal relationship and does not constitute an offer or acceptance which could give rise to a contract.

Any views expressed in this email are those of the individual sender unless the email specifically states them to be the views of Zellis.

Zellis Holdings Ltd - registered in England and Wales - Company No: 10975623 - Registered Office: Peoplebuilding 2, Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2 4NW, UK.

_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: web app deployment

Chris Walker
James,

Do you have any kind of logging enabled on your server? Even with the basic console-capture module, you can see contexts start and stop.

Using the demo base as an example, I removed the context xml file for our JAAS Test webapp. Console output/log is as follows:

2019-10-22 13:58:48.878:INFO:oejsh.ContextHandler:Scanner-0: Stopped o.e.j.w.WebAppContext@48c76607{JAAS Test,/test-jaas,null,UNAVAILABLE}{PATH\TO\JETTY\jetty-distribution-9.4.22.v20191022\demo-base\webapps/test-jaas.war}

By contrast, replacing the context XML re-deploys the webapp. Console output/log is as follows:

2019-10-22 14:04:08.260:WARN::Scanner-0: test-jaas webapp is deployed. DO NOT USE IN PRODUCTION!
2019-10-22 14:04:08.280:INFO:oejsh.ContextHandler:Scanner-0: Started o.e.j.w.WebAppContext@168b947{JAAS Test,/test-jaas,file:///C:/Users/cleve/AppData/Local/Temp/jetty-0_0_0_0-8080-test-jaas_war-_test-jaas-any-10326669567532780878.dir/webapp/,AVAILABLE}{PATH\TO\JETTY\jetty-distribution-9.4.22.v20191022\demo-base\webapps/test-jaas.war}

If you have logging set up you should easily be able to capture this and do what you want with the info. If there are any errors/warnings you will see them in the log when trying to deploy/remove the context in question.

As for a console command, there isn't one really. Editing the Context XML or the WAR will automatically reload the context and will be accompanied by log information. You can find more about Hot Deployment like this in the documentation.


Best,
Chris

On Tue, Oct 22, 2019 at 9:32 AM James Sanderson <[hidden email]> wrote:

My first post – please be gentle!

 

We’ve been using jetty for some time (currently 9.4.19), not embedded we start up the server and use xml deployment files to deploy and undeploy our web applications.

 

One puzzling question I have is how can I find out when the deployment or un-deployment has completed and whether it was successful or not; clearly we could ping a status url in the app to see if its alive or not – but this seems a bit on the clunky side.

 

Ideally I would love a command line to deploy / undeploy a war from a running jetty but I cant seem to find how to do that.

 

Any pointers would be appreciated.

 

thanks

James

 



Zellis is the trading name for Zellis Holdings Ltd and its associated companies “Zellis”.

The contents of this email are confidential to Zellis and are solely for the use of the intended recipient. If you received this email in error, please inform the sender immediately and delete the email from your system. Unless Zellis have given you express permission to do so, please do not disclose, distribute or copy the contents of this email.

Unless this email expressly states that it is a contractual offer or acceptance, it is not sent with the intention of creating a legal relationship and does not constitute an offer or acceptance which could give rise to a contract.

Any views expressed in this email are those of the individual sender unless the email specifically states them to be the views of Zellis.

Zellis Holdings Ltd - registered in England and Wales - Company No: 10975623 - Registered Office: Peoplebuilding 2, Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2 4NW, UK.
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users

_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: web app deployment

Joakim Erdfelt-8
In reply to this post by James Sanderson
You haven't given us enough detail on how you have your server setup, or even if you are using embedded or jetty-home or the older jetty-distribution.

If you have setup the DeploymentManager and WebAppProvider, then it's just a matter of copying the war into place in your ${jetty.base}/webapps/ to deploy.
And deleting the war to undeploy.

Joakim Erdfelt / [hidden email]


On Tue, Oct 22, 2019 at 8:32 AM James Sanderson <[hidden email]> wrote:

My first post – please be gentle!

 

We’ve been using jetty for some time (currently 9.4.19), not embedded we start up the server and use xml deployment files to deploy and undeploy our web applications.

 

One puzzling question I have is how can I find out when the deployment or un-deployment has completed and whether it was successful or not; clearly we could ping a status url in the app to see if its alive or not – but this seems a bit on the clunky side.

 

Ideally I would love a command line to deploy / undeploy a war from a running jetty but I cant seem to find how to do that.

 

Any pointers would be appreciated.

 

thanks

James

 



Zellis is the trading name for Zellis Holdings Ltd and its associated companies “Zellis”.

The contents of this email are confidential to Zellis and are solely for the use of the intended recipient. If you received this email in error, please inform the sender immediately and delete the email from your system. Unless Zellis have given you express permission to do so, please do not disclose, distribute or copy the contents of this email.

Unless this email expressly states that it is a contractual offer or acceptance, it is not sent with the intention of creating a legal relationship and does not constitute an offer or acceptance which could give rise to a contract.

Any views expressed in this email are those of the individual sender unless the email specifically states them to be the views of Zellis.

Zellis Holdings Ltd - registered in England and Wales - Company No: 10975623 - Registered Office: Peoplebuilding 2, Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2 4NW, UK.
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users

_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: web app deployment

James Sanderson
sorry - yes just running vanilla jar file to start with the DeploymentManager and WebAppProvider.  we have separate jetty home and multiple jetty bases and run them on windows and unix using a separate service / daemon wrapper exe.

We have a managment app that creates copies of a templated war file with configurations embedded within them; the wars get deployed by putting an xml file in the relevent deployment directory. We check the deploy work by calling a page in the deployed war- a simple health check. thats ok and does work. but i now have a requirement to deploy / undeploy without using our management app; ideally from a command line so i can embed in other scripts.

I guess at the end of the day i can use the same technique or expose a rest interface in my management app to do a deployment. 

From: [hidden email] <[hidden email]> on behalf of Joakim Erdfelt <[hidden email]>
Sent: 22 October 2019 19:09
To: JETTY user mailing list <[hidden email]>
Subject: Re: [jetty-users] web app deployment
 

[EXTERNAL TO ZELLIS EMAIL]


You haven't given us enough detail on how you have your server setup, or even if you are using embedded or jetty-home or the older jetty-distribution.

If you have setup the DeploymentManager and WebAppProvider, then it's just a matter of copying the war into place in your ${jetty.base}/webapps/ to deploy.
And deleting the war to undeploy.

Joakim Erdfelt / [hidden email]


On Tue, Oct 22, 2019 at 8:32 AM James Sanderson <[hidden email]> wrote:

My first post – please be gentle!

 

We’ve been using jetty for some time (currently 9.4.19), not embedded we start up the server and use xml deployment files to deploy and undeploy our web applications.

 

One puzzling question I have is how can I find out when the deployment or un-deployment has completed and whether it was successful or not; clearly we could ping a status url in the app to see if its alive or not – but this seems a bit on the clunky side.

 

Ideally I would love a command line to deploy / undeploy a war from a running jetty but I cant seem to find how to do that.

 

Any pointers would be appreciated.

 

thanks

James

 



Zellis is the trading name for Zellis Holdings Ltd and its associated companies “Zellis”.

The contents of this email are confidential to Zellis and are solely for the use of the intended recipient. If you received this email in error, please inform the sender immediately and delete the email from your system. Unless Zellis have given you express permission to do so, please do not disclose, distribute or copy the contents of this email.

Unless this email expressly states that it is a contractual offer or acceptance, it is not sent with the intention of creating a legal relationship and does not constitute an offer or acceptance which could give rise to a contract.

Any views expressed in this email are those of the individual sender unless the email specifically states them to be the views of Zellis.

Zellis Holdings Ltd - registered in England and Wales - Company No: 10975623 - Registered Office: Peoplebuilding 2, Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2 4NW, UK.
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users


Zellis is the trading name for Zellis Holdings Ltd and its associated companies “Zellis”.

The contents of this email are confidential to Zellis and are solely for the use of the intended recipient. If you received this email in error, please inform the sender immediately and delete the email from your system. Unless Zellis have given you express permission to do so, please do not disclose, distribute or copy the contents of this email.

Unless this email expressly states that it is a contractual offer or acceptance, it is not sent with the intention of creating a legal relationship and does not constitute an offer or acceptance which could give rise to a contract.

Any views expressed in this email are those of the individual sender unless the email specifically states them to be the views of Zellis.

Zellis Holdings Ltd - registered in England and Wales - Company No: 10975623 - Registered Office: Peoplebuilding 2, Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2 4NW, UK.

_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users