Bridge
Overview
The Bridge is a component that helps integrate DirX Access Server according to the DirX Access Blueprint where the DirX Access WebApplications container used to take its place.
The Bridge takes advantage of the third party ProxyServlet.Transparent which is wrapped in a web application and is able to forward the load to a specific port. This results in the fact that several such web applications hosted on a standard Jetty web server are needed to fully replace the former DirX Access WebApplication container. The Bridge is also intended to forward the load to single DirX Access server instance. There is no intention for load balancing or failover.
Architecture
Figure 1 shows the relationships between the Bridge and its nearest components. Namely, following features:
-
If DXA Bridge component shall be in place, each DXA Server requires its own deployed DXA Bridge (as its routing is dependent on the ports, not on the server address).
-
Even if they proxy the communication to the same cluster of DXA Servers, the DXA Bridges don’t need to be configured the same - rather, their configuration is dependent on the configuration of the port assignments of corresponding DXA Servers.
-
There is a one-to-one mapping between open ports at the DXA Server (that shall be accessible by the Load balancer) and open ports at corresponding DXA Bridge.
Prerequisite
Since the Bridge only forwards the load, we need to have intended targets (exposed ports on the DirX Access Server) already configured. Please follow the Port Assignments document for more information.
Installation
Installation of DirX Access creates a template folder for DXA Bridge in
{installation_directory}/Services/templates/bridge.
To install new Bridge, following actions have to be performed:
-
Copy and rename the
{installation_directory}/Services/templates/bridgefolder into the desired place of the new Bridge instance. (Furthermore, we will reference the desired place as{bridge_installation_directory}). It is recommended to keep the{bridge_installation_directory}/jetty-home-VERSIONand{bridge_installation_directory}/jetty-basefolders strictly separated and the{bridge_installation_directory}/jetty-home-VERSIONfolder as read-only for easy future upgrade. -
The
{bridge_installation_directory}/jetty-basefolder contains one plain and two SSL inbound connectors/ports preconfigured but commented out. It is necessary to enable as many inbound connectors as there are exposed ports on the DirX Access Server. The meaning of the listed properties and variables is explained in the Configuration.-
Plain port enablement
-
In the
{bridge_installation_directory}/jetty-base/etc/jetty-httpd.xmlfile, uncomment the<Call name="addConnector">section withid="httpConnector". -
In the
{bridge_installation_directory}/jetty-base/start.d/httpd.inifile, uncomment and fill in the${httpConnectorPort}and${httpConnectorName}variables.
-
-
SSL port enablement
-
In the
{bridge_installation_directory}/jetty-base/etc/jetty-ssl.xmlfile, uncomment the<Call name="addConnector">section withid="sslConnector". -
In the
{bridge_installation_directory}/jetty-base/start.d/ssl.inifile, uncomment and fill in the${sslConnectorPort}and${sslConnectorName}variables. -
Please notice the referenced
id="sslContextFactory".
-
-
Second SSL port enablement
-
In the
{bridge_installation_directory}/jetty-base/etc/jetty-ssl.xmlfile, uncomment the<Call name="addConnector">section withid="sslConnector2". -
In the
{bridge_installation_directory}/jetty-base/start.d/ssl.inifile, uncomment and fill in the${sslConnector2Port}and${sslConnector2Name}variables.
-
-
In case more inbound ports are needed
-
In the respective
xmlfile, copy the<Call name="addConnector">section and select differentid,nameandportproperties of the connector. -
In the respective
inifile, use the properties from the previous point to place port and name of the new connector.
-
-
-
The
{bridge_installation_directory}/jetty-basefolder does not contain any outbound connection (any ProxyServlet.Transparent web application) to the exposed port of the DirX Access Server. The outbound connections have to be created and assigned to the inbound connectors via Virtual Hosts.-
Semi-automatic configuration
-
The Direct Application of System Actions and Configuration or SysActions RESTful Web Service is able to create the web applications and web application contexts of for all outbound connections based on the already configured ports on the DirX Access Server.
-
Apply the dxaDeployBridge system action template.
-
Fill in the template and place it to the
{installation_folder}/Services/instances/{instance}/startup/sysactions/folder. -
Restart the DirX Access Server.
-
After successful application, the template should be moved to the
{installation_folder}/Services/instances/{instance}/startup/sysactions/used/folder. -
The resulting archive should be found in the specified target in the template.
-
-
Check the archive. The archive should contain web application context files (
{webappname}-webapp.xmlfiles injetty-base/etc/applicationfolder) and web applications ({webappname}.warfiles injetty-base/webappsfolder)-
Check that each web application context file contains exactly one reference to the inbound connector name (
virtualHostsparameter).
-
-
Unzip the content to the
{bridge_installation_directory}/jetty-basefolder.
-
-
Manual configuration
-
Installation of DirX Access creates a template of the
dirx.access.bridge.webweb application in{installation_folder}/Services/templates/webapps/bridge. -
Fill in the mandatory parameter
proxyToin theWEB-INF\web.xmlfile. -
For each exposed port on the DirX Access Server, insert the web application into the
{bridge_installation_directory}/jetty-base/webappsfolder aswarfile. -
For each web application, create the web application context file (
{webappname}-webapp.xml) in the{bridge_installation_directory}/jetty-base/etc/applicationsfolder.-
The example shows the web application context of the web application of the connection to the
https://my-server1.my-company.exampleaddress and the11115port of the DirX Access Server.<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="contextPath">/</Set> <Set name="war">webapps\connectorTo11115.war</Set> <Set name="virtualHosts"> <Array type="java.lang.String"> <Item>@connectorTo11115</Item> </Array> </Set> </Configure> -
Please mind the
virtualHostsconfiguration. Each web application should have one virtualHost and the virtualHost in this case refers to the connector with theconnectorTo11115name.
-
-
-
-
The Bridge needs the latest version of JAVA11 to run. Install it and set it to
JAVA_HOMEandPATHenvironment variable.
Configuration
The section describes the meaning of the already listed variables.
Variable |
Location in |
Default |
Description |
${httpConnectorPort} |
etc/http.ini |
|
The value of the port
on which the plain connector with |
${httpConnectorName} |
etc/http.ini |
|
The name
value of the plain connector with |
${sslConnectorPort} |
etc/ssl.ini |
|
The value of the port on
which the SSL connector with |
${sslConnectorName} |
etc/ssl.ini |
|
The name
value of the SSL connector with |
${sslContextFactoryKeyStorePath} |
etc/ssl.ini |
|
The KeyStore file path (relative to
|
${sslContextFactoryTrustStorePath} |
etc/ssl.ini |
|
The TrustStore
file path (relative to
|
${sslContextFactoryKeyStorePassword} |
etc/ssl.ini |
The KeyStore password. |
${sslContextFactoryTrustStorePassword} |
|
etc/ssl.ini |
The TrustStore password. |
|
proxyTo |
webapps/{connTo}.war/WEB-INF/web.xml |
|
The address including the port where to forward the load. |
jetty.deploy.monitoredDir |
etc/deploy.ini |
|
Monitored directory name (relative to
|
virtualHosts |
etc/applications/{connTo}-webapp.xml |
The name of the connector to be assigned to the web application to which the webapplication context belongs. |
The descriptions of the optional parameters can be found:
Running a Bridge from the Command Line
The Bridge can be started from the command line in the same way as a standard Jetty web server Jetty 11 Operations Guide – Getting Started
Start the Bridge by running the following command:
{bridge_installation_directory}\jetty-base> java -jar ..\jetty-home-11.0.13\start.jar
Bridge as a Windows Service
The Bridge can be run as a Windows Service. There is the possibility to use the prunsrv tool to create the Windows Service.
Install the Windows service by executing the command:
{bridge_installation_directory}\jetty-base\bin>serviceInstall.bat %SERVICE_NAME% %DISPLAY_NAME% %JETTY_HOME% %JETTY_BASE% %JAVA_HOME% %STOP_PORT%
, where:
-
%SERVICE_NAME%is the windows service identifier, -
%DISPLAY_NAME%is the windows service display name, -
%JETTY_HOME%is the absolute path tojetty-home-VERSION, -
%JETTY_BASE%is the absolute path tojetty-base, -
%JAVA_HOME%is the absolute path to preinstalled JAVA11, -
%STOP_PORT%is the stopping port of the Jetty Web Server
E.g.,
{bridge_installation_directory}\jetty-base\bin\serviceInstall.bat DirXAccessBridgeMy-Company "DirX Access Bridge My-Company" "{bridge_installation_directory}\jetty-home-11.0.13" "{bridge_installation_directory}\jetty-base" "%ProgramFiles%\Java\jdk-11.0.16.1" 11981
JAVA Runtime Library Update
The Java runtime library can be updated without reinstalling the Windows Service.
The prunsrv tool must be used directly to this purpose:
{bridge_installation_directory}\jetty-base\bin>prunsrv.exe //US//%SERVICE_NAME% --JavaHome="%JETTY_HOME%"
, where:
-
%SERVICE_NAME%is the windows service identifier, -
%JAVA_HOME%is the absolute path to the new preinstalled JAVA11
E.g.,
{bridge_installation_directory}\jetty-base\bin\prunsrv.exe //US//DirXAccessBridgeMy-Company --JavaHome="%ProgramFiles%\Java\jdk-11"