The Db2® Warehouse client container provides a
remote shell environment with multiple tools that you can use to migrate to, operate, and maintain
Db2 Warehouse.
Before you begin
Deploy Db2 Warehouse.
Make sure that you can connect to the BLUDB database as the bluadmin user.
The client image container is in IBM® Cloud Container Registry. To pull a Db2 Warehouse container image, see Getting container images.
If you can't access the containers in IBM Cloud Container Registry because
your deployment machine doesn't have access to the internet, contact your IBM Support representative.
About this task
To perform this task, you require root authority.
You can deploy the client container on the same node where you deployed the product image
container or somewhere else.
Procedure
-
Log in to Docker or Podman using your API key:
echo <apikey> | docker login -u iamapikey --password-stdin icr.io
echo <apikey> | podman login -u iamapikey --password-stdin icr.io
where
<apikey>
is the API key that you created as a prerequisite in
Getting container images.
-
Issue the applicable docker run or podman run command.
The /mnt/tools path in the -v /mnt/tools:/mnt/clientdir
parameter is only an example; you can use any POSIX-compliant file system.
- For a container for POWER® LE hardware:
docker run -dit --net=host -v /mnt/tools:/mnt/clientdir [-v /mnt/clusterfs/home/db2inst1:/mnt/blumeta0/home/db2inst1] --name=client [-e REMOTE_DB=server[:port]] icr.io/obs/hdm/db2wh_ce:v11.5.6.0-db2wh_client-ppcle
podman run -dit --net=host -v /mnt/tools:/mnt/clientdir [-v /mnt/clusterfs/home/db2inst1:/mnt/blumeta0/home/db2inst1] --name=client [-e REMOTE_DB=server[:port]] icr.io/obs/hdm/db2wh_ce:v11.5.6.0-db2wh_client-ppcle
- For a container for x86 hardware:
docker run -dit --net=host -v /mnt/tools:/mnt/clientdir [-v /mnt/clusterfs/home/db2inst1:/mnt/blumeta0/home/db2inst1] --name=client [-e REMOTE_DB=server[:port]] icr.io/obs/hdm/db2wh_ce:v11.5.6.0-db2wh_client-linux
podman run -dit --net=host -v /mnt/tools:/mnt/clientdir [-v /mnt/clusterfs/home/db2inst1:/mnt/blumeta0/home/db2inst1] --name=client [-e REMOTE_DB=server[:port]] icr.io/obs/hdm/db2wh_ce:v11.5.6.0-db2wh_client-linux
Specify the -v /mnt/clusterfs/home/db2inst1:/mnt/blumeta0/home/db2inst1
parameter if you are planning to use the dbload command from the client container
to load locally (if you are loading from the same host machine where the Db2 Warehouse database is located). For information about
loading locally, see dbload command.
You can use the -e
REMOTE_DB=server[:port] parameter to catalog the
remote Db2 Warehouse database as part of the deployment
process. For server, specify the host name or IP address of the remote Db2 Warehouse database server. If you do not specify a value
for port, 50000 is used. If you do not specify the -e
REMOTE_DB=server[:port] parameter in this step, you
must run the db_catalog command before you use the container tools. If you want
to catalog the remote database with SSL support, you must use the db_catalog
command.
-
Review the log output to verify that the deployment is progressing successfully. Issue the
following command:
docker logs --follow client
podman logs --follow client
Sample
output follows:
#######################################################################
### IBM Db2 Warehouse client container was deployed successfully ###
#######################################################################
* If you used docker logs to monitor progress,
detach from the console by pressing Ctrl+C.
* To get a command line from a prompt on the host,
issue the following command:
docker exec -it <client container name> cli
#######################################################################
-
Exit the logs by pressing Ctrl+C.
-
After you deploy the container, connect to it by issuing the following command:
docker exec -it client cli
podman exec -it client cli
What to do next
If you no longer require the container, stop it and remove it by issuing the following
Docker or Podman commands:
docker stop client
docker rm client
podman stop client
podman rm client