Accessing IBM db2 in an OpenShift Cluster

Dec 8, 2023 | Maximo Configuration, Resource Library, TRM Blog | 0 comments

John Q. Todd

Sr. Business Consultant/Product Researcher

Total Resource Management (TRM), Inc.

Andrew Mahen

Director, Product Development

Total Resource Management (TRM), Inc.

One common element of implementing IBM Maximo Application Suite (MAS) is the need to learn some new terminology around the RedHat OpenShift operating system that MAS is required to run on. RHOS and its foundational RedHat Enterprise Linux is not new technology in our universe, but it may be new to you and your IT operations. Aside from the technical information, this article is meant to expose you to several new terms (in bold) that will help you understand more about MAS in a RHOS/OCP environment.

One of the most common requests is for a small group of database administrators to have direct access to the underlying database of the EAM system, in this case IBM db2 for MAS. These admins might be writing reports against the database or performing database actions that can only be performed via a direct connection.

Caution: There was a time in history when tasks needed to be performed within the underlying database, necessitating connections such as these. It has been many years now where almost any “database” task that results in changes to the database can be performed via the Maximo/MAS user interface as an Administrator. The question should always be asked, “What exactly are you doing to the database with this connection, and why?”

Your environment

Let’s assume that you have implemented MAS into a RHOS environment using the “MAS Devops” collection/scripts as provided by IBM. (“Build rocket ship. Fly to the Moon. It’s only two steps, right?”) These scripts are written using Ansible and bring together a number of playbooks into a collection. Ansible is the Python-based, command line, IT automation application used in part to deploy software, configure systems, and run workflows reliably and repeatedly. The MAS Devops Ansible Collection (for MAS 8.10+) is an integral part of IBM MAS/RHOS.

Something to get used to is running applications and things like Ansible collections as Docker containers on your administrative or development computers. By running the collections within Docker (or tools like Podman) you need not install anything else on your machine. IBM provides an ibmmas/cli image to assist with this.

Getting to the database

No matter if the OpenShift environment running MAS is a full-up multi-Node instance or just a Single-Node (SNO) for development, the path to the underlying database is nearly the same. Your goal is to be able to provide a connection for that small group of admins who need to at least be able to read/query the database from their developer tools.

While logged into the RHOS Administrator console UI, locate the db2 Project (namespace), usually named “db2u.” Within that namespace, under Networking you will find a listing of Routes, one of which is related to the db2 database. It may look something like in the screen capture below:

You can also connect using this hostname AND port 443 with a certificate.

Using the Node IP and Service Port

Your next step is to locate the Service that the Route above is based upon.

The specific port that was configured is listed under “Service Port Mapping.” Again, if MAS Devops was used to setup the instance, there will be two ports defined… one for secure (SSL, that will require a certificate) and another for un-secure connections.

An important detail is to note that the Service has had “NodePort” access enabled. With this setting, the db2 instance can be accessed via the IP address of any of the OCP nodes, even if it is a single node as with SNO.

As a side note, you can execute CLI commands by way of the Terminal available within Pods to query the database as needed.

Wrap up

While the concept of providing a direct database connection to database administrators for enterprise application suites like IBM MAS is certainly not new, what is new is the methods or paths that MAS running on RHOS delivers. The key pieces of information we needed in the past are the same, they are simply in different locations and may use different terminology.

TRM has been implementing Maximo for over 30 years and has fully adopted the new IBM MAS product set. TRM is also a Cloud host, so we are uniquely qualified to assist you with your needs.

Share

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *