Creating new database connections and updating database connections on a running container
The cqreg add_dbset command runs via Docker run command by passing the database parameters as environment variables.
Before you begin
Note: Using HCL Compass on Docker and Docker Compose is
not supported when deployed in a production environment. To use HCL Compass in a container in a production
environment, deploy HCL Compass to a
Kubernetes environment.
For more information, see Deploying HCL Compass on SoFy Sandbox.
About this task
docker
exec
command after the HCL Compass server container has been created.
Ensure that the schema repository and user databases are already created by either the
Maintenance tool or the Designer.Note: After the HCL Compass RESTful API container instance
has been started, any new database connections are updated in the HCL Compass login page after the next server
poll. This can range from 1ms to 900000ms (15 minutes). If an administrative user creates an
HCL Compass RESTful API container
instance and then tries to set a new database connection set after the instance is running,
the login page shows the new database connection set after the next
repos-refresh-time
occurs. The default value is 15 minutes.
$ cqreg add_dbset -v/endor db_vendor [ -s/erver db_server ] [ -d/atabase db_name ] [ [ -u/ser user -p/assword password ] ] [ -dbset dbset_name ] [ -co connect_options ] [ -help ] [ -effort_only ] [ -force ] [ -verbose | -errors ] [ -home cq_home ] [ -cq_databases ]
Procedure
-
You must add the mapping database server IP address and server name to the
/etc/host
file before running thecqreg add_dbset
command$ docker exec -it [container_name] bash -c "echo '[db_server_IP_address] [db_server_host_name]' >> /etc/hosts"
-
Add connections for the database.
Example for Oracle database:
$ docker exec -it hcl-compass /opt/ibm/clearquest/bin/cqreg add_dbset cqreg add_dbset -v Oracle -s cqtest1 -d CQ1 -u admin -p admin_pwd -dbset CQ_DEV1
Example for SQL Server database:$ docker exec -it hcl-compass /opt/ibm/clearquest/bin/cqreg add_dbset -v SQL_Server -s cqtest2 -d msitea -u admin -p pwd -dbset CQ_DEV2
Example for DB2 database:$ docker exec -it hcl-compass /opt/ibm/clearquest/bin/cqreg add_dbset -v DB2 -s db2tcpnode -d msiteb -u admin -p pwd -dbset CQ_DEV3