Dockerizing SymmetricDS

Max Pettit
Data Weekly by Jumpmind
4 min readJan 18, 2018

Overview

This article demonstrates how to deploy SymmetricDS using Docker and covers some of the benefits of using SymmetricDS inside of a container.

SymmetricDS is an open source database replication tool that is highly scalable and configurable. SymmetricDS supports a wide variety of database platforms such as MySQL, Microsoft SQL Server, PostgreSQL, SQLite, Oracle, and more.

Docker is a powerful tool for developing containers that are lightweight, scalable, and portable. Containers are stand-alone packages of software that contain all necessary libraries, runtimes, and settings to run applications or microservices. Containers are isolated from the host environment and therefore operate independent of the platform on which they are deployed. Docker can be used to rapidly deploy applications to cloud based solutions such as Amazon Web Services or the Google Cloud Platform. For more information on Docker, check out their website.

As part of an effort to further improve the simplicity and portability of SymmetricDS, JumpMind has now published official Docker images on the Docker Hub and Docker Store. The SymmetricDS and SymmetricDS Pro Docker images can be used to quickly deploy data replication to services such as AWS EC2. These images contain the latest version of SymmetricDS installed on an Alpine Linux based system pre-configured with OpenJDK.

Running a SymmetricDS Container

The JumpMind Docker repository page provides more details about each Docker image. There is a repository page for both SymmetricDS and SymmetricDS Pro. Each repository page contains instructions for running containers, specifying volumes, and connecting to running containers. Follow the specific instructions for the desired image to get started with the demos below.

Demo

The SymmetricDS Docker image contains sample configuration files which can be used with the demo and tutorials in the SymmetricDS documentation.

Start a SymmetricDS container and then connect to the container using the commands listed in repository documentation. Then move to the samples directory by executing the following command:

cd /opt/symmetric-ds/samples

From here, follow along with the tutorials documentation to set up a demo configuration. Please note that when the SymmetricDS container is started, the SymmetricDS application is started as a service. This means that SymmetricDS cannot be started using the included ‘sym’ executable. Once the properties files have been created or modified in the engines directory, the SymmetricDS service will need to be restarted using the following command:

/opt/symmetric-ds/bin/sym_service restart

Pro Demo

SymmetricDS Pro provides a built-in configuration that can be used to demonstrate the basic functionality and usage of the database replication tool. This demo configuration requires that SymmetricDS Pro is configured for HTTP communication. To use this demo, first start the SymmetricDS Pro Docker container using the HTTP port. Then access the web console and select the ‘Demo’ icon in the window displayed below.

Once the demo configuration finishes setting up, a license key can be installed. After the license is installed, the dashboard will be displayed where the overall health and activity of SymmetricDS can be observed.

The demo configuration uses a two tiered architecture with a single corporate node and two store nodes. These nodes each have an embedded H2 database with sample tables configured for replication. Please see the SymmetricDS tutorial documentation to see more details about the demo configuration.

Setting Up a Node with Pro

To configure your own database for replication, first start the SymmetricDS Pro Docker image using either the HTTP or HTTPS port mentioned in the repository instructions. Then visit the corresponding web console and select the ‘Master’ icon in the window displayed.

Then, input the JDBC connection information for your desired database.

Continue through the Node Setup Wizard and input the desired configuration. To see more details about setting up configuration, please view the SymmetricDS Pro documentation.

--

--