Repository navigation
Jetty
Jetty is used as a web server for the MeTL Lift application. When developing locally it is run embedded, but on the AWS instances it hosts deployed WARs.
- Backup the server (snapshot to an AMI).
- Download the Jetty zip (eg
9.4.6.v20170531from Jetty download page).
Jetty runs from /srv/jetty. This is a symlink to /srv/jetty-distribution-9.x.
-
Unzip the Jetty zip to a parallel directory in
/srvfor the new distribution. Don't update the symlink yet. -
Copy from the old jetty dir to the new one:
-
/appsholds the WAR as well as the release script for downloading new versions from S3 -
/appConfholds the application config -
/webAppsholdscontext.xmlthat directs Jetty to the WAR in/apps -
/etcholds Jetty configuration. Rename the existing/etcdirectory to/etc-originalfirst.
-
-
Create in the new jetty dir:
-
/sslis a symlink to../ssl -
/tmpholds temporary files.
-
-
Change the ownership to
metlwithchmod metl:metl -R * -
Add to the bottom of
start.ini:# ------------- Stackable Custom -----------------------jetty.httpConfig.securePort=443#jetty.secure.port=443--module=console-capture--module=requestlog--module=ssljetty.ssl.port=443#ssl.port=443jetty.sslContext.keyStorePath=ssl/metl.jksjetty.sslContext.keyStorePassword=helpmejetty.sslContext.keyStoreType=JKSjetty.sslContext.keyManagerPassword=helpmejetty.sslContext.trustStorePath=ssl/metl.jksjetty.sslContext.trustStorePassword=helpmejetty.sslContext.trustStoreType=helpme--module=https--module=setuidjetty.setuid.userName=metljetty.setuid.groupName=metl# TLS configuration-Dhttps.protocols="TLSv1,TLSv1.1,TLSv1.2"-Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"-Djdk.tls.ephemeralDHKeySize=2048
Reference: Jetty upgrade notes