Skip to content

Commit

Permalink
Merge pull request #164 from DecisionsDev/eks-review
Browse files Browse the repository at this point in the history
Eks review
  • Loading branch information
mmouly authored Oct 26, 2023
2 parents caa65f2 + 60473cb commit f152f1c
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 20 deletions.
22 changes: 17 additions & 5 deletions platform/eks/README-NGINX.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ You can then go back to the [main documentation](README.md#2-create-an-rds-datab

## Install an ODM release with NGINX Ingress Controller

During the helm install, you just have to replace **eks-values.yaml** with **eks-nginx-values.yaml** that contains the relevant Ingress annotations:
`kubernetes.io/ingress.class: nginx` and `nginx.ingress.kubernetes.io/backend-protocol: https`
During the helm install, you just have to replace [eks-values.yaml](./eks-values.yaml) with [eks-nginx-values.yaml](./eks-nginx-values.yaml) that contains the relevant Ingress class: `nginx` and annotation: `nginx.ingress.kubernetes.io/backend-protocol: https`

To install ODM with the AWS RDS PostgreSQL database created in [step 2](README.md#2-create-an-rds-database-10-min):

Expand All @@ -38,7 +37,7 @@ To install ODM with the AWS RDS PostgreSQL database created in [step 2](README.m
- `<RDS_DATABASE_NAME>`: the initial database name defined when creating the RDS database

```bash
helm install mycompany ibm-helm/ibm-odm-prod --version 23.1.0 -f eks-rds-nginx-values.yaml
helm install mycompany ibm-helm/ibm-odm-prod --version 23.2.0 -f eks-rds-nginx-values.yaml
```

> **Note**
Expand All @@ -50,7 +49,7 @@ helm install mycompany ibm-helm/ibm-odm-prod --version 23.1.0 -f eks-rds-nginx-v
> - Get the [eks-nginx-values.yaml](./eks-nginx-values.yaml) file:
>
> ```bash
> helm install mycompany ibm-helm/ibm-odm-prod --version 23.1.0 -f eks-nginx-values.yaml
> helm install mycompany ibm-helm/ibm-odm-prod --version 23.2.0 -f eks-nginx-values.yaml
> ```
## Track ODM usage with the IBM License Service with NGINX Ingress Controller
Expand All @@ -63,4 +62,17 @@ To create the IBM Licensing instance using NGINX, get the [licensing-instance-ng
kubectl create -f licensing-instance-nginx.yaml
```
You can then go back to the [main documentation](README.md#c-retrieving-license-usage) to retrieve license usage.
You will be able to access the IBM License Service by retrieving the URL with this command:

```bash
export LICENSING_URL=$(kubectl get ingress ibm-licensing-service-instance -n ibm-common-services -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')/ibm-licensing-service-instance
export TOKEN=$(kubectl get secret ibm-licensing-token -n ibm-common-services -o jsonpath='{.data.token}' |base64 -d)
```

You can access the `http://${LICENSING_URL}/status?token=${TOKEN}` URL to view the licensing usage or retrieve the licensing report .zip file by running:

```bash
curl "http://${LICENSING_URL}/snapshot?token=${TOKEN}" --output report.zip
```

If your IBM License Service instance is not running properly, refer to this [troubleshooting page](https://www.ibm.com/docs/en/cpfs?topic=software-troubleshooting).
21 changes: 11 additions & 10 deletions platform/eks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This project demonstrates how to deploy an IBM® Operational Decision Manager (O

<img src="./images/eks-schema.jpg" alt="Flow" width="2050" height="600" />

The ODM on Kubernetes Docker images are available in the [IBM Entitled Registry](https://www.ibm.com/cloud/container-registry). The ODM Helm chart is available in the [IBM Helm charts repository](https://github.com/IBM/charts).
The ODM on Kubernetes Docker images are available in the [IBM Cloud Container Registry](https://www.ibm.com/cloud/container-registry). The ODM Helm chart is available in the [IBM Helm charts repository](https://github.com/IBM/charts).

## Included components
The project uses the following components:
Expand Down Expand Up @@ -53,12 +53,15 @@ aws configure 
#### b. Create an EKS cluster (20 min)

```bash
eksctl create cluster <CLUSTER_NAME> --version 1.26 --alb-ingress-access
eksctl create cluster <CLUSTER_NAME> --version 1.28 --alb-ingress-access

```

> **Note**
> The tutorial has been tested with the Kubernetes version 1.26. Check the supported kubernetes version in the [system requirement](https://www.ibm.com/support/pages/ibm-operational-decision-manager-detailed-system-requirements) page.
> The tutorial has been tested with the Kubernetes version 1.28. Check the supported kubernetes version in the [system requirement](https://www.ibm.com/support/pages/ibm-operational-decision-manager-detailed-system-requirements) page.
> **Warning**
> If you prefer to use the NGINX Ingress Controller instead of the ALB Load Balancer to expose ODM services, don't use the --alb-ingress-access option during the creation of the cluster !
For more information, refer to [Creating an Amazon EKS cluster](https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html).

Expand All @@ -76,8 +79,6 @@ To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

#### d. Provision an AWS Load Balancer Controller

The AWS Load Balancer Controller creates Application Load Balancers (ALBs) and the necessary supporting AWS resources whenever a Kubernetes Ingress resource is created on the cluster with the `kubernetes.io/ingress.class: alb` annotation.

Provision an AWS Load Balancer Controller to your EKS cluster:

```bash
Expand Down Expand Up @@ -137,7 +138,7 @@ kubectl create secret generic odm-db-secret \
### 3. Prepare your environment for the ODM installation (5 min)

To get access to the ODM material, you must have an IBM entitlement key to pull the images from the IBM Entitled registry.
To get access to the ODM material, you must have an IBM entitlement key to pull the images from the IBM Cloud Container registry.
This is what will be used in the next step of this tutorial.

You can also download the ODM on Kubernetes package (.tgz file) from Passport Advantage® (PPA), and then push the contained images to the EKS Container Registry (ECR). If you prefer to manage the ODM images this way, see the details [here](README-ECR.md)
Expand Down Expand Up @@ -176,7 +177,7 @@ helm repo update
```bash
$ helm search repo ibm-odm-prod
NAME CHART VERSION APP VERSION DESCRIPTION
ibm-helm/ibm-odm-prod 23.1.0 8.12.0.0 IBM Operational Decision Manager
ibm-helm/ibm-odm-prod 23.2.0 8.12.0.1 IBM Operational Decision Manager
```

### 4. Manage a  digital certificate (10 min)
Expand Down Expand Up @@ -228,7 +229,7 @@ To install ODM with the AWS RDS PostgreSQL database created in [step 2](#2-creat
- `<RDS_DATABASE_NAME>` is the initial database name defined when creating the RDS database

```bash
helm install mycompany ibm-helm/ibm-odm-prod --version 23.1.0 -f eks-rds-values.yaml
helm install mycompany ibm-helm/ibm-odm-prod --version 23.2.0 -f eks-rds-values.yaml
```

> **Note**
Expand All @@ -238,7 +239,7 @@ helm install mycompany ibm-helm/ibm-odm-prod --version 23.1.0 -f eks-rds-values.
> - `<AWS-AccountId>` is your AWS Account Id
>
>```bash
>helm install mycompany ibm-helm/ibm-odm-prod --version 23.1.0 -f eks-values.yaml
>helm install mycompany ibm-helm/ibm-odm-prod --version 23.2.0 -f eks-values.yaml
>```
> **Note**
Expand Down Expand Up @@ -310,7 +311,7 @@ You can find more information and use cases on [this page](https://www.ibm.com/d
After a couple of minutes, the ALB reflects the Ingress configuration. You will be able to access the IBM License Service by retrieving the URL with this command:

```bash
export LICENSING_URL=$(kubectl get ingress ibm-licensing-service-instance -n ibm-common-services -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')/ibm-licensing-service-instance
export LICENSING_URL=$(kubectl get ingress ibm-licensing-service-instance -n ibm-common-services -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
export TOKEN=$(kubectl get secret ibm-licensing-token -n ibm-common-services -o jsonpath='{.data.token}' |base64 -d)
```

Expand Down
2 changes: 1 addition & 1 deletion platform/eks/eks-nginx-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ image:
service:
ingress:
enabled: true
class: nginx
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/backend-protocol: https

internalDatabase:
Expand Down
2 changes: 1 addition & 1 deletion platform/eks/eks-rds-nginx-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ image:
service:
ingress:
enabled: true
class: nginx
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/backend-protocol: https

externalDatabase:
Expand Down
2 changes: 1 addition & 1 deletion platform/eks/eks-rds-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ image:
service:
ingress:
enabled: true
class: alb
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/backend-protocol: "HTTPS"
alb.ingress.kubernetes.io/certificate-arn: "arn:aws:iam::<AWS-AccountId>:server-certificate/mycompany"
Expand Down
2 changes: 1 addition & 1 deletion platform/eks/eks-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ image:
service:
ingress:
enabled: true
class: alb
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/backend-protocol: "HTTPS"
alb.ingress.kubernetes.io/certificate-arn: "arn:aws:iam::<AWS-AccountId>:server-certificate/mycompany"
Expand Down
2 changes: 1 addition & 1 deletion platform/eks/licensing-instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ spec:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
path: /ibm-licensing-service-instance(/|$)(.*)
path: /*
instanceNamespace: ibm-common-services

0 comments on commit f152f1c

Please sign in to comment.