Installation and Upgrade Guide > TDV Docker Container > Runtime TDV Container Configuration - Common Examples
 
Runtime TDV Container Configuration - Common Examples
The following topics are explained in this section:
Change TDV admin password (while container is running)
Change TDV base port
Change TDV server memory setting
Configure external volume for local persisted file data sources (e.g. csv, xml, txt)
Configure data source with 3rd party JDBC driver (type 4)
Configure data source with 3rd party JDBC driver (type 3)
Change TDV admin password (while container is running)
To change the TDV Docker container's admin password you will need to use the TDV Studio client.
Note: Your default TDV Docker admin user "admin" password is defined in your Dockerfile.tdv for your given TDV release.
Follow these steps to change the password:
1. Use TDV Studio (same version of TDV as your TDV Docker container) to connect to your TDV Docker container. Login to the TDV Studio using the TDV admin user "admin" and your TDV admin password along with the appropriate TDV base port.
2. Select the "File" tab in the TDV Studio client menu options and choose "Change Password".
3. In the new pop-up dialog window, provide the current TDV admin user "admin" user password and the new password. When completed, click OK.
4. TDV Studio client will not logout of the client and a new login dialog will be displayed. Proceed to login again with your new TDV admin user "admin" password to verify the update.
Change TDV base port
To change the TDV Docker container's base port you will need to reconfigure TDV and create a new TDV Container.
Example (change base port from 9400 to 10400):
1) Use TDV Studio (same version of TDV as your TDV Docker container) to connect to your TDV Docker container. Login to the TDV Studio using the TDV admin user "admin" and your TDV admin password along with the appropriate TDV base port.
2) Goto Administration > Configuration
3) Search for "Port ("
4) From the search result, select "Port (On Server Restart): 9400".
5) Change your base port value to "10400”. Apply your Changes.
Note: "Port (Current)" shows your current TDV Server base port configuration.
"Port (On Server Restart)" shows your future TDV Server base port configuration. This only takes affect when you restart the TDV Server though.
6) Now click on the "Ok" button to close the pop-up window.
7) Logout of the TDV Studio client.
8) Stop the TDV Docker container where your TDV Server is running.
docker stop <tdv-container-name>)
9) Start a new TDV Docker container with the new base ports and reuse the TDV Docker volume used for the container from step #8.
docker run -itd -p 10300:10300 -p 10301:10301 -p 10302:10302 -p 10303:10303 -p 10304:10304 -p 10305:10305 -p 10306:10306 -p 10400:10400 -p 10401:10401 -p 10402:10402 -p 10403:10403 --mount type=volume,source=tdv-vol,target=/opt/TIBCO --cpus=2.000 -m=8g --name tdv_new myrepo/tdv:8.4 tdv.server
 
Note: The above example expects a valid tdv-vol, default docker network bridge works on your Docker host, and that you already have a valid TDV Docker image that exists.
It is also expected that you reuse your TDV Container volume, otherwise your base port and any other TDV metadata changes will be lost. Basically, if you specify a new TDV volume, then the TDV Container will create a brand new, default TDV Container based on your TDV Docker image defaults (i.e. default "admin" user password, base port and server settings).
Change TDV server memory setting
To change the TDV Docker container's memory setting you will need to reconfigure TDV and create a new TDV Container.
Example (change server memory from 8192 Mbytes (8 GB) to 16,384 MBytes (16 GB):
1) Use TDV Studio (same version of TDV as your TDV Docker container) to connect to your TDV Docker container. Login to the TDV Studio using the TDV admin user "admin" and your TDV admin password along with the appropriate TDV base port.
2) Go to Administration > Configuration
3) Search for “Total Available Memory ("
4) In the search results, select "Total Available Memory (On Server Restart): 4096 Mbytes".
5) Change your base port value to "8192". Apply your changes.
Note: “Total Available Memory (Current)" shows your current TDV Server memory configuration.
"Total Available Memory (On Server Restart)" shows your future TDV Server memory configuration. This only takes affect when you restart the TDV Server though.
6) Click on the OK button to close the pop-up window.
7) Logout of the TDV Studio client.
8) Stop the TDV Docker container where your TDV Server is running
docker stop <tdv-container-name>
9) Now start a new TDV Docker container with the new server memory value and reuse the TDV Docker volume used for the container from step #8.
\docker run -itd -p 10300:10300 -p 10301:10301 -p 10302:10302 -p 10303:10303 -p 10304:10304 -p 10305:10305 -p 10306:10306 -p 10400:10400 -p 10401:10401 -p 10402:10402 -p 10403:10403 --mount type=volume,source=tdv-vol,target=/opt/TIBCO --cpus=2.000 -m=16g --name tdv_new myrepo/tdv:8.4 tdv.server
 
Note: The above example expects a valid tdv-vol, default docker network bridge works on your Docker host, and that you already have a valid TDV Docker image that exists.
It is also expected that you reuse your TDV Container volume, otherwise your server memory and any other TDV metadata changes will be lost. Basically, if you specify a new TDV volume, then the TDV Container will create a brand new, default TDV Container based on your TDV Docker image defaults (i.e. default "admin" user password, base port and server settings).
Configure external volume for local persisted file data sources (e.g. csv, xml, txt)
To allow your TDV Docker container to introspect and query data from a locally persisted flat file data sources, then you will need to transfer those files into your TDV Docker container's volume.
Example (introspect a flat file csv file stored on the TDV Container's volume):
1. sudo cp <flat-file-csv> /var/lib/docker/volumes/<tdv-container-volume-name>/_data/TDV_Server_<tdv-version>/tmp
Note: This example expects a valid tdv-vol, default docker network bridge works on your Docker host, and that you already have a valid TDV Docker container that exists and is running.
See References: for more details regarding <tdv-container-volume-name>.
2. docker exec -it <tdv-container-name> ls -al TDV*/tmp/*.csv # validate TDV container can see the new file.
3. Use TDV Studio Client to introspect and query new csv file.
- Go to File -> New -> Data Source -> File-Delimited
- Provide "name", select "Local File System" with "Root Path" /opt/TIBCO/TDV_Server_<tdv-version>
- Leave all other settings with the default values.
- Click "Create & Introspect" button.
- Open "name" data source. Click on "Show Contents" to query data in csv file data source.
Configure data source with 3rd party JDBC driver (type 4)
TDV Data sources may require 3rd party JDBC drivers (type 4).
This section is to cover how to install such drivers in your TDV Docker container.
Example (install Oracle 3rd party JDBC type 4 driver for Oracle 11g):
1. Find the latest Oracle 12g JDBC driver (type 4) drivers (e.g. ojdbc10.jar and xdb.jar).
See the Oracle Adapter Guide for details on where to get this driver and how to configure it for your TDV Container.
2. Stop the TDV Docker container where your TDV Server is running
docker stop <tdv-container-name>
3. Install Oracle JDBC type 4 drivers in your TDV Container
sudo cp ojdbc10.jar /var/lib/docker/volumes/<tdv-container-volume-name>/_data/TDV_Server_<tdv-version>/conf/adapters/system/oracle_19c_thin_driver
 
sudo cp xdb.jar /var/lib/docker/volumes/<tdv-container-volume-name>/_data/TDV_Server_<tdv-version>/conf/adapters/system/oracle_19c_thin_driver
Note: The above example expects a valid tdv-vol, default docker network bridge works on your Docker host, and that you already have a valid TDV Docker container that exists and is not running.
See References: for more details regarding <tdv-container-volume-name>.
4. Start the TDV Docker container where your TDV Server is running
docker start <tdv-container-name>
5. Validate that the TDV Docker container has the new file.
docker exec -it <tdv-container-name> ls -al TDV*/conf/adapters/system/oracle_19c_thin_driver/
6. Check your TDV Docker container server log for acknowledgement that you have installed the JDBC driver for your "Oracle 19c (Thin Driver)" DV adapter.
docker exec -it <tdv-container-name> /bin/bash
$ cd TDV*/logs
$ grep -i "Oracle 19c" cs_server.log
7. The output of step 6 will show before and after loading of your "Oracle 19c" DV adapter. If the installation was successful, then the DV adapter will have a "loaded" message instead of the following "has not been installed" message (shown below) that was displayed before 3rd party drivers were installed for "Oracle 19c" DV Adapter
INFO [main] 2020-03-30 22:07:51.134 +0000 DbUtil - The adapter for 'Oracle 19c (Thin Driver)' has not been installed. For details on adapter installation, see the Installation Guide.
A sample message of successful installation:
INFO [main] 2020-03-30 17:11:08.222 -0700 JdbcDriverClassLoaderUtil - Adapter: Oracle 19c (Thin Driver) loaded from /opt/TIBCO/TDV_Server_<tdv-version>/conf/adapters/system/oracle_19c_thin_driver
8. Once the "loaded" message is seen you can create, introspect and load data from your Oracle 19c DV Adapter.
Configure data source with 3rd party JDBC driver (type 3)
TDV Data sources may require 3rd party JDBC drivers (type 3). This section describes how to install such drivers in your TDV Docker container.
Example (install SAP JCo 3rd party JDBC type 3 driver for linux x64 platforms:
1. Find latest SAP JCo JDBC type 3 driver download from SAP.
See the TDV User Guide “Installing the SAP Java Connector Library” section for more details on where to download that driver.
2. Install SAP JCo JDBC type 3 driver (linux x64) from SAP in your TDV Container. Refer to the TDV User Guide "Installing SAP JCo on UNIX" section for more details on how to install the linux x64 version of this driver.
sudo cp <sap-cjo-tgz-file> /var/lib/docker/volumes/<tdv-container-volume-name>/_data/TDV_Server_<tdv-version>/tmp
Note: The above example expects a valid tdv-vol, default docker network bridge works on your Docker host, and that you already have a valid TDV Docker container that exists and is running.
See References: for more details regarding <tdv-container-volume-name>.
3. Run the following commands:
docker exec -it <tdv-container-name> /bin/bash
$ cd TDV*/jdk
$ ./bin/jlink --module-path jmods --add-modules java.desktop --output ../jre
$ cd ../tmp
$ tar zxvpf <sap-jco-tgz-file>
$ mkdir -p ../jre/lib/ext
$ cp sapjco3.jar ../jre/lib/ext
$ mkdir -p ../jre/lib/amd64
$ cp libsapjco3.so ../jre/lib/amd64
$ cd /opt/TIBCO/TDV_Server_<tdv-verson>
$ export LD_LIBRARY_PATH=/opt/TIBCO/TDV_Server_<tdv-version>/jre/lib/amd64
$./jdk/bin/java -Djava.library.path=$LD_LIBRARY_PATH -jar jre/lib/ext/sapjco3.jar
Output of this SAP JCo test command should show version info about this SAP JCo driver. There should be no error messages at this point.
4. Stop the TDV Docker container
docker stop <tdv-container-name>
5. Start the TDV Docker container
docker start <tdv-container-name>
6. Check your TDV Docker container server log to ensure that you have installed the JDBC driver for your “SAP” DV adapter.
docker exec -it <tdv-container-name> /bin/bash
$ cd TDV*/logs
$ grep -i "SAP" cs_server.log
7. The output of step 6 will show before and after loading of your “SAP” DV adapter. If the installation was successful, then the DV adapter will have a “loaded” message instead of the following “has not been installed” message
INFO [main] 2020-03-30 22:07:51.134 +0000 DbUtil - The adapter for 'SAP' has not been installed. For details on adapter installation, see the Installation Guide.
After 3rd party drivers installed for “SAP” TDV Adapter, you will see the following message:
 
INFO [main] 2020-03-30 17:11:08.222 -0700 JdbcDriverClassLoaderUtil - Adapter: SAP loaded from /opt/TIBCO/TDV_Server_<tdv-version>/apps/dlm/app_ds_sap
8. Once you get the “loaded” message, you can create, introspect and load data from your SAP DV Adapter