Docker
TIBCO Graph Database is available as a Docker image.
Building the TIBCO Graph Database Docker Image
- Once the product is installed, for example /home/tibco/tgdb/<VERSION>, make sure you have ‘docker’ subfolder in ‘/home/tibco/tgdb/<VERSION>’.
- Make sure you have ‘docker’ environment installed and usable. (Refer to ‘https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7’ or equivalent.)
- Navigate to ‘docker’ folder, for example:
cd /home/tibco/tgdb/<VERSION>/docker
- Edit ‘variables.txt’ file to set custom values for your TIBCO Graph Database Server initialization and runtime configuration parameters.
- Execute the following script ‘build-docker-image.sh’:
(for product version 3.1 and installation directory as /home/tibco/tgdb)
Prompt#> clear && docker images && \ > PRODUCT_DIRECTORY=/home/tibco/tgdb VERSION=3.1 ./build-docker-image.sh && \ > docker images
- On successful completion of command above, you should see a docker image ‘tgdb-3.1’ (or ‘tgdb-<VERSION>’) in the list as follows:
tibco/tgdb-3.1 latest 35a8cff9a2f0 1 seconds ago 48.3MB
How to Execute TIBCO Graph Database Docker Image in a Docker Container
This assumes that you already have successfully built a TIBCO Graph Database Docker image in your local environment.
- Navigate to ‘docker’ folder, for example:
cd /home/tibco/tgdb/<VERSION>/docker
- Execute the following script ‘run-docker-image.sh’ (for product version 3.1 and installation directory as
/home/tibco/tgdb,
-Y option indicates that you accept the end user license agreement):
Prompt#> clear && docker ps -a && \ > PRODUCT_DIRECTORY=/home/tibco/tgdb VERSION=3.1 ./run-docker-image.sh -Y && \ > sleep 30 && docker ps -a
If you want to specify external configuration files, set USER_CONFIG_DIRECTORY=<path to directory containing external conf files> while running the script. (Make sure to set dbPath = /mnt/tibco/tgdb/data in the respective conf files as per variables.txt.)
For example:prompt#> PRODUCT_DIRECTORY=/home/tibco/tgdb VERSION=3.1 USER_CONFIG_DIRECTORY=/home/centos/user_conf ./run-docker-image.sh –Y
This will pick up configuration files (initdb.conf,tgdb.conf) from directory user_conf. - On successful completion of the previous command, you should see a Docker container ‘tgdb-3.1’ (or tgdb-<VERSION>’ in the list as follows:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 35a8cff9a2f0 tibco/tgdb-3.1 "./start-tgdb.bash" 45 minutes ago Up 45 minutes 0.0.0.0:8222-8223->8222-8223/tcp tgdb-3.1
How to Confirm Docker Container and TIBCO Graph Database Server is Working Properly
This assumes that you already have successfully built a TIBCO Graph Database Docker image and attempted to create a Docker Container for it. There are few simple commands that you can use to check/verify whether the Docker Container is functioning properly or not.
- Get the appropriate <CONTAINER ID> via ‘docker ps -a’ - as shown above.
- Use ‘docker exec <CONTAINER ID> ls -ltR /home/tibco/tgdb/data’ to check whether a database subfolder and associated files are present or not.
- Use ‘docker exec <CONTAINER ID> cat /home/tibco/tgdb/bin/log/tgdb_<YOUR_DBNAME>.log’ to see if there are any errors during creation of your custom DB.
- Use ‘docker exec <CONTAINER ID> cat /home/tibco/tgdb/bin/log/tgdb_initdb.log’ to see if there are any errors during TIBCO Graph Database server initialization based on your custom configuration.
- Use ‘docker exec <CONTAINER ID> cat /home/tibco/tgdb/bin/initdb.conf’ to verify whether your custom configuration values are being used or not.
- Use ‘docker exec <CONTAINER ID> cat /home/tibco/tgdb/bin/tgdb.conf’ to verify whether your custom runtime configuration values are being used or not.
Additional Dependent Components for Docker Image
Running Multiple TIBCO Graph Database Instances within Docker
As of version 3.1, multiple TIBCO Graph Database instances are supported on TIBCO Graph Database Enterprise Edition. All databases listed in the “databases” section of tgdb.conf will be run on startup. TIBCO Graph Database Community Edition is currently limited to 1 database at a time.
Copyright © 2021. Cloud Software Group, Inc. All Rights Reserved.
