Skip to main content

Configuration

To run replication in a Docker container or directly via TimeBase Shell CLI, refer to the following instructions:

Replication Between Two TimeBase Instances

This instruction describes how to live replicate data from one TimeBase instance to another via TimeBase Shell in Docker.

For this example we will use three components which are started one by one in the following order:

  1. TimeBase Master - source instance
  2. TimeBase Slave - target instance
  3. Replication - data replication script

Docker Compose

Run Docker Compose with the configurations for each of the components. Mounted volumes of each component override common configurations in case other than common values are supplied.

version: '3.5'
services:
timebase-master: # TimeBase Master settings
image: "registry.deltixhub.com/quantserver.docker/timebase/server:5.5.55" # path to TimeBase Docker image you are going to use
container_name: timebaseMaster
environment:
- TIMEBASE_SERIAL=${SERIAL_NUMBER}
- JAVA_OPTS=
-Xms8g
-Xmx8g
-DTimeBase.version=5.0
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/timebase-home/timebase.hprof
-Xlog:gc=debug:file=/timebase-home/GClog-TimeBase.log:time,uptime,level,tags:filecount=5,filesize=100m
ports:
- 8011:8011 # TimeBase Master server port
deploy:
resources:
limits:
memory: 10G
reservations:
cpus: '1'
memory: 4G
stop_grace_period: 5m
ulimits:
nofile:
soft: 65536
hard: 65536
volumes:
- "./timebase-home:/timebase-home"


timebase-slave: # TimeBase Slave Settings
image: "registry.deltixhub.com/quantserver.docker/timebase/server:5.5.55" # path to TimeBase Docker image you are going to use
environment:
- TIMEBASE_SERIAL=${SERIAL_NUMBER}
- JAVA_OPTS=
-Xms8g
-Xmx8g
-DTimeBase.version=5.0
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/timebase-home/timebase.hprof
-Xlog:gc=debug:file=/timebase-home/GClog-TimeBase.log:time,uptime,level,tags:filecount=5,filesize=100m
ports:
- 8012:8012 # TimeBase Slave server port
deploy:
resources:
limits:
memory: 10G
reservations:
cpus: '1'
memory: 4G
stop_grace_period: 5m
ulimits:
nofile:
soft: 65536
hard: 65536
volumes:
- "./timebase-home:/timebase-home"

replication: # Replication settings
image: "registry.deltixhub.com/quantserver.docker/timebase/server:5.5.55" # path to TimeBase Docker image you are going to use
tty: true # must be set to True
environment:
- TIMEBASE_SERIAL=${SERIAL_NUMBER}
- JAVA_OPTS=
-Xms8g
-Xmx8g
-DTimeBase.version=5.0
depends_on:
- timebase-master
- aggregator
- timebase-slave
ports:
- 8013:8013
deploy:
resources:
limits:
memory: 10G
reservations:
cpus: '1'
memory: 1G
stop_grace_period: 5m
ulimits:
nofile:
soft: 65536
hard: 65536
command: ["/replication/start-replication.sh"]
volumes:
- "./replication/start-replication.sh" # script that starts TimeBase Shell
- "./replication/replication.script" # script that starts data replication

TimeBase Master Configurations

Custom admin.properties parameters:

# TimeBase Master host name
TimeBase.host=timebase-master

TimeBase Slave Configurations

Custom admin.properties parameters:

# TimeBase Slave host name
TimeBase.host=timebase-slave

Replication Configurations

  1. Create and mount start-replication.sh script to start using TimeBase Shell. See Guide for your reference.

    # Example
    #!/bin/sh
    /timebase-server/bin/tickdb.sh -exec exec /replication/replication.script
  2. Create and mount replication.script script to run live replication via TimeBase Shell. See Guide for your reference. See docker-compose.yaml example earlier in this section.

    # Example
    set db dxtick://username:password@timebase-slave:8011 # Username and password from UAC settings
    open
    set srcdb dxtick://username:password@timebase-master:8011 # Username and password from UAC settings
    set cpmode live
    set reload prohibit
    set srcstream <stream_name>
    replicate <stream_name>
info

Refer to Replication for more information about TimeBase replication options.

User Access Control

In admin.properties configuration file specify the following parameters to enable UAC:

QuantServer.security.rulesConfig=uac-access-rules.xml //users authorization information
QuantServer.security.userDirectoryConfig=uac-file-security.xml //users authentication information
QuantServer.security=FILE
info

Refer to UAC Rules for more information.