ibm-odm-dev
by Helm
IBM Operational Decision Manager for Developers
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.
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 of five ODM services:
- Decision Center Business Console
- Decision Center Enterprise 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.
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/
-
Review and accept the product license:
- Set license=view to print the license agreement
- Set license=accept to accept the license
-
Define a password for the default users: You must 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
Ensure you have a good understanding of the underlying concepts and technologies:
- Helm chart, Docker, container
- Kubernetes
- 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 ODM for developers configuration parameters.
If you want to create your own decision services from scratch, you need to install Rule Designer from the Eclipse Marketplace.
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-charts/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 for this chart. If your target namespace is bound to this PodSecurityPolicy, you can proceed to install the chart.
This chart also defines a custom PodSecurityPolicy which can be used to finely control the permissions/capabilities needed to deploy this chart.
A cluster administrator can create the custom PodSecurityPolicy and the ClusterRole by applying the following descriptors files in the appropriate namespace:
- Custom PodSecurityPolicy definition:
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: ibm-odm-psp
spec:
allowPrivilegeEscalation: false
forbiddenSysctls:
- '*'
fsGroup:
ranges:
- max: 65535
min: 1
rule: MustRunAs
requiredDropCapabilities:
- ALL
runAsUser:
rule: MustRunAsRange
seLinux:
rule: RunAsAny
supplementalGroups:
ranges:
- max: 65535
min: 1
rule: MustRunAs
volumes:
- configMap
- emptyDir
- projected
- secret
- downwardAPI
- persistentVolumeClaim
- Custom ClusterRole for the custom PodSecurityPolicy:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ibm-odm-clusterrole
rules:
- apiGroups:
- extensions
resourceNames:
- ibm-odm-psp
resources:
- podsecuritypolicies
verbs:
- use
Red Hat OpenShift SecurityContextConstraints Requirements
This chart requires a SecurityContextConstraints to be granted to the serviceAccount prior to installation. A cluster administrator can either bind the SecurityContextConstraints to the target namespace or add the scc specifically to the serviceAccount.
The predefined SecurityContextConstraints name: restricted has been verified for this chart. In Openshift, restricted is used by default for authenticated users.
This chart also defines a custom SecurityContextConstraints which can be used to finely control the permissions/capabilities needed to deploy this chart.
You can apply the following yaml file to create the custom SecurityContextConstraints.
- Custom SecurityContextConstraints definition:
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
annotations:
name: ibm-odm-scc
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegedContainer: false
allowPrivilegeEscalation: false
allowedCapabilities: []
allowedFlexVolumes: []
allowedUnsafeSysctls: []
defaultAddCapabilities: []
defaultPrivilegeEscalation: false
forbiddenSysctls:
- "*"
fsGroup:
type: MustRunAs
ranges:
- max: 65535
min: 1
readOnlyRootFilesystem: false
requiredDropCapabilities:
- ALL
runAsUser:
type: MustRunAsNonRoot
seccompProfiles:
- docker/default
seLinuxContext:
type: RunAsAny
supplementalGroups:
type: MustRunAs
ranges:
- max: 65535
min: 1
volumes:
- configMap
- downwardAPI
- emptyDir
- persistentVolumeClaim
- projected
- secret
priority: 0
Resources Required
Minimum Configuration
| CPU Minimum (m) | Memory Minimum (Mi) | |
|---|---|---|
| ODM services | 1 | 1024 |
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.
Add the ibm chart repository:
$ helm repo add ibm-charts https://raw.githubusercontent.com/IBM/charts/master/repo/stable/
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-charts/ibm-odm-dev
Tip: List all existing releases with the
helm listcommand.
Using Helm, you specify each parameter with a --set key=value argument in the helm install command.
For example:
$ helm install my-odm-dev-release \
--set license=accept \
--set usersPassword=my-password \
--set internalDatabase.databaseName=my-db \
--set internalDatabase.user=my-user \
--set internalDatabase.password=my-password \
ibm-charts/ibm-odm-dev
Tip: You can set an list of values with the syntax:
--set image.pullSecrets="{a,b}"which is equivalent to:image: pullSecrets: - a - b
It is also possible to use a custom-made .yaml file to specify the values of the parameters when you install the chart. For example:
$ helm install my-odm-dev-release -f values.yaml ibm-charts/ibm-odm-dev
Tip: The default values are in the
values.yamlfile of theibm-odm-devchart.
The release is an instance of the ibm-odm-dev chart: all the ODM components are now running in a Kubernetes cluster.
Note: If you plan on using
helm templatecommand for ODM installation, add the--validateflag to validate your manifests against your Kubernetes cluster:$ helm template my-odm-dev-release --set license=accept --set usersPassword=my-password ibm-charts/ibm-odm-dev > my-values.yaml $ kubectl apply -f my-values.yaml
Verifying the Chart
Port Exposed
The pod exposes only one port externally:
| From | To | Port | Protocol | Function |
|---|---|---|---|---|
| End User | Application | 9060 | HTTP | Communication from the end user to the front end UI of the application |
Accessing ODM
- 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.
You can find it 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.
As an example, you can create an Ingress object to access the welcome page this way:
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: 9060Then 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.
-
Click the Decision Center Business Console to open the service in a browser.
-
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 t
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartibm-odm-dev is pinned at v22.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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