Installing custom SSL certificates

You can install custom SSL certificates to configure environment variables and to securely access the IBM® Db2® Intelligence Center container.

Before you begin

  • You must have your own SSL certificates, which include these files in PEM format:

    • tls.crt: The SSL certificate file without the passphrase.
    • tls.key: The corresponding private key for the certificate.
    Note: The format of both the certificate and key must match. If the certificate is in any other format, convert it to PEM format. Make sure that the file name for the SSL certificate is cert.pem, and the file name for the SSL certificate key is key.pem. File names are case-sensitive.
  • You can create the certification folder by completing these steps:

    • To create a folder, run mkdir -p /mycerts.
    • Move or copy the SSL certificate files to the folder /mycerts.
    • To storage mount, run -v /mycerts:/opt/ibm/console/certs.

About this task

Configure the environment variables for console credentials by creating a .env_list file with the following format and adding the required values.

  1. Create a file named .env_list.
  2. Open the file for editing by using the following command:
    vi .env_list
  3. Add the following values based on your needs:
    
    LICENSE=accept
    ADMIN_NAME=admin
    ADMIN_PASSWORD=admin
    CONSOLE_HOSTNAME={eg: mydic.com}
    • CONSOLE_HOSTNAME specifies the console access hostname. The default is null.
    • ADMIN_NAME specifies the username of the administrator. The default is admin.
    • ADMIN_PASSWORD specifies the password of the administrator. The default is an auto-generated password (8 characters).

Procedure

  1. Run the following docker run command to mount the directory that contains your certificates and the wanted storage for the Docker container:
    docker run -d --name mydic \
       -p 11081:8443 \
       --env-file <env list>  \
       -v <dic storage dir>:/mnt \
       -v <certs dir>:/opt/ibm/console/certs \
       -v /etc/localtime:/etc/localtime:ro \
       icr.io/cpopen/db2console/db2ic:latest
    
  2. When the SSL certificates are deployed on the container, the following message appears in the logs:
    script.log 2020-04-14 04:32:26 : Prod machine, using CA certs...
    s!SSLDIRHERE!/opt/ibm-datasrvrmgr/certs/cert.pem!g
    s!KEYDIRHERE!/opt/ibm-datasrvrmgr/certs/key.pem!g