How do I install ODM 9.0.0.1 Gold topology on Certified Kubernetes?
An example of Gold Topology deployed on a private RedHat OpenShift Container Platform (OCP) and a public Amazon Elastic Kubernetes Service (EKS).
This article is part of an article series around Operational Decision Manager (ODM) on Certified Kubernetes. For more information about ODM environments and the topologies, see our ODM topologies blog entries.
This document aims to give an example on how to install this topology using a private RedHat OpenShift Container Platform (OCP) cluster and a public Amazon Elastic Kubernetes Service (EKS) cluster.
We tried to cover as many types of installation as possible, so that this article could be used as a reference.
ODM Gold topology is an enterprise deployment of several ODM environments, each in an individual namespace, within several clusters.
Schema of an ODM Gold topology (fig. 1)
A minimal Gold topology consists of the following environments: Authoring, Sandboxes, Pre-prod, and Production.
A full Gold topology consists of an Authoring, Sandboxes, a Pre-prod, and several Production environments.
There is one Decision Center to govern all Decision Servers.
Gold topology is best suited for applications with high production constraints (Large, High availability HA).
ODM on Certified Kubernetes is deployed using a Helm chart, where you can have your own database for Authoring, Preproduction and Production environments. The databases can be externalized and separated.
2. Gold topology installation example
The Prerequisites page provides you information about this installation step, and, can be decomposed as following:
As an example, for this article, we will setup an ODM Gold topology that contains 5 different environments on 2 separate clusters.
The first cluster, referred to as the “Authoring cluster”:
The second cluster, referred to as the “Production cluster”:
Table summarizing the Production and Authoring cluster setup (fig. 2)
3.1 Authoring cluster prerequisites
-
Create your PostgreSQL databases dedicated to Authoring, Pre-prod and Sandbox1 environments. This is not needed for Sandbox2 as it uses an internal database.
-
Run the following commands to create add and update ibm-helm-repo
HELM_REPO="https://raw.githubusercontent.com/IBM/charts/master/repo/ibm-helm"
helm repo add ibm-helm-repo $HELM_REPO
helm repo update
3.2 Installing the Authoring environment
3.2.1. Authoring environment architecture and setup
This environment is composed of two Decision Center replicas, two Decision Runner replicas, and a single Decision Server console. Its purpose is to govern, author and deploy your decision services.
Authoring environment requirements and parameters summary (fig. 3)
Prior to install, we need to create a location where to deploy:
-
Create a namespace for your ODM Authoring environment. For example:
kubectl create ns authoring
-
Set context to this namespace
kubectl config set-context --current --namespace=authoring
3.2.2. Authoring environment prerequisite procedure
-
Create a pull secret using your entitlement key
kubectl create secret docker-registry my-odm-pull-secret \ --docker-server=cp.icr.io --docker-username=cp \
--docker-password="<API_KEY_GENERATED>" --docker-email=<USER_EMAIL>
-
Create a secret with your PostgreSQL database credential.
kubectl apply -f postgres-secret.yaml
An example of the YAML file:
name: my-odm-auth-secret-postgres
db-password: <my_password>
-
Create secrets that hold your Microsoft Entra ID (ex AzureAD), Microsoft certificates and the ODM configuration files:
keytool -printcert -sslserver login.microsoftonline.com -rfc > microsoft.crt
kubectl create secret generic my-odm-auth-secret-ms --from-file=tls.crt=microsoft.crt
curl --silent --remote-name https://cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem
kubectl create secret generic my-odm-auth-secret-digicert --from-file=tls.crt=DigiCertGlobalRootCA.crt.pem
kubectl create secret generic my-odm-auth-secret-azuread --from-file=OdmOidcProviders.json=./output/OdmOidcProviders.json --from-file=openIdParameters.properties=./output/openIdParameters.properties --from-file=openIdWebSecurity.xml=./output/openIdWebSecurity.xml --from-file=webSecurity.xml=./output/webSecurity.xml
Note: You can customize the generated webSecurity.xml to add additional user with basic authentication in the <basicRegistry> element if needed.
At this stage, the authoring namespace is ready to receive an ODM deployment.
3.2.3. Authoring environment installation procedure
-
Customize the values.yaml file and specify the values of the parameters per ODM Authoring environment to install the chart.
Here is a sample of myvalues-authoring.yaml file allowing an ODM Authoring deployment containing 2 Decision Center replicas, 2 Decision Runner replica, and a single Decision Server console:
deployForProduction: true
authSecretRef: my-odm-auth-secret-azuread
- my-odm-auth-secret-digicert
serviceAccountName: ''
# enableTLS=true (default value)
host: odm-authoring.<my_company>.aws.com
tlsHosts: odm-authoring.<my_company>.aws.com
# tlsSecretRef: ingress-tls
- alb.ingress.kubernetes.io/backend-protocol: HTTPS
- alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-3:XXXXX:certificate/YYYYY
- alb.ingress.kubernetes.io/scheme: internet-facing
- alb.ingress.kubernetes.io/target-type: ip
secretCredentials: my-odm-auth-secret-postgres
serverName: my-odm-gold-db.cluster-XXX.eu-west-3.rds.amazonaws.com
port: '5432'
repository: cp.icr.io/cp/cp4a/odm
pullSecrets: my-odm-pull-secret
-
Install the ODM Authoring deployment in authoring namespace with the customized myvalues-authoring.yaml file:
helm install ibm-odm-auth ibm-helm-repo/ibm-odm-prod -f myvalues-authoring.yaml -n authoring --version 23.2.0
-
To check the installation status, you can run the following commands:
helm status ibm-odm-auth
helm get values ibm-odm-auth
At this stage, ODM pods are deployed in the authoring namespace. We need to handle the Ingress policy to enable access to the ODM Services.
3.2.4. Authoring environment Ingress configuration
-
Edit Ingress
kubectl edit ingress ibm-odm-auth-odm-ingress
-
Set spec.IngressClassName in the Ingress instance to alb.
spec:
ingressClassName : alb
- Check that rules.host parameter is set with the value odm-authoring. <my_company>-aws.com as defined in your YAML file. It will be needed when creating the DNS record in the next step.
- Make sure that the alb.ingress.* annotations are present in the metadata of the Ingress instance.
Description of Ingress object in current namespace (fig. 4)
-
Check that the corresponding load balancer instance has been created successfully. In AWS console, search for EC2 resources, go to Load balancers, and find your instance.
TIPS: if you had too many ingresses, you could filter using your namespace name.
Load balancer list in current namespace (fig. 5)
TIPS: if you do not see your load balancer listed, check that you have a Load Balancer Controller up and running using the following command:
kubectl get deployment -n kube-system aws-load-balancer-controller
NAME READY UP-TO-DATE AVAILABLE
aws-load-balancer-controller 2/2 2 2
-
Enable Sticky session for Decision Center:
-
In AWS console, search for Targets groups, edit each of the target group.
-
Set Stickiness type to “Application-based cookie”.
-
Set the Stickiness duration to 8 hours which corresponds to the invalidation timeout set in Decision Center.
-
Set “App cookie name” to JSESSIONID_DC_<RELEASE_NAME>
Target groups edition wizard (fig. 6)
-
In AWS console, search for Route 53 resources, go to Hosted zones, select your target hosted zone (which should look like <my_company>-aws.com), and create a DNS record with the following options:
-
As a result, the Decision endpoints will be:
-
Register the redirect URLs into your Microsoft Entra ID (ex AzureAD) application as explained in this documentation section: Complete post-deployment tasks.
3.3 Installing the Sandbox1 environment
3.3.1. Sanbox1 environment architecture and setup
This environment is composed of a single Decision Server console and a single Decision Server runtime. The goal of this environment is to deliver a sandbox to test and execute the Decision Services for a developer or a development team. The sandbox environment will make use of an external PostgreSQL database so that the first round of tests can be done against imported production data.
Sandbox1 environment requirements and parameters summary (fig. 8)
3.3.2. Sanbox1 environment installation procedure
-
Create a namespace for your ODM Pre-prod environment. For example:
kubectl create ns sandbox1
-
Set context to this namespace
kubectl config set-context --current --namespace=sandbox1
-
Customize the values.yaml file and specify the values of the parameters per ODM Sandbox1 environment to install the chart.
Here is a sample of myvalues-sandbox1.yaml file to deploy a Decision Server runtime and Decision Server console. Note that the parameters customization.deployForProduction is set to false.
deployForProduction: false
authSecretRef: my-odm-auth-secret-azuread
- my-odm-auth-secret-digicert
# enableTLS=true (default value)
host: odm-sandbox1.<my_company>-aws.com
tlsHosts: odm-sandbox1.<my_company>-aws.com
# tlsSecretRef: ingress-tls
alb.ingress.kubernetes.io/backend-protocol: HTTPS
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-3: XXXXX:certificate/YYYYY
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
secretCredentials: my-odm-auth-secret-postgres
serverName: my-odm-gold-db.cluster-XXX.eu-west-3.rds.amazonaws.com
repository: cp.icr.io/cp/cp4a/odm
pullSecrets: my-odm-pull-secret
-
Install ODM Sandbox1 deployment in sandbox1 namespace using the customized myvalues-sandbox1.yaml file:
helm install ibm-odm-sandbox1 ibm-helm-repo/ibm-odm-prod -f myvalues-sandbox1.yaml -n sandbox1 --version 23.2.0
-
To check the installation status, you can run the following commands:
helm status ibm-odm-sandbox1
helm get values ibm-odm-sandbox1
odm-sandbox1.<my_company>-aws.com
as defined in your YAML file.
-
Add a DNS record in Routes 53. Take note that the record name should be configured as odm-sandbox1.
-
The Decision Console and Decision Runtime endpoints will be:
-
https://odm-sandbox1.<my_company>-aws.com/res
-
https://odm-sandbox1.<my_company>-aws.com/DecisionService
-
Register the redirect URLs into your Microsoft Entra ID (ex AzureAD) application as explained in this documentation section: Complete post-deployment tasks.
3.4 Installing the Sandbox2 environment
3.4.1. Sanbox2 environment architecture and setup
This second sandbox is also composed of a single Decision Server console and a single Decision Server runtime. However, we will illustrate the usage of an internal DB.
Sandbox2 environment requirements and parameters summary (fig. 9)
3.4.2. Sanbox2 environment installation procedure
-
Create a namespace for your ODM Pre-prod environment. For example:
kubectl create ns sandbox2
-
Set context to this namespace
kubectl config set-context --current --namespace=sandbox2
-
Retrieve the storage class set up on your cluster.
-
Customize the values.yaml file and specify the values of the parameters per ODM Sandbox2 environment to install the chart.
Here is a sample of myvalues-sandbox2.yaml file to deploy a Decision Server runtime and Decision Server console. Note that the parameters customization.deployForProduction is set to false.
deployForProduction: false
authSecretRef: my-odm-auth-secret-azuread
- my-odm-auth-secret-digicert
# enableTLS=true (default value)
host: odm-sandbox2.<my_company>-aws.com
tlsHosts: odm-sandbox2.<my_company>-aws.com
# tlsSecretRef: ingress-tls
alb.ingress.kubernetes.io/backend-protocol: HTTPS
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-3: XXXXX:certificate/YYYYY
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
useDynamicProvisioning: true
populateSampleData: false
repository: cp.icr.io/cp/cp4a/odm
pullSecrets: my-odm-pull-secret
-
Install ODM Sandbox2 deployment in sandbox2 namespace using the customized myvalues-sandbox1.yaml file:
helm install ibm-odm-sandbox2 ibm-helm-repo/ibm-odm-prod -f myvalues-sandbox2.yaml -n sandbox2 --version 23.2.0
-
To check the installation status, you can run the following commands:
helm status ibm-odm-sandbox2
helm get values ibm-odm-sandbox2
odm-sandbox2.<my_company>-aws.com
as defined in your YAML file.
-
Add a DNS record in Routes 53. Take note that the record name should be configured as odm-sandbox2.
-
The Decision Console and Decision Runtime endpoints will be:
-
https://odm-sandbox2.<my_company>-aws.com/res
-
https://odm-sandbox2.<my_company>-aws.com/DecisionService
-
Register the redirect URLs into your Microsoft Entra ID (ex AzureAD) application as explained in this documentation section: Complete post-deployment tasks.
3.5 Installing the Pre-Production environment
3.5.1. Pre-production environment architecture and setup
This environment is composed of a single Decision Server console and several Decision Server runtimes. The purpose is to mimic the Production environment, to be able to run performance tests of the Decision Services before a deployment on Production.
Pre-prod environment requirements and parameters summary (fig. 10)
3.5.2. Pre-production environment installation procedure
-
Create a namespace for your ODM Pre-prod environment. For example:
kubectl create ns preproduction
-
Set context to this namespace
kubectl config set-context --current --namespace=preproduction
-
Customize the values.yaml file and specify the values of the parameters per ODM Pre-prod environment to install the chart.
Here is a sample of myvalues-preproduction.yaml file allowing an ODM Pre-production deployment containing 3 Decision Server runtimes and a Decision Server console. Note that the parameters customization.deployForProduction is set to false.
deployForProduction: false
authSecretRef: my-odm-auth-secret-azuread
- my-odm-auth-secret-digicert
# enableTLS=true (default value)
host: odm-preproduction.<my_company>-aws.com
tlsHosts: odm-preproduction.<my_company>-aws.com
- alb.ingress.kubernetes.io/backend-protocol: HTTPS
- alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-3:XXXXXXXX:certificate/YYYYYYYYY
- alb.ingress.kubernetes.io/scheme: internet-facing
- alb.ingress.kubernetes.io/target-type: ip
secretCredentials: my-odm-auth-secret-postgres
serverName: my-odm-gold-db.cluster-XXX.eu-west-3.rds.amazonaws.com
repository: cp.icr.io/cp/cp4a/odm
pullSecrets: my-odm-pull-secret
-
Install the ODM Pre-production deployment in pre-prod namespace with the customized myvalues-preproduction.yaml file:
helm install ibm-odm-prep ibm-helm-repo/ibm-odm-prod -f myvalues-preproduction.yaml -n preproduction --version 23.2.0
-
To check the installation status, you can run the following commands:
helm status ibm-odm-prep
helm get values ibm-odm-prep
odm-preproduction.<my_company>-aws.com
as defined in your YAML file.
-
Add a DNS record in Routes 53. Take note that the record name should be configured as odm-preproduction.
-
The Decision Console and Decision Runtime endpoints will be:
-
https://odm-preproduction.<my_company>-aws.com/res
-
https://odm-preproduction.<my_company>-aws.com/DecisionService
-
Register the redirect URLs into your Microsoft Entra ID (ex AzureAD) application as explained in this documentation section: Complete post-deployment tasks.
The procedure in this section aims to guide you through the ODM Production deployment in the OpenShift cluster.
4.1 Production cluster prerequisites
-
Make sure that you have installed OpenShift “oc” and relevant command line tools.
-
You must install the IBM License Service (once) in your OpenShift cluster. For more information, see the section “In OpenShift” in Licensing and metering.
-
Run the following commands to create add and update ibm-helm repo (If you have not done so)
helm repo add ibm-helm-repo $HELM_REPO
4.2 Installing the Production environment
4.2.1. Production environment architecture and setup
Production environment requirements and parameters summary (fig. 11)
4.2.2. Production environment installation procedure
When the preparations are done, you can proceed with the ODM deployment on OpenShift cluster using the Helm chart.
-
Create a namespace for your ODM Production environment. For example:
oc new-project production
-
Create the secret my-odm-prod-secret-ldap for LDAP configuration where the webSecurity.xml can be one of the options described in Configuring user access without OpenID.
Note: You can customize the webSecurity.xml to add additional user with basic authentication if needed.
oc create secret generic my-odm-prod-secret-ldap --from-file=webSecurity.xml=webSecurity.xml
oc create secret generic my-odm-prod-secret-db2-ssl --from-file="truststore.jks" --from-literal=truststore_password=password
-
Create the secret my-odm-prod-secret-db2 for holding Db2 credentials and the secret my-odm-prod-secret-ldap-cert to include LDAP SSL certificate:
where the secret.yaml file contains:
name: my-odm-prod-secret-db2
db-password: <my_Db2pass>
name: my-odm-prod-secret-ldap-cert
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUdJVENDQlFtZ0F3SUJBZ0lE
UblgyYXNpa2EweEgzZ1d1b1pqQT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
-
Customize the values.yaml file and specify the values of the parameters per ODM Production environment to install the chart. You can extract the values.yaml file from the Helm chart (ibm-odm-prod-version.tgz archive).
Here is a sample of myvalues-production.yaml file allowing an ODM Production deployment with external Db2 and Active Directory LDAP in SSL. Note that the parameters customization.deployForProduction is set to true.
deployForProduction: true
# holding secret with LDAP connection credentials
authSecretRef: my-odm-prod-secret-ldap
# Specify a list of secrets that encapsulate certificates in PEM format to be included in the truststore
- my-odm-prod-secret-ldap-cert
secretCredentials: my-odm-prod-secret-db2
serverName: my-db2-server-Name
sslSecretRef: my-odm-prod-secret-db2-ssl
repository: cp.icr.io/cp/cp4a/odm
-
Install the ODM Production environment in production namespace with the customized myvalues-production.yaml file using the following command:
helm install ibm-odm-prod ibm-helm-repo/ibm-odm-prod -f myvalues-production.yaml -n production --version 23.2.0
-
To check the installation status, you can run the following commands:
helm status ibm-odm-prod
helm get values ibm-odm-prod
-
To get the Decision Console and Decision Runtime endpoints, you can run this command:
5. Validate your ODM environments
Coming soon: We will provide you an article with additional validations at ODM level and dedicated to ODM on Certified Kubernetes on the same basis as this CP4BA one. Stay tuned!