ibm-odm-dev

by joaquinito2051

Helm chartv22.2.0App 8.11.1.0Apache-2.0

IBM Operational Decision Manager for Developers License By installing this product you accept the following license terms: http://www14.software.ibm.com/cgi-bin/weblap/lap.pl?li_formnum=L-ASAY-CE4DNS

About this chart

ODM for developers Helm chart (ibm-odm-dev)

The IBM® Operational Decision Manager (ODM) chart ibm-odm-dev is used to deploy an ODM evaluation 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-dev Helm chart is a package of preconfigured Kubernetes resources that bootstrap an ODM deployment on a Kubernetes cluster. Configuration parameters are available to customize some aspects of the deployment. However, the chart is designed to get you up and running as quickly as possible, with appropriate default values. If you accept the default values, sample data is added to the database as part of the installation, and you can begin exploring rules in ODM immediately.

The ibm-odm-dev chart deploys a single container containing 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-dev chart supports the following options for persistence:

  • H2 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 2Gi or more, before you install ODM. You create a PV in the Admin console or with a .yaml file.
  • PostgreSQL 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 database up and running.

By default, the internalDatabase.populateSampleData parameter is set to true, which adds sample data to the database. A decision service is created in Decision Center and is also deployed to Rule Execution Server. The sample data can be used to test your newly created release.

Note: The ability to populate the database with sample data is available only when using the internal database and the persistence locale for Decision Center is set to English (United States). Sample data is not available for the external database.

Architecture

  • Three major architectures are now available for ODM for developers Edition worker nodes:
    • AMD64 / x86_64
    • s390x
    • ppc64le

Prerequisites

  • Kubernetes 1.19+ with Beta APIs enabled

  • Helm 3.2 and later 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 1001 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 :1001 /config/dbdata/
    chmod -R ug+rw /config/dbdata/
    chmod o-t /config/dbdata/
    

    Refer to Internal Storage Requirements section for more information.

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 developers, you need to gather all the configuration information that you will use for your release. For more details, refer to the Chart Requirements section.

Installing the Chart

The following instructions should be executed as namespace administrator. Multiple instances can be deployed in the single cluster and in the single namespace.

  1. Add the ibm chart repository:

    $ helm repo add ibm-helm https://raw.githubusercontent.com/IBM/charts/master/repo/ibm-helm
    
  2. Install the chart

    A release must be configured before it is installed.

    To install a release with the default configuration and a release name of my-odm-dev-release, use the following command:

    $ helm install my-odm-dev-release \
    --set license=accept \
    --set usersPassword=my-password \
    ibm-helm/ibm-odm-dev
    

    Tip: List all existing releases with the helm list command.

The release is an instance of the ibm-odm-dev chart: all the ODM components are now running in a Kubernetes cluster.

Required parameters

  • Review and accept the product license, by setting the following parameter:

    • license=view to print the license agreement (default value)
    • license=accept to accept the license
  • Define a password to be used by the default users like odmAdmin by setting the parameter usersPassword.

    Note: To define the users and customize the user access, refer to Configuring user access

Refer to the Configuration section for advanced configuration. You can find the default values of all parameters in the ODM for developers 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-dev-release \
  --set license=accept \
  --set usersPassword=my-password \
  --validate \
  ibm-helm/ibm-odm-dev > my-values.yaml
$ kubectl apply -f my-values.yaml

Verifying the Chart

Port Exposed

The pod exposes only one port externally:

FromToPortProtocolFunction
End UserApplication9060HTTPCommunication from the end user to the front end UI of the application

Accessing ODM

  1. Navigate to the ODM welcome page

The welcome page of IBM Operational Decision Manager Developer Edition displays with links to the ODM components and other resources.

  • Option 1: Using a route

    If you installed IBM Operational Decision Manager Developer Edition in Openshift, a route to access the welcome page will be automatically created. The page is accessible through this url http://<route-hostname>.

    You can find the route hostname by using the following command:

    $ oc get routes
    
  • Option 2: Using a Nodeport service

    On other kubernetes clusters, a Nodeport service is automatically created to access the welcome page. The page is accessible through this url http://<public-node-ip>:<node-port>.

    Refer to your cluster documentation to get the <public-node-ip> which is the public IP address of your node. Then you can get the <node-port> value by using this command:

    $ kubectl get services
    
  • Option 3: Using an Ingress controller

    Kubernetes Ingress controllers are the original mechanism for exposing your cluster to external access. Each controller implementation is platform-specific.

    For more information about Ingress, see the Kubernetes documentation.

    You can create an Ingress object to access the welcome page using the following sample:

    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: my-odm-dev-release-ingress
      annotations:
        kubernetes.io/ingress.class: nginx
        nginx.ingress.kubernetes.io/backend-protocol: HTTP
        nginx.ingress.kubernetes.io/affinity: cookie
    
    spec:
      tls:
      - hosts:
        - mycompany.com
      rules:
      - host: mycompany.com
        http:
          paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: my-odm-dev-release-ibm-odm-dev
                port:
                  number: 9060
    

    Then you will be able to access the ODM Welcome page with this URL: https://mycompany.com, after having edited your hosts file and added the correspondance between mycompany.com and the external IP provided by the Ingress controller.

  1. Click the Decision Center Business Console to open the service in a browser.

  2. If you accepted the default persistence, a sample project is available in your ODM release and you can explore and modify the rules and decision tables.

The Loan Validation sample is a decision service that determines whether a borrower is eligible for a loan. The decision service validates transaction data, checks customer eligibility, assigns a score, and computes insurance rates that are based on the assigned score.

Navigate to the Library tab of the Decision Center Business Console, select the decision service, then the release and browse Decision Artifacts to view the rules and make changes.

  1. Now you want to execute the sample decision service to request a loan. Follow the procedure described here Try out the Business console

Note: The persistence locale for Decision Center is set to English (United States), which means that the project can be viewed only in English.

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.

Uninstalling the chart

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

$ helm delete my-odm-dev-release

The command removes all the Kubernetes components associated with the chart, except any Persistent Volume Claims (PVCs). This is the default behavior of Kubernetes, and ensures that valuable data is not deleted. In order to delete the ODM's data, you can delete the PVC using the following command:

$ kubectl delete pvc <release_name>-odm-pvclaim -n <namespace>

Chart Requirements

Resources Required

You can find below the default resources configuration:

ServiceCPU RequestCPU LimitMemory Request (Mi)Memory Limit (Mi)
ODM services1210242048

You can customize the CPU and Memory Requests and Limits by using the parameters:

  • resources.limits.cpu
  • resources.limits.memory
  • resources.requests.cpu
  • resources.requests.memory

Internal Storage Requirements

Uses cases for H2 as an internal database:

  • Persistent storage using Kubernetes dynamic provisioning. Uses the default storageclass defined by the Kubernetes admin or by using a custom storageclass which will override the default.

    • Set global values to:
      • internalDatabase.persistence.enabled: true (default)
      • internalDatabase.persistence.useDynamicProvisioning: true
    • Specify a custom storageClassName per volume or leave the value empty to use the default storageClass.
  • Persistent storage using a predefined PersistentVolumeClaim or PersistentVolume setup prior to the deployment of this chart

    • Set global values to:
      • internalDatabase.persistence.enabled: true (default)
      • internalDatabase.persistence.useDynamicProvisioning: false (default)
    • Kubernetes binding process selects a pre-existing volume based on the accessMode and size.

Storage Options Supported:

  • IBM Cloud storage options supported:
    • File Bronze
    • File Silver
    • File Gold

On-premise storage options supported for all architectures:

  • Rook-Ceph

Security Requirements

Service Account Requirements

By default, the chart creates and uses the custom serviceAccount named <releasename>-ibm-odm-dev-service-account.

The serviceAccount should be granted the appropriate PodSecurityPolicy or SecurityContextConstraints depending on your cluster. Refer to the PodSecurityPolicy Requirements or Red Hat OpenShift SecurityContextConstraints Requirements documentation.

You can also configure the chart to use a custom serviceAccount. In this case, a cluster administrator can create a custom serviceAccount and the namespace administrator is then able to configure the chart to use the created serviceAccount by setting the parameter serviceAccountName:

$ helm install my-odm-dev-release \
  --set license=accept \
  --set usersPassword=my-password \
  --set serviceAccountName=ibm-odm-dev-service-account \
  ibm-helm/ibm-odm-dev

PodSecurityPolicy Requirements

This chart requires a PodSecurityPolicy to be bound to the target namespace prior to installation. To meet this requirement, a specific cluster and namespace might have to be scoped by a cluster administrator.

The predefined PodSecurityPolicy name ibm-restricted-psp has been verifed

Deploy ibm-odm-dev 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-dev 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-dev is pinned at v22.2.0 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