Deploying the IBM Db2 Warehouse client container (Windows or Mac)

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 IBM® Db2 Warehouse (Windows or Mac).

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 must have administrative authority.

You can deploy the client container on the same node where you deployed the product image container or somewhere else.

Procedure

  1. Log in to Docker by using your API key:
    echo <apikey> | docker login -u iamapikey --password-stdin icr.io
    where <apikey> is the API key that you created as a prerequisite in Getting container images.
  2. Issue the following command:
    docker run -itd --net=value -v db2wh_vol:/mnt/clientdir --name=client [-e REMOTE_DB=Db2wh] icr.io/obs/hdm/db2wh_ce:v11.5.6.0-db2wh_client-linux
    where the value of the --net parameter is host if you deployed the image container on a remote host or is db2wh_net if you are deploying the client container on the same machine where you deployed the image container.
    You can use the -e REMOTE_DB=Db2wh parameter to catalog the remote Db2 Warehouse database as part of the deployment process. If you do not specify the -e REMOTE_DB=Db2wh parameter in this step, you must run the db_catalog command before you use the container tools.
    Tip: When you issue the docker run command for the client container on Windows or Mac, you use the image container name (Db2wh) as the host name.
  3. Review the log output to verify that the deployment is progressing successfully. Issue the following command:
    docker 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
    #######################################################################
  4. Exit the Docker logs by pressing Ctrl+C.
  5. After you deploy the container, connect to it by issuing the following command:
    docker exec -it client cli

What to do next

If you no longer require the container, stop it and remove it by issuing the following commands:

docker stop client
docker rm client