Skip to content

Commit

Permalink
Merge pull request #202 from DecisionsDev/eks-review1
Browse files Browse the repository at this point in the history
Eks review wrt Licensing service 4.9
  • Loading branch information
siasin authored Nov 15, 2024
2 parents 95e83d3 + 907327f commit c07ae59
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 22 deletions.
28 changes: 22 additions & 6 deletions platform/eks/README-NGINX.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,35 @@ helm install mycompany ibm-helm/ibm-odm-prod --version 24.1.0 -f eks-rds-nginx-v
## Track ODM usage with the IBM License Service with NGINX Ingress Controller
Install the IBM License Service following 7a. section of [Track ODM usage with the IBM License Service](README.md#7-track-odm-usage-with-the-ibm-license-service) step of the documentation.
Install the IBM License Service following *7a.* section of [Track ODM usage with the IBM License Service](README.md#7-track-odm-usage-with-the-ibm-license-service) step of the documentation.
To create the IBM Licensing instance using NGINX, get the [licensing-instance-nginx.yaml](./licensing-instance-nginx.yaml) file and run the command:
### Patch the IBM Licensing instance with Nginx configuration
Get the [licensing-instance-nginx.yaml](./licensing-instance-nginx.yaml) file and run the command:
```bash
kubectl create -f licensing-instance-nginx.yaml
kubectl patch IBMLicensing instance --type merge --patch-file licensing-instance-nginx.yaml -n ibm-licensing
```
Wait a couple of minutes for the changes to be applied.

Run the following command to see the status of Ingress instance:

```bash
kubectl get ingress -n ibm-licensing
```

You should be able to see the address and other details about `ibm-licensing-service-instance`.
```
NAME CLASS HOSTS ADDRESS PORTS AGE
ibm-licensing-service-instance nginx * abcdefghijklmnopqrstuvqxyz-xxxxxxxyyyyyyzzzzzz.elb.<aws-region>.amazonaws.com 80 11m
```

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

You can access the `http://${LICENSING_URL}/status?token=${TOKEN}` URL to view the licensing usage.
Expand All @@ -82,4 +98,4 @@ Otherwise, you can also retrieve the licensing report .zip file by running:
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).
If your IBM License Service instance is not running properly, refer to this [troubleshooting page](https://www.ibm.com/docs/en/cloud-paks/foundational-services/4.9?topic=service-troubleshooting-license).
30 changes: 20 additions & 10 deletions platform/eks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,31 +290,41 @@ The ODM services are accessible from the following URLs:

#### a. Install the IBM License Service

Follow the **Installation** section of the [Manual installation without the Operator Lifecycle Manager (OLM)](https://www.ibm.com/docs/en/cpfs?topic=software-manual-installation-without-operator-lifecycle-manager-olm) documentation.
Follow the **Installation** section of the [Installation License Service without Operator Lifecycle Manager (OLM)](https://www.ibm.com/docs/en/cloud-paks/foundational-services/4.9?topic=ils-installing-license-service-without-operator-lifecycle-manager-olm) documentation.

> **Warning**
> Make sure you do not follow the **Creating an IBM Licensing instance** part!
#### b. Create the IBM Licensing instance
#### b. Patch the IBM Licensing instance

Get the [licensing-instance.yaml](./licensing-instance.yaml) file and run the command:

```bash
kubectl create -f licensing-instance.yaml
kubectl patch IBMLicensing instance --type merge --patch-file licensing-instance.yaml -n ibm-licensing
```

You can find more information and use cases on [this page](https://www.ibm.com/docs/en/cpfs?topic=software-configuration).
Wait a couple of minutes for the changes to be applied.

Run the following command to see the status of Ingress instance:

```bash
kubectl get ingress -n ibm-licensing
```

You should be able to see the address and other details about `ibm-licensing-service-instance`.
```
NAME CLASS HOSTS ADDRESS PORTS AGE
ibm-licensing-service-instance alb * k8s-ibmlicen-ibmlicen-xxxxxxxx-yyyyyyy.<aws-region>.elb.amazonaws.com 80 44m
```
You can find more information and use cases on [this page](https://www.ibm.com/docs/en/cloud-paks/foundational-services/4.9?topic=configuration-configuring-kubernetes-ingress).

> **Note**
> If you choose to use the NGINX Ingress Controller, you must use the [licensing-instance-nginx.yaml](./licensing-instance-nginx.yaml) file. Refer to [Track ODM usage with the IBM License Service with NGINX Ingress Controller](README-NGINX.md#track-odm-usage-with-the-ibm-license-service-with-nginx-ingress-controller).
#### c. Retrieving license usage

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:
The ALB address should be reflected in 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}')
export TOKEN=$(kubectl get secret ibm-licensing-token -n ibm-common-services -o jsonpath='{.data.token}' |base64 -d)
export LICENSING_URL=$(kubectl get ingress ibm-licensing-service-instance -n ibm-licensing -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
export TOKEN=$(kubectl get secret ibm-licensing-token -n ibm-licensing -o jsonpath='{.data.token}' |base64 -d)
```

> **Note**
Expand Down
5 changes: 2 additions & 3 deletions platform/eks/licensing-instance-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ spec:
httpsEnable: false
ingressEnabled: true
ingressOptions:
ingressClassName: nginx
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: '/$2'
path: /ibm-licensing-service-instance(/|$)(.*)
instanceNamespace: ibm-common-services
path: /ibm-licensing-service-instance(/|$)(.*)
5 changes: 2 additions & 3 deletions platform/eks/licensing-instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ spec:
httpsEnable: false
ingressEnabled: true
ingressOptions:
ingressClassName: alb
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
path: /*
instanceNamespace: ibm-common-services
path: /*

0 comments on commit c07ae59

Please sign in to comment.