Deploying IBM Db2 Warehouse SMP on Windows or Mac system

You can deploy Db2® Warehouse SMP on a Windows or Macintosh system.

Before you begin

If you previously installed Db2 Warehouse on your current hardware, do not follow this procedure. Instead, redeploy Db2 Warehouse by following the procedure described in Redeploying IBM Db2 Warehouse on Windows or Mac.

Ensure that your Windows or Macintosh system meets the hardware prerequisites described in IBM Db2 Warehouse prerequisites for Windows or Mac.

Ensure that your Windows or Macintosh system meets the prerequisites described in Getting container images.

About this task

Where you carry out the following steps depends on how you plan to deploy the image container:
  • If you use the Docker for Mac app, carry out the steps from the terminal.
  • If you use the Docker for Windows app, carry out the steps in the Windows PowerShell in admin mode.
  • If you use Docker Toolbox, carry out the steps from the Docker CLI prompt, which you obtain by using the Docker Quickstart Terminal desktop shortcut.

Procedure

  1. Ensure that you have administrative authority on the host operating system.
  2. Clear your browser's cache.
  3. If you are using the Docker for Windows or Docker for Mac app, ensure that it is running.
  4. Refer to Configuration options and note any options whose default settings need to be overridden. Later in this procedure, you will be instructed to specify the new settings.
  5. 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.
  6. If you are using Docker Toolbox for this deployment, perform the following substeps:
    1. Delete the default VM by issuing the following command:
      docker-machine rm default
    2. Create a VM with sufficient memory and storage for the Db2 Warehouse image. The following command creates a machine with a 40 GB virtual disk, 4 GB of RAM, and 1 virtual CPU, but you can increase the values if your system supports them:
      docker-machine create -d virtualbox --virtualbox-disk-size "40000" --virtualbox-memory "4096" --virtualbox-cpu-count "1" default
    3. Exit the Docker CLI prompt and then obtain the prompt again by using the Docker Quickstart Terminal desktop shortcut.
  7. Create a network by issuing the following command:
    docker network create db2wh_net
  8. Ensure that the allocation of memory to the Docker container is sufficient by opening Docker Settings > Advanced and adjusting the slider to show a minimum of 4 GB of memory.
  9. Issue one of following docker run commands to pull, create, and initialize the latest Db2 Warehouse container.
    Note: If necessary, add to this command one -e parameter for each configuration option that is to be set during deployment. See Configuration options for more information. For example, both enable Spark and use row-organized storage, include the following option settings in your docker run command:
    -e DISABLE_SPARK=NO -e TABLE_ORG=ROW
    Issue the following docker run command:
    • For a Db2 Warehouse Enterprise Edition container:
      docker run -itd -p 8443:8443 -p 50000-50001:50000-50001 -p 389:389 --net=db2wh_net --privileged=true --name=Db2wh -v db2wh_vol:/mnt/bludata0 -v db2wh_vol:/mnt/blumeta0 icr.io/obs/hdm/db2wh_ee:v11.5.6.0-db2wh-linux
  10. Issue the following command to check whether the deployment is progressing successfully:
    docker logs --follow Db2wh
  11. After the deployment finishes, a message indicates the web console URL and login information. Note this information for later.
  12. Exit the Docker logs by pressing Ctrl+C.
  13. Set a new password for the bluadmin user by issuing the following command:
    docker exec -it Db2wh setpass new_password
  14. Log in to the web console using the web console URL that was displayed in Step Deploying IBM Db2 Warehouse SMP on Windows or Mac system. The URL has the form https://IP_address:8443.