You can connect the application discovery service of an OCP deployment of Agile Service
Manager with an on-prem Db2 installation. This topic describes how to do so using TCPIP. You must
complete the TCPIP setup before completing the SSL setup.
Before you begin
Before
setting up the application discovery service for Agile Service Manager on OCP to run with an on-prem
version of Db2, you must download and install Db2 Version 11.5 Enterprise Server Edition. See the
Db2 documentation for more installation and configuration information.
About this task
Note: TCPIP (or insecure) mode is enabled by default when DB2 is installed.
Procedure
DB2 server prerequisites
-
On the Db2 server, and as the root user, configure 'archuser' by running
the following command:
useradd -g db2iadm1 -u 1010 -d /home/archuser -m archuser
chage -I -1 -m 0 -M 99999 -E -1 archuser
echo archuser:archuser | chpasswd
-
Obtain the sample code from here and paste it into the create_database.sh script.
-
As the db2inst1 user, create a database instance.
Run the following command:
./create_database.sh <name_of_instance>
In
the following example, the database is called
'taddm':
./create_database.sh taddm
OCP application discovery server configuration
-
On the OCP application discovery server, create a configuration file called
db2-secret.yaml, as in the following example:
apiVersion: v1
kind: Secret
metadata:
name: db2-secret
namespace: production
data:
DBARCHIVEUSER: YXJjaHVzZXI=
DBUSER: ZGIyaW5zdDE=
DB_ARCH_PASSWORD: YXJjaHVzZXI=
DB_PASSWORD: ZGIyaW5zdDE=
type: Opaque
Note: The values of the following parameters have to be base64
encoded:
- DBARCHIVEUSER
- Default value:
archuser
- DBUSER
- Default value:
db2inst1
- DB_ARCH_PASSWORD
- Default value:
archuser
- DB_PASSWORD
- Default value:
db2inst1
-
Create a secret that stores DB details by running the following command:
kubectl apply -f db2-secret.yaml
-
Populate the database details in the Netcool Operations Insight on Red Hat OpenShift Operator
properties.
The following sample shows the database parameters to connect the application discovery
service with the pre-configured database:
appDisco:
enabled: true
dburl : 'db2hostname.com'
dbsecret: 'db2-secret'
secure: false
certSecret: ''
- dburl
- The URL of the server on which DB2 is installed.
- dbsecret
- The name of the secret in the same namespace as the instance to be installed.
- It must contain the following keys:
- DBUSER
- The name of the DB2 user.
- DB_PASSWORD
- The password of the DB2 user.
- DBARCHIVEUSER
- The name of the DB2 archive user.
- DB_ARCH_PASSWORD
- The password of the DB2 archive user.
- secure
- 'False' if the connection to DB2 is insecure.
- certSecret
- Applicable only if 'secure' property is 'true'.