Stelo Technical Documents
Quick Start Guide to Using the Stelo Replicator Linux Container
Last Update:09 March 2023
Product: SQDR & SQDR Plus
Version: 6.11 and later
Article ID: SQV00PL076
Abstract
This Quick Start Guide describes how to install and configure the Stelo Replicator Linux Container. The container contains the following components:
- SQDR (Stelo Apply)
- SQDR Plus (Stelo Capture)
- SQDR_ODBC bundled ODBC drivers
- StarSQL/Linux ODBC driver for Db2
- Other popular ODBC drivers
- Db2 LUW (used for the SQDR control database and the SQDR Plus staging databases)
- Red Hat Linux 8.x
- OpenJDK 17
For a general overview of installing and using Stelo Replicator on Linux and an introduction to the 4 tier SQDR architecture, see the appropriate Quick Start Guide for Using SQDR Plus and Quick Start Guide to using SQDR on Linux. Using the Container simplifies the installation and configuration of Tiers 2 and 3.
- Prerequisites
- Install and Start the Docker Service
- Download, Load and Start the Container
- License the Stelo software
- Start the SQDR Service
- Configure and Manage Replication using Browser and Windows GUI Applications
- Stopping the Container
Prerequisites
For the Linux host system:
- A Linux system capable of running Docker. It does not have to be using the same Linux distribution or version as that in the container. We have successfully used the container on Ubuntu Linux, CentOS 7, Amazon Linux 2, and Oracle Linux 8.
- Adequate disk space in the /root filesystem.
- Adequate RAM.
- A static IP address. The container will use host mode networking.
- No port conflicts: the host system should not be running any service that is using the same ports/services as the container e.g. Db2, Stelo Replicator, Derby, or any service using port 8080.
- If a firewall is enabled on the host system, it should allow incoming connections from the Windows management system, typically ports 50000 (DRDA access to Db2 LUW control databases), 8080 & 8443 (http and https access to the SQDR Control Center), and 7737 & 7738 (grpc access to the SQDR service).
- Network connectivity to source and destination database systems.
You will also need a Windows system with the SQDR Data Replicator Manager package for running the GUI management tools:
- Data Replicator Manager (drmgr)
- SQDR Configuration (sqdrconf)
- SQDR Service Properties (sqdrprops)
- StarAdmin (for binding StarSQL packages on Db2 Tier 1 source systems). Note that StarAdmin is also supplied in the Linux container, but requires a GUI interface (e.g. VNC) for the Linux system. StarAdmin is not needed if the Tier 1 source system is running a DBMS other than Db2. StarAdmin is run after creating an agent for the source system so that it can place its packages in the SQDR schema.
Install and Start Docker
# sudo yum install -y yum-utils
# sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
# sudo yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
# systemctl enable docker --now
Download, Load and Start the Container
# wget https://downloads.stelodata.com/..../stelo-full-<version>.tar
# docker load --input stelo-full-<version>.tar
e.g.
#
docker load --input stelo-full-1229.tar
Use this command to list docker images:
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
stelo-full latest 958deda10390 31 hours ago 5.06GB
Create a shell script for running the container:
# cat > runcontainer.sh
docker run --name stelo-full \
--detach --privileged=true \
--network host \
-v db2-home:/home/db2inst1 \
-v db2-config:/opt/ibm \
-v db2-data:/data/db2 \
-v db2-logs:/logs/db2 \
-v sq-config:/var/sqdr \
-v sq-etc:/etc \
-v sqplus-config:/var/sqdrplus \
-v backups:/backups \
stelo-full
<^d>
# chmod 755 runcontainer.sh
# ./runcontainer.sh
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f69aa33faca5 stelo-full "/var/db2_setup/lib/…" 7 hours ago Up 7 hours stelo-full
Connect to the container and perform additional operations within the container:
# docker exec -ti stelo-full bash
License the Stelo Software (within the container)
Supply the IP address of the host to Stelo support, who will generate 4 licenses
Add the licenses
# cd /opt/StarQuest/starsql64/bin
# ./starlic-clientcfg client-key-add <license1>
# ./starlic-clientcfg client-key-add <license2>
etc.
Start the SQDR Service (within the container)
# cd /opt/StarQuest
# sqdrsvc-start
# sqdrsvc-status
Note that the SQDR Plus services are automatically started when you start the container; these can be controlled with /etc/init.d/sqdr-derby, sqdr-jetty, and sqdr-capagent.
Configuration and Management
To configure and manage SQDR Plus (Tier 2), open the SQDR Control Center from any browser with network connectivity to the host system. Use the URL http://<hostname or IP of the host system>:8080/SQDRManager, enter the user SQDR (user name is case-sensitive) and the password that has been configured.
To manage SQDR (Tier 3), run Data Replicator Manager (drmgr) from a Windows system with the SQDR Data Replicator Manager package and network connectivity to the host system. You may also use SQDR Configuration (sqdrconf) and SQDR Service Properties (sqdrprops), but drmgr is the primary management application.
You can also use the SQDR PowerShell cmdlets on any system (Linux, Windows, or MacOS) with PowerShell and network connectivity to the host system.
To enable RBAC (Role Based Access Control and Auditing), you enable RBAC and logging with sqdrconf and manage users and roles with either sqdrconf or drmgr.
Configure SQDR sources, destinations, and subscriptions
SQDR can use either ODBC data sources (DSN's) or connection strings for sources or destinations. ODBC DSN's are configured on the Linux system using a text editor to modify /etc/odbc.ini (system DSN's) or $HOME/.odbc.ini (for the user that the SQDR service is running as). Connection strings are configured in the Data Replicator Manager and in most cases will be identical to the strings used when running SQDR on a Windows system.
- Create ODBC DSN's on the Linux system if necessary
- On the Windows system, start Data Replicator Manager
- choose Add Server from the Service menu and enter the hostname or IP address of the Linux system. Leave the user and passwords field blank.
- Create sources, destinations, and subscriptions using Data Replicator Manager
- To edit advanced service properties, use SQDR Service Properties (SQDRProps) from the Windows system.
- You can connect with PowerShell from any system (Windows, Linux, MacOS) that supports PowerShell. See Automating SQDR tasks using PowerShell.
To stop the container:
# docker stop stelo-full; docker system prune -f;
docker pull name_of_image
DISCLAIMER
The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization. The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.