Creating a Tomcat tarball
CollectionSpace distributes an Apache Tomcat tarball that contains a version of Tomcat suitable for running the application, with some recommended configuration settings applied.
A new version of the tarball is created for every release of CollectionSpace. The version of Tomcat to use is largely determined by Nuxeo (e.g. 8.5.x for Nuxeo LTS 2017, used in CollectionSpace 8.x).
CollectionSpace Tomcat tarballs reside in S3, at s3://cs-public-shared-files/releases/{release}/cspace-server-{release}.tar.gz (or https://cs-public-shared-files.s3.us-west-2.amazonaws.com/releases/{release}/cspace-server-{release}.tar.gz), where {release} is the CollectionSpace release number.
To create the tarball:
If the desired Tomcat version is the same as the version used in the previous release of CollectionSpace, the previous release tarball can simply be copied and renamed, following the naming convention above.
Otherwise, to create a tarball from the desired version of Tomcat:
Download the core tar.gz binary distribution of the desired version of Tomcat.
Extract the tar.gz.
In the
apache-tomcat-{version}
directory:Create the
nuxeo-server/plugins
directory (this should be empty, it just needs to exist).Edit conf/server.xml:
Replace references to port 8080 with 8180
Locate the element:
<Valve className="org.apache.catalina.valves.AccessLogValve" ... />
and change the value of the
pattern
attribute to:%h %l %{org.collectionspace.authentication.user}r %t "%r" %s %b
Add the following valve element:
<!-- Replace the apparent client remote IP address and hostname for the request with the IP address list presented by a proxy/load balancer. This is important for getting CORS checks right. --> <Valve className="org.apache.catalina.valves.RemoteIpValve" internalProxies=".*" />
Add
bin/setenv.sh
, with the contents:Run
chmod 750 bin/setenv.sh
Package the
apache-tomcat-{version}
directory into a tarball. On Mac, the command is:where
{release}
is the CSpace release, and{version}
is the Tomcat version. Note that the--no-xattrs
and--no-mac-metadata
flags are needed on Mac only, to prevent Mac metadata from polluting the tarball.Use the AWS CLI or web console to upload the tarball.
Â