From 48c173cd8b55bb8d589538ce7255d2cd616ac959 Mon Sep 17 00:00:00 2001 From: siasin Date: Thu, 14 Nov 2024 12:11:31 +0100 Subject: [PATCH 1/4] update wrt ibm licensing service 4.9 --- platform/eks/README.md | 4 ++-- platform/eks/licensing-instance.yaml | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/platform/eks/README.md b/platform/eks/README.md index 43a8fa94..e370d4ea 100644 --- a/platform/eks/README.md +++ b/platform/eks/README.md @@ -313,8 +313,8 @@ 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}') -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** diff --git a/platform/eks/licensing-instance.yaml b/platform/eks/licensing-instance.yaml index c3d94174..5d8f8b06 100644 --- a/platform/eks/licensing-instance.yaml +++ b/platform/eks/licensing-instance.yaml @@ -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: /* \ No newline at end of file From e8856c725a4addedef31dccce83e845bc37cdd29 Mon Sep 17 00:00:00 2001 From: siasin Date: Thu, 14 Nov 2024 15:00:45 +0100 Subject: [PATCH 2/4] update instruction for applying licensing 4.9 --- platform/eks/README.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/platform/eks/README.md b/platform/eks/README.md index e370d4ea..704c274c 100644 --- a/platform/eks/README.md +++ b/platform/eks/README.md @@ -290,27 +290,37 @@ 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..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-licensing -o jsonpath='{.status.loadBalancer.ingress[0].hostname}') From fc245100795fcc27262d72705bd62005d72c1ccd Mon Sep 17 00:00:00 2001 From: siasin Date: Thu, 14 Nov 2024 15:02:29 +0100 Subject: [PATCH 3/4] update instruction to apply licensing 4.9 for nginx ingress --- platform/eks/README-NGINX.md | 26 +++++++++++++++++----- platform/eks/licensing-instance-nginx.yaml | 5 ++--- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/platform/eks/README-NGINX.md b/platform/eks/README-NGINX.md index 00057a72..fd93867b 100644 --- a/platform/eks/README-NGINX.md +++ b/platform/eks/README-NGINX.md @@ -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..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. diff --git a/platform/eks/licensing-instance-nginx.yaml b/platform/eks/licensing-instance-nginx.yaml index df6ac2f3..ac0e8102 100644 --- a/platform/eks/licensing-instance-nginx.yaml +++ b/platform/eks/licensing-instance-nginx.yaml @@ -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(/|$)(.*) \ No newline at end of file From 907327f2bc4004cb632c4b3154e2f0fe89fca8ac Mon Sep 17 00:00:00 2001 From: siasin Date: Thu, 14 Nov 2024 15:03:38 +0100 Subject: [PATCH 4/4] update LS troubleshooting url --- platform/eks/README-NGINX.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/eks/README-NGINX.md b/platform/eks/README-NGINX.md index fd93867b..47e24276 100644 --- a/platform/eks/README-NGINX.md +++ b/platform/eks/README-NGINX.md @@ -98,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).