The Apache Tomcat 7 and Apache Tomcat 8 components of Red Hat JBoss Web Server 3 are available as containerized xPaaS images that are designed for use with OpenShift. Developers can use these images to quickly build, scale, and test Java web applications deployed across hybrid environments.
|There are significant differences in the functionality between the JBoss Web Server xPaaS images and the regular release of JBoss Web Server.|
This topic details the differences between the JBoss Web Server xPaaS images and the regular release of JBoss Web Server, and provides instructions specific to running and configuring the JBoss Web Server xPaaS images. Documentation for other JBoss Web Server functionality not specific to the JBoss Web Server xPaaS images can be found in the JBoss Web Server documentation on the Red Hat Customer Portal.
The location of
JWS_HOME/tomcat<version>/ inside a JBoss Web Server xPaaS image is: /opt/webserver/.
Functionality Differences in the OpenShift JBoss Web Server xPaaS Images
A major functionality difference compared to the regular release of JBoss Web Server is that there is no Apache HTTP Server in the OpenShift JBoss Web Server xPaaS images. All load balancing in OpenShift is handled by the OpenShift router, so there is no need for a load-balancing Apache HTTP Server with mod_cluster or mod_jk connectors.
Installing the JBoss Web Server xPaaS Image Streams and Application Templates
Using the JBoss Web Server xPaaS Image Source-to-Image (S2I) Process
To run and configure the OpenShift JBoss Web Server xPaaS images, use the OpenShift S2I process with the application template parameters and environment variables.
The S2I process for the JBoss Web Server xPaaS images works as follows:
If there is a pom.xml file in the source repository, a Maven build is triggered with the contents of
By default the
packagegoal is used with the
openshiftprofile, including the system properties for skipping tests (
-DskipTests) and enabling the Red Hat GA repository (
The results of a successful Maven build are copied to /opt/webserver/webapps. This includes all WAR files from the source repository directory specified by the
$ARTIFACT_DIRenvironment variable. The default value of
$ARTIFACT_DIRis the target directory.
All WAR files from the deployment source repository directory are copied to /opt/webserver/webapps.
All files in the configuration source repository directory are copied to /opt/webserver/conf.
If you want to use custom Tomcat configuration files, the file names should be the same as for a normal Tomcat installation. For example, context.xml and server.xml.
In addition to viewing the OpenShift logs, you can troubleshoot a running JBoss Web Server container by viewing the logs that are outputted to the container’s console:
$ oc logs -f <pod_name> <container_name>
Additionally, access logs are written to /opt/webserver/logs/.