Setting up ThingWorx CXServer Docker Build
To build the additional ThingWorx Connection Server Docker image necessary to support ThingWorx HA, perform the following actions:
Download the cxserver dockerfile from the PTC Software Download page under ThingWorx Connection Server DockerFiles > ThingWorx-Connection-Server-DockerFiles-v.v.
Download the required CXServer files to the staging folder and make sure they’re available for the build process.
Modify the build.env variable file with appropriate values.
Required CXServer Files
The following files must be present in the staging folder.
Platform
Description
java
The OpenJDK - Amazon Coretto 11.x.x file obtained from Amazon Web Services or the Java JDK (version 11 or 8) archive file obtained from Oracle.
If you want to use some other image as a base, make the required changes in dockerfiles\ignite\Dockerfile
Example file:
amazon-corretto-11.x.x-linux-x64.tar.gz
Save this file into the staging folder and make sure the JAVA_VERSION and JAVA_ARCHIVE variables in build.env file are correct.
ThingWorx Connection Server Archives
Download from the PTC Software Downloads site alongside this Dockerfile release.
Save these files into the staging folder and make sure the APP_ARCHIVEvariable in build.env file are correct.
Template Processor Archive
A tool provided by PTC to both parse templates inside the Docker container when it is starting to provide variables and format configuration files based on the running environment.
Example File:
template-processor-12.1.0.11-application.tar.gz
Make sure this file in the staging folder matches the TEMPLATE_PROCESSOR_ARCHIVE variable in the build.env file.
CXServer build.env Variable
The build.env file contains a list of variables that you must set. The following variables must be set:
Variable Name
Default
Comment
JAVA_VERSION
11.0.8.10.1
The version of the Amazon Coretto OpenJDK.
APP_NAME
cxserver-always-on
The name of the application, used to set home dir etc.
APP_VERSION
0-master.9.1.0.0-SNAPSHOT
The Connection Server Library Version
APP_ARCHIVE
connection-server-0-master.9.1.0.0-SNAPSHOT.zip
The Connection Server Library zip name as it exists in the staging folder.
TEMPLATE_PROCESSOR_ARCHIVE
template-processor-12.1.0.11-application.tar.gz
The version of the template-processor archive as it exists in the staging folder.
Staging CXServer Files
You must place the required files for building the Docker images in the staging folder that is part of this release. The staging folder should already contain a base platform-settings.json file.
To download ThingWorx CXServer automatically:
1. Make sure you have set the build.env file variables appropriately.
2. Run the command ./build.sh stage.
If there are no errors, the files should be in the staging folder and they should match your build.env settings.
Was this helpful?