Installation and Upgrade Guide > TDV Docker Container > Launching TDV Containers > Launching TDV Containers (Cluster) - Using Docker Run
 
Launching TDV Containers (Cluster) - Using Docker Run
This section will explain how to start a TDV Docker container in a DV Cluster configuration. If you need to review TDV container sizing guidelines refer Sizing Guidelines for TDV. For further information regarding the TDV Cluster, refer to the TDV Active Cluster Guide.
General example for launching two TDV Docker containers to create a TDV Cluster
Below is a generic example for launching two docker containers to create a TDV Cluster. Note that you must execute the “docker run” command for all 3 TDV containers (repo, cache and server).
For Node 1:
docker volume create --name tdv0.0clustercache-vol 2>&1 > /dev/null
docker volume create --name tdv0.0clusterrepo-vol 2>&1 > /dev/null
docker volume create --name tdv0.0cluster-vol 2>&1 > /dev/null
 
docker run -itd --cpus 1.0 --restart unless-stopped --memory 2g --network tdv-bridge -p 9404:9404 -v tdv0.0clustercache-vol:/var/lib/postgresql/data --env POSTGRES_USER=<user> --env POSTGRES_PASSWORD=<tdv admin password> --env POSTGRES_DB=postgres --env POSTGRES_INITDB_ARGS=-E UTF-8 --env POSTGRES_HOST_AUTH_METHOD=password --env PGDATA=/var/lib/postgresql/data/tdv --name tdv0.0clustercache tibco/tdvcache:0.0 postgres
 
docker run -itd --cpus 1.0 --restart unless-stopped --memory 2g --network tdv-bridge -p 9408:9408 -v tdv0.0clusterrepo-vol:/var/lib/postgresql/data --env POSTGRES_USER=<user> --env POSTGRES_PASSWORD=<tdv admin password> --env POSTGRES_DB=postgres --env POSTGRES_INITDB_ARGS=-E UTF-8 --env POSTGRES_HOST_AUTH_METHOD=password --env PGDATA=/var/lib/postgresql/data/tdv --name tdv0.0clusterrepo tibco/tdvrepo:0.0 postgres
 
docker run -itd --cpus 2.0 --restart unless-stopped --memory 8g --network tdv-bridge -p 9400-9403:9400-9403 -p 9405:9405 -p 9409:9409 -p 9300-9306:9300-9306 -p 9407:9407 -v tdv0.0cluster-vol:/opt/TIBCO --name tdv0.0cluster --env TDV_ADMIN_PASSWORD=<tdv admin password> --env TDV_MAX_MEMORY=7000 --env TDV_CACHE_HOSTNAME=tdv0.0clustercache --env TDV_REPO_HOSTNAME=tdv0.0clusterrepo tibco/tdv:0.0 tdv.server
 
To configure node 1 as timekeeper node on "tdv0.0cluster:9400" with cluster name "tdv0.0cluster":
 
docker exec -it tdv0.0cluster /bin/bash -c $TDV_INSTALL_DIR/bin/cluster_util.sh -server tdv0.0cluster -port 9400 -user admin -password tdvrelease123! -create -clusterName tdv0.0cluster
For Node 2
docker volume create --name tdv0.0cluster2cache-vol 2>&1 > /dev/null
docker volume create --name tdv0.0cluster2repo-vol 2>&1 > /dev/null
docker volume create --name tdv0.0cluster2-vol 2>&1 > /dev/null
 
docker run -itd --cpus 1.0 --restart unless-stopped --memory 2g --network tdv-bridge -p 10404:9404 -v tdv0.0cluster2cache-vol:/var/lib/postgresql/data --env POSTGRES_USER=<user> --env POSTGRES_PASSWORD=<tdv admin password> --env POSTGRES_DB=postgres --env POSTGRES_INITDB_ARGS=-E UTF-8 --env POSTGRES_HOST_AUTH_METHOD=password --env PGDATA=/var/lib/postgresql/data/tdv --name tdv0.0cluster2cache tibco/tdvcache:0.0 postgres
 
docker run -itd --cpus 1.0 --restart unless-stopped --memory 2g --network tdv-bridge -p 10408:9408 -v tdv0.0cluster2repo-vol:/var/lib/postgresql/data --env POSTGRES_USER=<user> --env POSTGRES_PASSWORD=<tdv admin password> --env POSTGRES_DB=postgres --env POSTGRES_INITDB_ARGS=-E UTF-8 --env POSTGRES_HOST_AUTH_METHOD=password --env PGDATA=/var/lib/postgresql/data/tdv --name tdv0.0cluster2repo tibco/tdvrepo:0.0 postgres
 
docker run -itd --cpus 2.0 --restart unless-stopped --memory 8g --network tdv-bridge -p 10400-10403:9400-9403 -p 10405:9405 -p 10409:9409 -p 10300-10306:9300-9306 -p 10407:9407 -v tdv0.0cluster2-vol:/opt/TIBCO --name tdv0.0cluster2 --env TDV_ADMIN_PASSWORD=<tdv admin password> --env TDV_MAX_MEMORY=7000 --env TDV_CACHE_HOSTNAME=tdv0.0cluster2cache --env TDV_REPO_HOSTNAME=tdv0.0cluster2repo tibco/tdv:0.0 tdv.server
 
To configure node 2 as a non timekeeper node on "tdv0.0cluster2:9400" with cluster name "tdv0.0cluster".
docker exec -it tdv0.0cluster2 /bin/bash -c $TDV_INSTALL_DIR/bin/cluster_util.sh -server tdv0.0cluster2 -port 9400 -user <user> -password <tdv admin password> -join -memberServer tdv0.0cluster -memberPort 9400 -memberUser <user> -memberPassword <tdv admin password>
Note: When launching a container, you can either give a password or use a password file that has the password stored in it. Refer to the section TDV Admin Password for ways to specify the Admin Password.
References
Refer the table below for a description of the different Docker commands:
 
Option
Docker Help Reference
--restart
Used to configure the restart policy for a container.
-t
-i
Keep STDIN open even if not attached - https://docs.docker.com/engine/reference/run/
-d
Detach and run the container in background and print container ID - https://docs.docker.com/engine/reference/run/#detached--d
-v
(TDV Required) The tdv container requires a persistent storage area when running as a Docker container. See Sizing Guidelines for TDV for size recommendations.
Usage: -v <path to the file on the host machine>:<path where the file is mounted in the container>:<optional parameters>
Example: -v $CONTAINER_CACHE_VOLUME:$TDV_DATABASE_DIR
Note: mount point must have a valid volume existing before starting the TDV Container.
--cpus
(TDV Recommended) The tdv container works best with 2 CPUs/cores in general. See Sizing Guidelines for TDV for value recommendations.
--m
(TDV Required) The tdv container requires a mininum of 8 GB of memory. Higher tdv workloads require more. See Sizing Guidelines for TDV for value recommendations.
<tdv-container-name>
Container name for your TDV Docker container. Recommendation is to have tdv in the name. Examples: tdv, tdv-1, tdv-2, tdv-dev, tdv-prod, etc
<repo-name>
Repository name for your TDV Docker image.
<image-name>
Recommendation is to use tdv. Of course, you can change this to any name though
<image-tag>
Recommendation is to use the TDV version for this. Example: 8.4
Linux
This section explains how to start two TDV Docker containers configured as a DV Cluster configuration on a Docker environment hosted on the Linux platform. Use a docker network that will allow your TDV containers to communicate with each other.
The bridge, host and user specified bridge network options in the docker should work for the TDV containers on this platform. Refer to the TDV Active Cluster Guide on how to configure TDV and create a new active cluster.
Note: Ensure that both TDV containers are running and accessible.
TDV Docker Container Example
Resource configuration: small (poc/demo) : 2 CPUs/cores, 8 GB memory, external container volume tdv-vol with 8GB persistent readable/writable storage.
TDV configuration: base port (9400), admin password (required), server memory (default). Refer to the docker container files (Dockerfile.tdv, Dockerfile.tdv.repo and Dockerfile.tdv.cache) for TDV Docker image default values.
Network configuration: user bridge docker network
$ docker volume create tdv-vol
$ docker run -itd -v <volume>:<location>, type=volume,source=tdv-vol, -env [TDV_ADMIN_PASSWORD=<PASSWORD>]
[TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] target=/opt/TIBCO --cpus=2.000 -m=8g --name tdv myrepo/tdv:8.5 Dockerfile.tdv.repo
Note: The above example is for starting the TDV repo. You must run a similar command for TDV server and cache.
 
Setup Node #1 (timekeeper)
$ docker volume create tdv-vol-1
$ docker run -itd --net=tdv-bridge -p 9300:9300 -p 9301:9301 -p 9302:9302 -p 9303:9303 -p 9304:9304 -p 9305:9305 -p 9306:9306 -p 9400:9400 -p 9401:9401 -p 9402:9402 -p 9403:9403 -p 9407:9407 -v <volume>:<location> type=volume,source=tdv-vol-1, -env [TDV_ADMIN_PASSWORD=<PASSWORD>] [TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] target=/opt/TIBCO --cpus=2.000 -m=8g --name tdv-timekeeper myrepo/tdv:8.5 Dockerfile.tdv.repo
Note: The above example is for starting the TDV repo. You must run a similar command for TDV server and cache.
 
Now verify you can access port 9400 for Node #1 from outside of your Docker environment.
Once that is done, follow the TDV configuration steps in "Creating a New Active Cluster" section in the TDV Active Cluster Guide.
That will setup a new DV cluster on Node #1.
 
Setup Node #2 (non-timekeeper)
$ docker volume create tdv-vol-2
$ docker run -itd --net=tdv-bridge -p 10300:9300 -p 10301:9301 -p 10302:9302 -p 10303:9303 -p 10304:9304 -p 10305:9305 -p 10306:9306 -p 10400:9400 -p 10401:9401 -p 10402:9402 -p 10403:9403 -p 10407:9407 -v <volume>:<location> type=volume,source=tdv-vol-2, -env [TDV_ADMIN_PASSWORD=<PASSWORD>] [TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] target=/opt/TIBCO --cpus=2.000 -m=8g --name tdv-node2 myrepo/tdv:8.5 Dockerfile.tdv.repo
Note: The above example is for starting the TDV repo. You must run a similar command for TDV server and cache.
Now verify you can access port 9400 for Node #2 from outside of your Docker environment.
Once that is done, following the DV configuration steps in "Adding a TDV Server to an Active Cluster" section in the TDV Active Cluster Guide.
That will setup Node #2 to join the TDV Cluster created on Node #1.
Now your DV Cluster is configured and ready for usage.
You can verify this by opening a browser client and going to http://<IP_NODE_#1>:9400/manager.
Select “Cluster”.
MacOS
This section explains how to start two TDV Docker containers configured as a DV Cluster configuration on a Docker environment hosted on the Mac OS platform. Use a docker network that will allow your TDV containers to communicate with each other.
The bridge, host and user specified bridge network options in the docker should work for the TDV containers on this platform. Refer to the TDV Active Cluster Guide on how to configure TDV and create a new active cluster.
Note: Ensure that both TDV containers are running and accessible.
TDV Docker container example
Resource configuration: small (poc/demo): 2 CPUs/cores, 8 GB memory, external container volume tdv-vol with 8GB persistent readable/writable storage.
MacOS specific configuration: -p <host-port>:<container-port> for all DV ports exposed and --hostname=localhost
TDV configuration: base port (9400), admin password (required), server memory (default). Refer to the docker container files (Dockerfile.tdv, Dockerfile.tdv.repo and Dockerfile.tdv.cache) for TDV Docker image default values.
Network configuration: user bridge docker network.
Setup Node #1 (timekeeper)
$ docker volume create tdv-vol-1
$ docker run -itd --net=tdv-bridge -p 9300:9300 -p 9301:9301 -p 9302:9302 -p 9303:9303 -p 9304:9304 -p 9305:9305 -p 9306:9306 -p 9400:9400 -p 9401:9401 -p 9402:9402 -p 9403:9403 -p 9407:9407 -v <volume>:<location> type=volume,source=tdv-vol-1, -env [TDV_ADMIN_PASSWORD=<PASSWORD>] [TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] target=/opt/TIBCO --cpus=2.000 -m=8g --name tdv-timekeeper myrepo/tdv:8.5 Dockerfile.tdv.repo
Note: The above example is for starting the TDV repo. You must run a similar command for TDV server and cache.
Now verify you can access port 9400 for Node #1 from outside of your Docker environment.
Once that is done, follow the TDV configuration steps in "Creating a New Active Cluster" section in the TDV Active Cluster Guide.
That will setup a new DV cluster on Node #1.
Setup Node #2 (non-timekeeper)
$ docker volume create tdv-vol-2
$ docker run -itd --net=tdv-bridge -p 10300:9300 -p 10301:9301 -p 10302:9302 -p 10303:9303 -p 10304:9304 -p 10305:9305 -p 10306:9306 -p 10400:9400 -p 10401:9401 -p 10402:9402 -p 10403:9403 -p 10407:9407 -v <volume>:<location> type=volume,source=tdv-vol-2, -env [TDV_ADMIN_PASSWORD=<PASSWORD>] [TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] target=/opt/TIBCO --cpus=2.000 -m=8g --name tdv-node2 myrepo/tdv:8.5 Dockerfile.tdv.repo
Note: The above example is for starting the TDV repo. You must run a similar command for TDV server and cache.
Now verify you can access port 9400 for Node #2 from outside of your Docker environment.
Once that is done, following the DV configuration steps in "Adding a TDV Server to an Active Cluster" section in the TDV Active Cluster Guide.
That will setup Node #2 to join the TDV Cluster created on Node #1.
Now your DV Cluster is configured and ready for usage.
You can verify this by opening a browser client and going to http://<IP_NODE_#1>:9400/manager.
Select “Cluster”.
Windows
This section explains how to start two TDV Docker containers configured as a DV Cluster configuration on a Docker environment hosted on the Windows platform. Use a docker network that will allow your TDV containers to communicate with each other.
The bridge, host and user specified bridge network options in the docker should work for the TDV containers on this platform. Refer to the TDV Active Cluster Guide on how to configure TDV and create a new active cluster.
Note: Ensure that both TDV containers are running and accessible.
TDV Docker container example
Resource configuration: small (poc/demo): 2 CPUs/cores, 8 GB memory, external container volume tdv-vol with 8GB persistent readable/writable storage.
Windows specific configuration: -p <host-port>:<container-port> for all DV ports exposed and --hostname=localhost or --hostname=<ip-or-hostname>
TDV configuration: base port (9400), admin password (default), server memory (default). Refer to the docker container files (Dockerfile.tdv, Dockerfile.tdv.repo and Dockerfile.tdv.cache) for TDV Docker image default values.
Network configuration: user bridge docker network.
Setup Node #1 (timekeeper)
$ docker volume create tdv-vol-1
$ docker run -itd --net=tdv-bridge -p 9300:9300 -p 9301:9301 -p 9302:9302 -p 9303:9303 -p 9304:9304 -p 9305:9305 -p 9306:9306 -p 9400:9400 -p 9401:9401 -p 9402:9402 -p 9403:9403 -p 9407:9407 -v <volume>:<location> type=volume,source=tdv-vol-1, -env [TDV_ADMIN_PASSWORD=<PASSWORD>] [TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] target=/opt/TIBCO --cpus=2.000 -m=8g --name tdv-timekeeper myrepo/tdv:8.5 Dockerfile.tdv.repo
Note: The above example is for starting the TDV repo. You must run a similar command for TDV server and cache.
Now verify you can access port 9400 for Node #1 from outside of your Docker environment.
Once that is done, follow the TDV configuration steps in "Creating a New Active Cluster" section in the TDV Active Cluster Guide.
That will setup a new DV cluster on Node #1.
Setup Node #2 (non-timekeeper)
$ docker volume create tdv-vol-2
$ docker run -itd --net=tdv-bridge -p 10300:9300 -p 10301:9301 -p 10302:9302 -p 10303:9303 -p 10304:9304 -p 10305:9305 -p 10306:9306 -p 10400:9400 -p 10401:9401 -p 10402:9402 -p 10403:9403 -p 10407:9407 -v <volume>:<location> type=volume,source=tdv-vol-2, -env [TDV_ADMIN_PASSWORD=<PASSWORD>] [TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] target=/opt/TIBCO --cpus=2.000 -m=8g --name tdv-node2 myrepo/tdv:8.5 Dockerfile.tdv.repo
Note: The above example is for starting the TDV repo. You must run a similar command for TDV server and cache.
Now verify you can access port 9400 for Node #2 from outside of your Docker environment.
Once that is done, following the DV configuration steps in "Adding a TDV Server to an Active Cluster" section in the TDV Active Cluster Guide.
That will setup Node #2 to join the TDV Cluster created on Node #1.
Now your DV Cluster is configured and ready for usage.
You can verify this by opening a browser client and going to http://<IP_NODE_#1>:9400/manager.
Select “Cluster”.