Database configuration

IBM Process Mining requires MongoDB for IBM Process Mining and Db2 (or optionally Mysql) forIBM Task Mining. By default, the IBM Process Mining Operator automatically installs an embedded MongoDB and Db2 without the configuration for backup, support, and high availability. Therefore, the deployed environment is suitable only for the demonstration or evaluation of the use cases. For production environments, where performance is more important, configure the instance with a self-managed database.

MongoDB

Enter the following section in your IBM Process Mining CRD to enable an external instance of MongoDB.

  • database
    • This is the name of the MongoDB database in the MongoDB server.
  • user
    • This is user account which has read and write access to the database.
  • credentials This section contains secret and password information as follows:
    • secretname is the name of the Secret.
    • passwordkey is the key that contains the encoded password.
  • host
    • Hostname of the MongoDB server
  • port
    • The port on which the database is listening

Enter the following section in your CRD to enable an external instance of MongoDB

apiVersion: processmining.ibm.com/v1beta1
kind: ProcessMining
metadata:
  name: <instance name>
  namespace: <namespace>
spec:
  license:
    accept: true
    cloudPak: IBM Cloud Pak for Business Automation
  defaultStorageClassName: rook-cephfs
  processmining:
    storage:
        database: 
          external: 
            host: 'mongo.mynamespace.svc'
            port: 27017
            database: processmining
            user: 'myuser'
            credential: 
              secretname: 'example'
              passwordkey: password

In addition, you can define a custom connection to manually specify additional option that is required in the server. For example, see the following configuration example.

    database:
       class: 'rook-cephfs'
       external: 
         host: 'xxxx'
         port: 27017
         database: openshift
         user: 'processminingusr'
         connectionstring: 'mongodb://processminingusr:<PASSWORD>@dbserver.mydomain.com:27017/?authSource=openshift&tls=true'
         credential: 
           secretname: 'pm1-mongo-external'
           passwordkey: pwd

If the external section is present, the embedded MongoDB is not installed and the PVC for the embedded MongoDB instance is not created.

MySQL or Db2

Enter the following section in your IBM Process Mining CRD to enable an external instance of MySQL or Db2.

  • type
    • Type of the database, allowed values are mysql or db2
  • database
    • Name of the database in the db server
  • user
    • This is user account which has read and write access to the database.
  • credential
    • This section contains secret and password information as follows:
    • secretname is the name of the Secret.
    • passwordkey is the key that contains the encoded password.
  • host
    • Hostname of the server
  • port
    • The Port on which the database is listening
  • schema
    • Only for Db2 is required to put the schema name used. Usually is equal to username; must be uppercase.
  • ssl
    • If true an ssl connection is activated. In order to connect to Db2 provided by IBM Cloud Saas ssl connection is required.

Enter the following section in your CRD to enable an external instance of MySQL.

apiVersion: processmining.ibm.com/v1beta1
kind: ProcessMining
metadata:
  name: <instance name>
  namespace: <namespace>
spec:
  license:
    accept: true
    cloudPak: IBM Cloud Pak for Business Automation
  defaultStorageClassName: rook-cephfs
  taskmining:
    storage:
        database: 
          dbtype: 'mysql'
          external:   
            host: 'dbinstance.mynamescape.svc'
            port: 3306
            database: taskmining
            user: 'myuser'
            schema: ''
            credential: 
              secretname: 'example'
              passwordkey: password

Or enter the following section in your CRD to enable an external instance of Db2.

apiVersion: processmining.ibm.com/v1beta1
kind: ProcessMining
metadata:
  name: <instance name>
  namespace: <namespace>
spec:
  license:
    accept: true
    cloudPak: IBM Cloud Pak for Business Automation
  defaultStorageClassName: rook-cephfs
  taskmining:
    storage:
        database: 
          dbtype: 'db2'
          external: 
            host: 'dbinstance.mynamescape.svc'
            port: 50000
            database: pmdb
            user: 'taskminer'
            schema: 'TASKMINER' #usually is equal to username; must be uppercase
            credential: 
              secretname: 'example'
              passwordkey: password
            ssl: false

When the external section is present, the embedded Db2 is not installed and the PVC is not created.

Warning: If you are providing an external instance of MySQL, you must verify the following configuration:

  • The global parameter sql_mode must contain the option ONLY_FULL_GROUP_BY.

If this parameter is not present, you must log in as root to the instance and run the following SQL statement:

SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'))

Data encryption

When an external database is adopted for a production environment, it is advised to apply encryption at rest on the stored data. The workload is then tested when it is connected with the encrypted database.