From 65785ba74bc2b83989602fbda1ea4aa2f6eefd96 Mon Sep 17 00:00:00 2001 From: Frederic Mercier Date: Wed, 30 Oct 2024 09:25:16 +0100 Subject: [PATCH] review the custom editor sample --- .../businessvalueeditor/README-DOCKER.md | 8 +++- .../businessvalueeditor/README-KUBERNETES.md | 2 +- decisioncenter/businessvalueeditor/README.md | 40 ++++++++----------- .../businessvalueeditor/compose-odm-dev.yml | 4 +- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/decisioncenter/businessvalueeditor/README-DOCKER.md b/decisioncenter/businessvalueeditor/README-DOCKER.md index ad94c0b..754a8e4 100644 --- a/decisioncenter/businessvalueeditor/README-DOCKER.md +++ b/decisioncenter/businessvalueeditor/README-DOCKER.md @@ -9,7 +9,13 @@ Before following the steps below, make sure you have built the images as explain ### Running the sample - Run ODM and Notifiers docker images + Navigate to the root directory of the Custom Value Editor sample: + + ```bash + cd decisioncenter/businessvalueeditor + ``` + + Run ODM docker images ```bash docker-compose -f compose-odm-dev.yml up odm-with-custom-value-editor ``` diff --git a/decisioncenter/businessvalueeditor/README-KUBERNETES.md b/decisioncenter/businessvalueeditor/README-KUBERNETES.md index c99ff62..43534cd 100644 --- a/decisioncenter/businessvalueeditor/README-KUBERNETES.md +++ b/decisioncenter/businessvalueeditor/README-KUBERNETES.md @@ -52,7 +52,7 @@ decisionCenter: Add all the other parameters suitable to your platform in `values.yaml`. Check this [link](https://github.com/DecisionsDev/odm-docker-kubernetes/tree/master/platform) for help. ```bash -helm install guicustomization-sample ibmcharts/ibm-odm-prod -f values.yaml +helm install businessvalueeditor-sample ibmcharts/ibm-odm-prod -f values.yaml ``` # Using the Sample diff --git a/decisioncenter/businessvalueeditor/README.md b/decisioncenter/businessvalueeditor/README.md index 6a8d619..698d274 100644 --- a/decisioncenter/businessvalueeditor/README.md +++ b/decisioncenter/businessvalueeditor/README.md @@ -10,46 +10,40 @@ It is the ODM on k8s adaptation of the ODM on premises [Custom Value Editor samp ### 1) Prerequisites -Before you begin, ensure you have one of the following **Container Platform**: Docker 24.0.x or Kubernetes 1.27+. +Before you begin, ensure you have at least Docker 24.0.x (and optionally Kubernetes 1.27+). ### 2) Building the Decision Center extension JAR To use the sample in Decision Center, you need to build a JAR for [Docker](README-DOCKER.md) and a ZIP for [Kubernetes](README-KUBERNETES.md) 1. Retrieve ODM libraries: - + Navigate to the source directory of the Custom Value Editor sample: - ``` + ```bash cd decisioncenter/businessvalueeditor/businessvalueeditor-source ``` ODM libraries are required to compile the JAR. - To get the ODM libraries, you need an access to a running Decision Center instance. - Download the **decision-center-client-api.zip** file : - - ``` - wget https://DC_HOST:DC_PORT/decisioncenter/assets/decision-center-client-api.zip --no-check-certificate + For that, deploy ODM for Developer public docker image: + ```bash + docker-compose -f ../compose-odm-dev.yml up odm ``` - Then, unzip decision-center-client-api.zip on the **lib** directory : + and then download the ODM libraries: + ```bash + wget http://localhost:9060/decisioncenter/assets/decision-center-client-api.zip ``` + + Unzip decision-center-client-api.zip in the **lib** directory : + ```bash unzip decision-center-client-api.zip -d "lib" ``` -> [!NOTE] -> If you don't have a running Decision Center, install it using the ODM for Developer public docker image, by running : -> ``` -> docker-compose -f compose-odm-dev.yml up odm -> ``` -> Then download the **decision-center-client-api.zip** file : -> ``` -> wget http://localhost:9060/decisioncenter/assets/decision-center-client-api.zip -> ``` -> Uninstall the ODM for Developer instance to avoid a port usage conflict if you continue this tutorial on [Docker](README-DOCKER.md) : -> ``` -> docker-compose -f compose-odm-dev.yml up down -> ``` + Undeploy ODM for developer (especially if you continue this tutorial on [Docker](README-DOCKER.md) to avoid a TCP/IP port usage conflict) : + ```bash + docker-compose -f ../compose-odm-dev.yml down + ``` 2. Build the JAR @@ -60,7 +54,7 @@ To use the sample in Decision Center, you need to build a JAR for [Docker](READM Run the command below in the **decisioncenter/businessvalueeditor/businessvalueeditor-source** directory: ```bash - docker run --rm --name my-maven-container \ + docker run --rm \ -v "$(pwd)":/usr/src/sample \ -w /usr/src/sample \ maven:3.8.5-openjdk-17 \ diff --git a/decisioncenter/businessvalueeditor/compose-odm-dev.yml b/decisioncenter/businessvalueeditor/compose-odm-dev.yml index 0063548..84a35e9 100644 --- a/decisioncenter/businessvalueeditor/compose-odm-dev.yml +++ b/decisioncenter/businessvalueeditor/compose-odm-dev.yml @@ -1,6 +1,6 @@ services: odm: - image: icr.io/cpopen/odm-k8s/odm + image: icr.io/cpopen/odm-k8s/odm:9.0.0 mem_limit: 4G memswap_limit: 4G user: "1001:0" @@ -12,7 +12,7 @@ services: - 9453:9453 odm-with-custom-value-editor: - image: icr.io/cpopen/odm-k8s/odm + image: icr.io/cpopen/odm-k8s/odm:9.0.0 mem_limit: 4G memswap_limit: 4G user: "1001:0"