ibm-odm-prod

by joaquinito2051

Helm chartv26.0.6App 9.6.0.0-IF006Apache-2.0

IBM Operational Decision Manager License By installing this product you accept the following license terms: https://www14.software.ibm.com/cgi-bin/weblap/lap.pl?li_formnum=L-QZRU-3U522K

About this chart

ODM for production Helm chart (ibm-odm-prod)

The IBM® Operational Decision Manager (ODM) chart ibm-odm-prod is used to deploy a production-ready cluster in IBM Kubernetes environments.

Introduction

ODM is a tool for capturing, automating, and governing repeatable business decisions. You identify situations about your business and then automate the actions to take as a result of the insight you gained about your policies and customers. For more information, see ODM in knowledge center.

Table of Content

  • Chart Details
  • Prerequisites
  • Installing the Chart
  • Chart Requirements
  • Security Requirements
  • Configuration
  • Limitations
  • Documentation

Chart Details

The ibm-odm-prod Helm chart is a package of preconfigured Kubernetes resources that bootstrap an ODM deployment on a Kubernetes cluster. Configuration parameters are available to customize most aspects of the deployment. The default values serve as examples but are appropriate to a production environment and can be used as is.

The ibm-odm-prod chart deploys five containers corresponding to the optional internal database server and the four ODM services:

  • Decision Center Business Console
  • Decision Server Console
  • Decision Server Runtime
  • Decision Runner

The ibm-odm-prod chart supports the following options for persistence:

  • PostgreSQL as an internal database. This is the default option. Persistent Volume (PV) is required if you choose to use an internal database. PV represents an underlying storage capacity in the infrastructure. PV must be created with accessMode ReadWriteOnce and storage capacity of 5Gi or more, before you install ODM. You create a PV in the Admin console or with a .yaml file. This internal database is only suitable for prototyping and not for production.

  • PostgreSQL, Db2, Microsoft SQL Server or Oracle as an external database. If you specify a server name for the external database, the external database is used otherwise the internal database is used. Before you select this option, you must have an external PostgreSQL, Db2, Microsoft SQL Server or Oracle database up and running.

Architecture

The following architectures are supported:

  • amd64
  • arm64
  • ppc64le
  • s390x

Prerequisites

  • Kubernetes 1.28+

  • Helm aligned with the Kubernetes version.

  • One PersistentVolume needs to be created prior to installing the chart if internalDatabase.persistence.enabled=true and internalDatabase.persistence.dynamicProvisioning=false. In that case, it is required that the securityContext.fsGroup 26 has read and write permissions on the postgres data directory. You can update the permissions by mounting the volume temporarily or accessing the host machine and performing the following commands:

    chown -R 26:26 /var/lib/pgsql/data
    chmod -R ug+rw /var/lib/pgsql/data
    

    Refer to Internal Storage Requirements section for more information.

  • To preserve sensitive data, you must create a secret that encapsulates the database user and password before you install the Helm release.

    kubectl create secret generic my-odm-db-secret \
            --from-literal=db-user=<user-name> \
            --from-literal=db-password=<password>
    

    For details, refer to Configuring the database.

  • Ensure you have a good understanding of the underlying concepts and technologies:

    • Docker, container
    • Kubernetes
    • Helm chart, Helm commands
    • Kubernetes command line tool
  • Before you install ODM for production, you need to gather all the configuration information that you will use for your release. For more details, refer to the Chart Requirements section.

  • To protect ODM Decision applications from voluntary disruptions such as draining a node for maintenance or scaling down a cluster, you might want to consider using PodDisruptionBudgets.

    A PodDisruptionBudget(PDB) is part of the Kubernetes API for specifying safety constraints on Pods during voluntary disruptions. PDB could ensure a minimum number of pods of a replicated application to be available and helps maintain the high availability of the application.

    To enable a PDB in an Operational Decision Manager installation, use the podDisruptionBudget parameter and specify the configuration. You can specify either maxUnavailable or minAvailable with an absolute number or a percentage.

    For example, if you have a deployment of Decision Server Runtime with 4 replicas and set maxUnavailable to 1, Kubernetes only allows at most 1 replica to be disrupted at a time.

    decisionServerRuntime:
      replicaCount: 4
      podDisruptionBudget:
        maxUnavailable: 1
    

Note:

PDB requires elevated privileges to apply to the cluster.

Do not apply PDB on the application that has only 1 replica such as Decision Server console. Node drains and upgrades could get stuck.

For more information, see Specifying a Disruption Budget for your Application.

Installing the Chart

The following instructions should be executed as namespace administrator.

  1. Create a secret to use the Entitled Registry

    • To get your entitlement key, log in to MyIBM Container Software Library with the IBMid and password that are associated with the entitled software.

    • In the Container software library tile, verify your entitlement on the View library page, and then go to Get entitlement key to retrieve the key.

    • Create the pull secret:

    kubectl create secret docker-registry icregistry-secret \
        --docker-server=cp.icr.io \
        --docker-username=cp \
        --docker-password="<API_KEY_GENERATED>" \
        --docker-email=<USER_EMAIL>
    

    Where:

    • API_KEY_GENERATED is the entitlement key from the previous step. Make sure you enclose the key in double-quotes.
    • USER_EMAIL is the email address associated with your IBMid.

    Note: The cp.icr.io value for the docker-server parameter is the only registry domain name that contains the images. You must set the docker-username to cp to use an entitlement key as docker-password.

  2. Add the public IBM Helm charts repository

    helm repo add ibm-helm https://raw.githubusercontent.com/IBM/charts/master/repo/ibm-helm
    helm repo update
    
  3. Check you can access ODM's chart

    helm search repo ibm-odm-prod
    
    NAME                    CHART VERSION	APP VERSION	DESCRIPTION
    ibm-helm/ibm-odm-prod   26.0.0       	9.6.0.0   	IBM Operational Decision Manager  License By in...
    
  4. Install the chart

    A release must be configured before it can be installed.

    Create a my-values.yaml file with the following parameters:

    license: true
    image:
      repository: cp.icr.io/cp/cp4a/odm
      pullSecrets:
      - icregistry-secret
    usersPassword: my-password
    internalDatabase:
      secretCredentials: my-odm-db-secret
      populateSampleData: true
    

    To install a release with a release name of my-odm-prod-release, use the following command:

    helm install my-odm-prod-release -f my-values.yaml ibm-helm/ibm-odm-prod
    

    Note: In OpenShift, you must set the following parameters --set customization.runAsUser='' --set internalDatabase.runAsUser='' and you can also set the parameter --set service.enableRoute=true. Alternatively, you can set these parameters in my-values.yaml:

    internalDatabase:
      runAsUser: ""
    customization:
      runAsUser: ""
    service:
      enableRoute: true
    

    Refer to Required Parameters for more information.

The package is deployed asynchronously in a matter of minutes, and is composed of several services. The release is an instance of the ibm-odm-prod chart: all the ODM components are now running in a Kubernetes cluster.

Required Parameters

  • Review the product license and set license=true to accept the license agreement.

  • If you want to use the default user access, you must define a password to be used by the default users like odmAdmin by setting the parameter usersPassword. Refer to Configuring user access to provide customized user access.

  • Specify the name of the secret, created in Prerequisites section, as the value for the parameters internalDatabase.secretCredentials or externalDatabase.secretCredentials, depending on the type of database you use.

  • If you are deploying on OpenShift, you must define the customization.runAsUser parameter as empty since the restricted scc requires to use an arbitrary UID.

  • Similarly, if you use the internal database, internalDatabase.runAsUser should be set empty. For more information, refer to the Red Hat OpenShift SecurityContextConstraints Requirements section.

  • Here is an example of my-values.yaml to install ODM on Openshift including a PostgreSQL internal database with samples:

    license: true
    image:
      repository: cp.icr.io/cp/cp4a/odm
      pullSecrets:
      - icregistry-secret
    usersPassword: my-password
    internalDatabase:
      secretCredentials: my-odm-db-secret
      populateSampleData: true
      runAsUser: ""
    customization:
      runAsUser: ""
    service:
      enableRoute: true
    

Refer to the Configuration section for advanced configuration. You can find the default values of all parameters in the ODM for production configuration parameters.

Using helm template

If you plan on using helm template command for ODM installation, add the --validate flag to validate your manifests against your Kubernetes cluster:

helm template my-odm-prod-release \
  --set license=true \
  --set image.pullSecrets=icregistry-secret \
  --set usersPassword=my-password \
  --set internalDatabase.secretCredentials=my-odm-db-secret \
  --set internalDatabase.populateSampleData=true \
  --validate \
  ibm-helm/ibm-odm-prod > my-values.yaml
kubectl apply -f my-values.yaml

Verifying the Chart

Navigate to your release and view the service details. For details, refer to Completing post-deployment tasks.

Getting started with business rules

This tutorial is for technical and business users who want an introduction to business rules authoring and management, with IBM Operational Decision Manager (ODM) running in a container environment.

Tracking ODM usage with the IBM License Service

IBM License Service

You must install the IBM License Service in your cluster in order to track your ODM usage.

Install the IBM License Service following the Installation section of the Manual installation without the Operator Lifecycle Manager (OLM) documentation.

For specific platforms such as Amazon Elastic Kubernetes Service (EKS), Google Kubernetes Engine (GKE), Azure kubernetes Service (AKS), and Red Hat OpenShift Kubernetes Service on IBM Cloud (ROKS), see the respective article at DecisionsDev/odm-docker-kubernetes repository for additional steps.

To retrieve the data, see Retrieving license usage data.

For more information about IBM Licensing Service, see License usage metering and reporting.

Usage Metering Service

Usage metrics of ODM on Kubernetes are collected with IBM® Usage Metering Service (UMS).

It is your responsibility to maintain compliance with the licensing terms and conditions. However, to audit the use of IBM software, UMS is used to capture business value metrics and send, automatically and periodically, compliance data for auditing purposes to SWC. For details, refer to Configuring the Usage Metering Service.

For specific platforms such as Amazon Elastic Kubernetes Service (EKS), Google Kubernetes Engine (GKE), Azure kubernetes Service (AKS), and Red Hat OpenShift Kubernetes Service on IBM Cloud (ROKS), see the respective article at DecisionsDev/odm-docker-kubernetes repository for additional steps.

Uninstalling the Chart

To uninstall and delete a release named my-odm-prod-release, use the following command:

helm delete my-odm-prod-release

The command removes all the Kubernetes components associated with the chart, except any Persistent Volume Claims (PVCs). This

Deploy ibm-odm-prod with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-odm-prod on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartibm-odm-prod is pinned at v26.0.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply