Installing InstantdbSync in a Docker Environment

  Building and Extending an Adabas Docker Image
  Building the Event Server Image

CONNX provides Docker scripts for the Event Producer and the Event Server that facilitate the creation of Docker images for the CONNX components on the Linux operating system.
Note:
When using InstantdbSync in a Docker environment, the InstantdbSyncAdministrator must have the configuration setting DNS_TO_DOT set to a value of 1. To set this value, open the CONNX Configuration Manager on the Windows machine where the Replication Administrator is running, select CONNX\Replication as the Current Key, DNS_TO_DOT as the Key Value and set the Value Data to 1. Click Save.
The docker containers that are used for replication will use the User ID and Group name sagadmin. This User ID and Group is also used by the Adabas container. Before starting the installation into a docker environment, please create a sagadmin user and group with the ID number 1724. Here is a sample command:
groupadd -g 1724 sagadmin && useradd -r -u 1724 sagadmin -g sagadmin
When installing the Event Server, the Linux CONNX Client must also be present in the directory where the replication components are installed. To install the CONNX Client, please download the Linux Intel Client from Empower.
After downloading the Linux Client, run the Windows based installer, fill in the Server name, user credentials and the optional path. Select the Docker check box and press install to transfer to client component files to the Linux system. Note that a separate readme file and Dockerfile will be transferred. These files will not be used during the creation of the Event Server docker container. The location the client components are transferred to must be the same as the location specified below for the replication components.
1. Download the CONNX installation package from the Empower web site to your computer.
2. Follow the instructions in the "Installing InstantdbSync in a Windows Environment" section of this document.
3. After installing InstantdbSync on the Windows system, start the Unix Installer from the InstantdbSync folder in the Start menu.
If the target system has an enabled FTP, SFTP, or SCP server, proceed to the next step.
If the target system does not have an enabled FTP, SFTP, or SCP server, check the Docker checkbox, select the Manual Copy Installation option and click the Install button. This option will create the necessary install files in the REPLICATION\INSTALL\UNIX\TEMPINST subdirectory of the CONNX installation directory. Move these files via a method of your choice to the Unix server and then proceed to step 7.
4. Check the Docker checkbox and select your desired transfer method (FTP, SFTP, or SCP).
5. In the Login Information section, enter the TCP/IP hostname or address of the target system and a privliged Username and Password (The password appears as ********).
Note:
All fields apart from Path are mandatory.
The replication files are sent to your home directory by default. If you wish to send them to another location, enter the name of the alternate directory in the Path text box. If the specified directory does not exist, it will be created.
6. Click the Install button. This starts an FTP, SFTP, or SCP session and copies the selected components to the target server. The progress of the copy will be displayed in the status pane on the installer.
A confirmation ftp window will appear when the files are successfully copied to the target system.
If the replication files are not installed, an error box appears. Select Files from the menu. The sub menu has options to view the FTP log and the FTP script. The FTP logs have a timestamp appended to the name. Select the appropriate log file and check for errors. If the resolution to the problem requires a call to technical support, please provide the log file and the script file to the support representative.
Note:
If the files fail to copy via the Client Installation's FTP, SFTP or SCP session, please use the Manual Copy Installation as outlined in step 3 above.
7. Once the files are copied, a dialog box appears asking you to log on to your system and follow the instructions in the readme.docker files for the event producer or the event server.
8. To build the Docker image, start a terminal emulator on the Linux server, type the appropriate user name and password and navigate to the directory you specified in the windows file transfer GUI.
This directory will contain several files, including two template Docker files:
Dockerfile.eventproducer is the template for building a Docker image for Adabas with LUW replication enabled.
Dockerfile.eventserver is the template for building a Docker image that contains the LUW replication event server and message queue components.
Note:
If you are going to build the eventserver container, the Linux client components should also be in this location. There will be a readme and a Dockerfile for the client present but they are not used in this process. The files clientlnx.tar.z, clientsb.tar.z and installclient should be present.
9. Build a docker image for the replication event producer.
To accomplish this, an Adabas image must first be built and then extended to include the replication event producer. See the Building an Adabas Docker Image section for instructions on how to built and extend and Adabas image.
10. Build a docker image for the Event Server and Message Queue.
See the Building the Event Server Image section for instructions.
11. Run the Adabas image with enabled event producer by using the following command:
docker run -d -e "ACCEPT_EULA=Y" -e "CONNX_EP_QUEUE_HOST=<IP address of the event server host machine>" -e "ADA_DB_CREATION=demodb"
-e ADADBID=<Database ID of your choice> --name <Name of your container> -v <Adabas license location>:/opt/softwareag/common/conf:z
-v <Producer data files location>:/opt/softwareag/connx/replicator/producer/data:z -v <Log location>:/opt/softwareag/connx/replicator/log:z
-p <External port>:60001 <Name of your image>:<Name of your tag>
For the <Producer data files location> and <Log location> directories, it is recommended to create a single "replicator" directory on the host machine. Under this "replicator" directory, create a "producer" and a "log" directory. Under the "producer" directory, create a "data" directory. Please ensure that the "producer/data" and "log" directories have an owner and group of sagadmin with an id of 1724.
The <External port> should be the port number for connecting to the Adabas database via TCP/IP.
Please note that the above command will create a demo database. If you already have a database configured within your image, omit the "ADA_DB_CREATION" and "ADADBID" environment variables.
Note:
Specifying the environment variable ACCEPT_EULA and setting it to 'Y' acknowledges that you have read and accepted the Software AG End User License Agreement. The software will not run if this value is not set.
12. Run the CONNX Event Server image by using the following command:
docker run -d -e "ACCEPT_EULA=Y" --name <Name of your container> -v <Config file location>:/config:z
-v <Common data files location>:/opt/softwareag/connx/replicator/common/data:z
-v <Consumer data files location>:/opt/softwareag/connx/replicator/consumer/data:z
-v <Log location>:/opt/softwareag/connx/replicator/log:z -p <External port for the message queue>:9200 -p <External port for the controller>:9205
<Name of your image>:<Tag of your image>
For the <Config file location>, <Common data files location>, <Consumer data files location>, and <Log location> directories, it is recommended to create a single "replicator" directory on the host machine. Under this "replicator" directory, create a "config", "common", "consumer", and "log" directory. Under both of the "common" and "consumer" directories, create a "data" directory. Please ensure that each of the "config", "common/data", "consumer/data", and "log" directories have an owner and group of sagadmin with an id of 1724.
Note:
Specifying the environment variable ACCEPT_EULA and setting it to 'Y' acknowledges that you have read and accepted the Software AG End User License Agreement. The software will not run if this value is not set.
13. Verify (and later on manage) the images and containers by using the following docker command reference:

Docker Command | Description
docker images | Show the available docker images.
docker logs <container name> | Show the log of <container name>.
docker ps -a | Show all containers.
docker stop <container name> | Stop container <container name>.
docker rm <container name> | Delete container <container name>.
docker image rm <image name> | Remove image <image name>.

Here is an example command for starting a docker image of the Event Server:
docker run -d -e "ACCEPT_EULA=Y" --name eventservercontainer -v /home/cnxuser/replicator/config:/config:z
-v /home/cnxuser/replicator/common/data:/opt/softwareag/connx/replicator/common/data:z
-v /home/cnxuser/replicator/consumer/data:/opt/softwareag/connx/replicator/consumer/data:z
-p 9300:9200 -p 9305:9205 eventserverimage:latest
Here is an example command for starting a docker image of Adabas with Event Reproducer:
docker run -d -e "ACCEPT_EULA=Y" -e "CONNX_EP_QUEUE_HOST=127.0.0.1" -e "ADA_DB_CREATION=demodb" -e ADADBID=1
--name adabasreplicationcontainer -v /home/cnxuser/adabaslicenses:/opt/softwareag/common/conf:z
-v /home/cnxuser/replicator/producer/data:/opt/softwareag/connx/replicator/producer/data:z
-p 20005:60001 adabasreplication:6.7
Note:
If the replication target is SQL Server, the connection to the target database in the CDD must use the Enterprise Server Service. Please see "Creating a CDD for Event Replication using the CONNX SQL Engine" for more information.