As in my previous blog article Build and run the Cognos Analytics Gateway as a Docker Container in an on-prem environment,
this one is an extension to containerize the Dispatcher component in an on-premises environment. So the purpose of this blog article is to provide a step-by-step guide on building a docker image and container using an on-prem installation environment. The benefits will include the high availability when a dispatcher becomes unresponsive or corrupt, there is no need to re-install but simply delete the container and re-create a new container within seconds. Try it in a lab environment and test it yourselves!Architecture:Environment:
CAOIDC1.fyre.ibm.com - Dispatcher/CM (Windows 2016)
ProxyServer1.fyre.ibm.com - Docker Host (CentOS 7) running the Dispatcher(Application Tier) container.Prerequisite:
Some prep work will be required and that is to do an Application Tier Only installation in a test server and grab the /configuration/cogstartup.xml file.
Steps are as follows:
1. Copy the installation files, jdbc driver and cogstartup.xml file to the /tmp directory from the CentOS Docker Host
NB: The mssql-jdbc-8.2.2.jre8.jar is the jdbc driver used to connect to the CM(Content Manager) component from CAOIDC1 that connects to the ContentStore Database on MSSQL Server 2016.
2. Create a properties file to set the unattended installation flags for the Dispatcher(Application Tier) called rs.properties and add the following lines:
3. Save the file in the current directory /tmp so the list of files are as follows:
NB: With the jdbc driver mssql-jdbc-8.2.2.jre8.jar adjust the file permissions using the command line:
chmod 777 mssql-jdbc-8.2.2.jre8.jar
4. Now, build the docker image by creating the file Dockerfile and adding the following instructions:
5. Edit the /tmp/cogstartup.xml and change the URI's to the local Docker Host server external ip address except the CM URI which needs to be set to the CAOIDC1 server running the CA 11.1.5 installation.
NB: I used ip address in this lab
6. Now, run the following command to build the docker image:docker image build -t careportserver11.1.5 .
7. Once finished check the image is listed by executing the docker command:docker images
8. Now, build the docker container by executing the following docker command:docker container run -d --name=careportserver11.1.5 -p 80:80 -p 9300:9300 -p 1433:1433 -p 9301:9301 -p 5701:5701 -p 4300:4300 -t careportserver11.1.5
9. List the containers by executing the following docker command:docker container ps
10. Now, connect to the containers shell and update the host file to include the public ip address of the docker host server (CentOS) by executing the following docker command:docker container exec -it <containerID> /bin/bash
11. Then run the command line to edit the hosts file and add the ip address and host name (DNS) and save it:vim /etc/hosts
Now the next stage is to save the configuration and start the service.
11. Exit from the container by typing 'exit' and then run the following docker command:docker container exec -it <containerID> cogconfig.sh -config
Then,docker container exec -it <containerID> cogconfig.sh -s
12. Once finished check the processes have started by running the following docker commands:docker container exec -it <containerID> ps -ef | grep cognos
Note the processes have all started
Now go to the CAOIDC1 server and log in and check the list of dispatchers and then test the dispatcher connection:
13. Now create a Dynamic (JDBC) Connection to a MSSQL Server Database and test the connection:Additional Information:Docker