Installing the CMRF on a separate JBoss server (standalone mode)
Introduction
ConSol CM and CMRF run on different JBoss application servers. This setup is recommended for production environments.
Installing JBoss
This installation has been performed and tested with the following software versions. With other systems or versions, the setup might be slightly different.
JBoss version:
- Red Hat JBoss Enterprise Application Platform 7.3
ConSol CM version:
- 6.13.0
Operating systems:
- Windows, Linux
In the following <JBOSS_CMRF_HOME> refers to the installation directory of the JBoss application server which is used for CMRF.
Windows
- Extract the downloaded JBoss archive into a new folder.
- Edit the file <JBOSS_CMRF_HOME>\bin\standalone.conf.bat (also see standalone.conf.bat):
Change the Java memory options if needed:
set "JAVA_OPTS=-Xms4g -Xmx4g -XX:MaxMetaspaceSize=512m -Djava.net.preferIPv4Stack=true"
- Add the Java path (the path and Java version can be different on your system):
set "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144"
Alternatively you can add JAVA_HOME to your operating system environment variables. In this case it is not necessary to set the line above. Refer to the Java documentation on how to do this.
In case you want to set up a separate JBoss server on the same system where the JBoss with ConSol CM is running, add a port offset:
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.socket.binding.port-offset=100"
Linux
- Extract the downloaded JBoss archive into a new folder.
- Edit the file <JBOSS_HOME>/bin/standalone.conf (also see standalone.conf):
On most Linux Systems the JAVA_HOME environment variable should already be set. If you wish to use the system standard Java version you do not need to specify the JAVA_HOME environment variable.
If in your case the variables are not set or you wish to specify a path to a specific Java installation add the following line (the path and Java version can be different on your system):
JAVA_HOME="/opt/java/64/jdk1.8.0_144"
You can use echo $JAVA_HOME to check if the variable is set correctly.
Adjust the JVM memory options, the -Xmx value should be at least 4G. If you want to set the options only when no JAVA_OPTS have been set yet, then use the following statement:
## Specify options to pass to the Java VM.#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms4g -Xmx4g -XX:MaxMetaspaceSize=512m -Djava.net.preferIPv4Stack=true"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
else
echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
fi
If you want to overwrite existing JAVA_OPTS, do not put the JAVA_OPS= statements into the if clause
If the JBOSS_HOME environment variable is already set to a path other than your server path, add the following line at the top of <JBOSS_CMRF_HOME>/bin/standalone.conf. Remember that <JBOSS_CMRF_HOME> is the path to your JBoss installation.
JBOSS_HOME=<JBOSS_CMRF_HOME>
-
Change owner to a non-admin Linux user (example: hotline) and make the files executable:
- chown -R hotline <JBOSS_CMRF_HOME>/bin
- chmod 755 -R <JBOSS_CMRF_HOME>/bin
Installing CMRF
- Extract the CMRF distribution cmrf-package-distribution-<CM_VERSION>-wildfly_jboss.zip into <JBOSS_CMRF_HOME>.
- Overwrite the 4 subfolders bin, domain, modules and standalone, i.e. confirm the overwriting of existing files.
Configuring the database connection
This section only applies to ConSol CM versions 6.13.0 and higher. For older versions, please refer to the respective manuals.
The database connection needs to be configured for ConSol CM and for CMRF.
-
Configuration for ConSol CM: cm6-config.properties located in <JBOSS_HOME>\bin:
- Uncomment for lines for the transactional datasource for CMRF.
- Set the properties according to your database configuration (Setting up the database for CMRF / DWH):
- cmrf.xa.datasource.url
URL of the transactional CMRF datasourceExample values:
- MySQL-5: jdbc:mysql://localhost/cmrfdatabase?serverTimezone=Europe/Berlin
- MySQL-8: jdbc:mysql://localhost/cmrfdatabase?characterEncoding=UTF-8&serverTimezone=Europe/Berlin
- Oracle: jdbc:oracle:thin:@localhost:1521:sid
- Microsoft SQL Server: jdbc:sqlserver://localhost:1433;databaseName=cmrfdatabase
- cmrf.xa.datasource.username
Name of the database user for CMRF - cmrf.xa.datasource.password
Password of the database user for CMRF
-
Configuration for CMRF: cmrf-config.properties located in <JBOSS_CMRF_HOME>\bin:
- Set the properties according to your database configuration (Setting up the database for CMRF / DWH):
- cmrf.xa.datasource.url
URL of the transactional CMRF datasourceExample values:
- MySQL-5: jdbc:mysql://localhost/cmrfdatabase?serverTimezone=Europe/Berlin
- MySQL-8: jdbc:mysql://localhost/cmrfdatabase?characterEncoding=UTF-8&serverTimezone=Europe/Berlin
- Oracle: jdbc:oracle:thin:@localhost:1521:sid
- Microsoft SQL Server: jdbc:sqlserver://localhost:1433;databaseName=cmrfdatabase
- cmrf.xa.datasource.username
Name of the database user for CMRF - cmrf.xa.datasource.password
Password of the database user for CMRF - cmrf.datasource.url
URL of the non-transactional CMRF datasource - cmrf.datasource.username
Name of the database user for CMRF - cmrf.datasource.password
Password of the database user for CMRF
- cmrf.xa.datasource.url
- If you run the ConSol CM server and the CMRF server on the same machine, you need to set a port offset for CMRF:
jboss.socket.binding.port-offset
Port offset of the CMRF server, example: 200
- Set the properties according to your database configuration (Setting up the database for CMRF / DWH):
Starting the server
You need to start both the ConSol CM server and the CMRF server. Run the following commands to start the JBoss servers. Alternatively you can configure JBoss to run as a service (similar to autostart of ConSol CM, see Autostarting the CM server).
ConSol CM
Run the following command to start the JBoss server:
Windows
<JBOSS_HOME>\bin\standalone.bat -P <JBOSS_HOME>\bin\cm6-config.properties -c cm6-dwh-<DB>.xml
Linux
<JBOSS_HOME>/bin/standalone.sh -P <JBOSS_HOME>/bin/cm6-config.properties -c cm6-dwh-<DB>.xml
Replace cm6-dwh-<DB>.xml with the ConSol CM configuration file for your database:
- cm6-dwh-mysql-5.xml for MySQL 5
- cm6-dwh-mysql-8.xml for MySQL 8
- cm6-dwh-oracle.xml for Oracle
- cm6-dwh-mssql.xml for Microsoft SQL Server
CMRF
Run the following command to start the JBoss server:
Windows
<JBOSS_CMRF_HOME>\bin\standalone.bat -P <JBOSS_CMRF_HOME>\bin\cmrf-config.properties -c cmrf-<DB>.xml
Linux
<JBOSS_CMRF_HOME>/bin/standalone.sh -P <JBOSS_CMRF_HOME>/bin/cmrf-config.properties -c cmrf-<DB>.xml
Replace cmrf-<DB>.xml with the CMRF configuration file for your database:
- cmrf-mysql-5.xml for MySQL 5
- cmrf-mysql-8.xml for MySQL 8
- cmrf-oracle.xml for Oracle
- cmrf-mssql.xml for Microsoft SQL Server