You can deploy Db2® Warehouse SMP on a Windows or Macintosh system.
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
-
Ensure that you have administrative authority on the host operating system.
-
Clear your browser's cache.
-
If you are using the Docker for Windows or Docker for
Mac app, ensure that it is running.
-
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.
-
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.
-
If you are using Docker Toolbox for this deployment, perform the following substeps:
- Delete the default VM by issuing the following command:
docker-machine rm default
- 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
- Exit the Docker CLI prompt and then obtain the prompt again by using the Docker Quickstart
Terminal desktop shortcut.
-
Create a network by issuing the following command:
docker network create db2wh_net
-
Ensure
that the allocation of memory to the Docker container is sufficient by opening Docker and adjusting the slider to show a minimum of 4 GB of memory.
-
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:
-
Issue the following command to check whether the deployment is progressing successfully:
docker logs --follow Db2wh
-
After the deployment finishes, a message indicates the web console URL and login information.
Note this information for later.
-
Exit the Docker logs by pressing Ctrl+C.
-
Set a new password for the bluadmin user by issuing the following command:
docker exec -it Db2wh setpass new_password
-
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.