You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: decisioncenter/dynamicdomain/README-DOCKER.md
+17-11Lines changed: 17 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -11,19 +11,19 @@ Before following the steps below, make sure you have built the customization JAR
11
11
12
12
## 1. Build the Sample Code
13
13
14
-
The following steps show how to compile the sample code into a JAR file using a Docker container with Maven and JDK 17.
14
+
The following steps show how to compile the sample code into a JAR file using a Docker container with Maven and JDK 21.
15
15
16
16
1. Navigate to the project directory:
17
17
```bash
18
18
cd decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate
19
19
```
20
20
21
-
2. Run the command below to build the JAR file:
21
+
1. Run the command below to build the JAR file:
22
22
```bash
23
23
docker run --rm \
24
24
-v "$(pwd)":/usr/src/sample \
25
25
-w /usr/src/sample \
26
-
maven:3.8.5-openjdk-17 \
26
+
maven:3.9.9-ibm-semeru-21-jammy \
27
27
mvn clean install -Dtarget.docker
28
28
```
29
29
> **Result**: The generated JAR file will be located in the `target` directory with the name `bomdomainpopulate-1.0.jar`.
@@ -39,7 +39,7 @@ To set up the ODM container with dynamic domain support:
39
39
```
40
40
> **Explanation**: This command initializes the ODM environment required for the sample.
41
41
42
-
2. Copy and configure the H2 database library for Decision Center:
42
+
1. Copy and configure the H2 database library for Decision Center:
43
43
```bash
44
44
docker-compose exec odm-dynamic-domain sh -c "cp /config/resources/h2*.jar /config/apps/decisioncenter.war/WEB-INF/lib/h2.jar"
45
45
docker-compose restart odm-dynamic-domain
@@ -65,20 +65,20 @@ To set up and populate the dynamic domains database:
65
65
66
66
# Using the sample
67
67
68
-
1. Log in into the [Business Console](http://localhost:9060/decisioncenter).<!-- markdown-link-check-disable-line -->
68
+
1. Log in to the Business Console at [http://localhost:9060/decisioncenter](http://localhost:9060/decisioncenter).<!-- markdown-link-check-disable-line -->
69
69
- user = `rtsAdmin`
70
70
- password = `rtsAdmin`
71
71
1. Navigate to the **Administration** tab. In the **Settings** sub-tab, click **Custom Settings** and click the *Add custom setting***icon** and set:
72
72
- name = `teamserver.derbyDataBaseDomainProvider`
73
73
- description = `derbyDataBaseDomainProvider`
74
74
- type = `String`
75
-
- leave `default value` empty
76
-
1. Set the value of the new custom setting to `ilog.rules.studio.samples.bomdomainpopulate.DataBaseDomainValueProvider`
75
+
- leave `default value` empty. Save the setting.
76
+
1. Set the value of this new custom setting to `ilog.rules.studio.samples.bomdomainpopulate.DataBaseDomainValueProvider`.
77
77
1. Navigate to the **Library** tab.
78
-
1. Import the rule project archive `projects/bomdomainpopulate-rules.zip`.
78
+
1. Import the rule project archive `dynamicdomain/projects/bomdomainpopulate-rules.zip`.
79
79
> Note: this rule project `bomdomainpopulate-rules` is only aimed at editing rules to demonstrate loading domains from a database. It is missing a deployment configuration and cannot be executed.
80
-
1.**Navigate to the Library** tab. Select the **bomdomainpopulate-rules**box (click anywhere except the name) and choose the **main branch**.
81
-
1. Display the rule `CheckOrder > OrderType`. Notice the error **Value (string) 'CompanyX' is incorrect**. Edit the rule and either remove **"CompanyX"** and press SPACE or double-click **"CompanyX"**. A list of suitable companies gets displayed in a drop-down. Close down the rule without saving.
80
+
1.Once the archive is imported, the **bomdomainpopulate-rules**decision service will be displayed. Click the **main** branch to access to the decision artifacts.
81
+
1. Display the rule `CheckOrder > OrderType`. An error **Value (string) 'CompanyX' is incorrect** is displayed. Edit the rule and either remove **"CompanyX"** and press SPACE or double-click **"CompanyX"**. A list of suitable companies gets displayed in a drop-down. `CompanyX` is not one of these companies. Close down the rule **without** saving.
82
82
1. Display the rule `CheckCurrency > CurrencyRestriction`. No warning is displayed.
83
83
1. Let's now make some changes in the dynamic domains in the database. Run:
84
84
```bash
@@ -90,10 +90,16 @@ To set up and populate the dynamic domains database:
90
90
-script /script/sql/modifyTables.sql \
91
91
-showResults"
92
92
```
93
-
1. Display the rule `CheckOrder > OrderType` back again. Notice that there is no error anymore. The effects of the changes donein the database are taken into account automatically because the values that the field `stock` can take are dynamically fetched from the database (and not stored in the BOM).
93
+
1. Display the rule `CheckOrder > OrderType` back again. Notice that there is no error anymore. The effects of the changes (the addition of `CompanyX` and `CompanyY`) donein the database are taken into account automatically because the values that the field `stock` can take are dynamically fetched from the database (and not stored in the BOM).
94
94
1. Conversely if you display the rule `CheckCurrency > CurrencyRestriction`, there is still no warning. So let's now import the changes done in the database into the BOM. Click the **Model** tab, and then the **Dynamic Domains** sub-tab. Expand all the three domains. You should see this: (Notice that the **Australian Dollar** was removed)
1. Tick **Domain** to select all the domains, and click the **Apply changes** button. Confirm the change.
99
99
1. Display the rule `CheckCurrency > CurrencyRestriction` back again. Now a warning `'Australian Dollar' is deprecated` is displayed as the result of the update of the Dynamic Domains in the BOM.
Copy file name to clipboardExpand all lines: decisioncenter/dynamicdomain/README-KUBERNETES.md
+73-29Lines changed: 73 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -5,31 +5,28 @@ This README explains how to run the BOM dynamic domain sample in Kubernetes.
5
5
# Configuring the sample in Kubernetes
6
6
## 1. Build the sample code
7
7
8
-
The instructions below enable to build the JAR using a Docker container featuring Maven and a JDK version 17.
8
+
The instructions below enable to build the JAR using a Docker container featuring Maven and a JDK version 21.
9
9
10
-
Run command below in the `decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate` directory:
10
+
Run the command below in the `decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate` directory:
11
11
12
12
This will compile the source code
13
13
```bash
14
14
docker run --rm \
15
15
-v "$(pwd)":/usr/src/sample \
16
16
-w /usr/src/sample \
17
-
maven:3.8.5-openjdk-17 \
17
+
maven:3.9.9-ibm-semeru-21-jammy \
18
18
mvn clean install
19
19
```
20
+
> **Result**: The generated JAR file will be located in the `target` directory with the name `bomdomainpopulate-1.0.jar`.
20
21
21
22
## 2. Uploading JARs on a file server
22
23
23
-
The customization JARs can be made available to Decision Center in two ways:
24
-
1. the **legacy way**: by copying the JARs to a PVC and referencing this PVC using the parameter `decisionCenter.customlibPvc`
25
-
1. or the **new way** (since 9.0 only): by copying the JARs on a file server and referencing the files to download from this file server using the parameter `decisionCenter.downloadUrl`
24
+
Any file server reachable by Decision Center is suitable.
26
25
27
-
This document explains how to follow the **new way**. Any file server reachable by Decision Center is suitable. You can either use an existing one or follow the instructions [here](https://github.com/DecisionsDev/odm-docker-kubernetes/blob/vnext-release/contrib/file-server/README.md#setup-an-httpd-file-server) to deploy a httpd file server in a new pod.
28
-
29
-
However you must use the **legacy way** if you deploy a version of ODM older than 9.0. Here are some [instructions](https://www.ibm.com/docs/en/odm/9.0.0?topic=kubernetes-customizing-decision-center-business-console) in the documentation.
26
+
You can either use an existing one or follow the instructions [here](https://github.com/DecisionsDev/odm-docker-kubernetes/blob/vnext-release/contrib/file-server/README.md#setup-an-httpd-file-server) to deploy a httpd file server in a new pod.
30
27
31
28
Two JARs must be made available:
32
-
1. the Decision Center extension JAR built [previously](README.md#building-the-decision-center-extension-jar),
29
+
1. the Decision Center extension JAR built [previously](README-KUBERNETES.md#1-build-the-sample-code)
33
30
1. the JDBC driver of the database storing the data of the dynamic domains.
34
31
35
32
Download the JDBC driver (if the internal PostgreSQL database is used):
If all goes well, you should have an output with `201` status for the uploading of the JARs. For example:
44
+
```console
45
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
46
+
<html>
47
+
<head>
48
+
<title>201 Created</title>
49
+
</head><body>
50
+
<h1>Created</h1>
51
+
<p>Resource /bomdomainpopulate-1.0.jar has been created.</p>
52
+
</body></html>
53
+
```
54
+
46
55
## 3. Deploying ODM
47
56
48
-
Add the public IBM Helm charts repository:
57
+
To get access to the ODM material, you must have an IBM entitlement key to pull the images from the IBM Cloud Container registry.
58
+
59
+
### a. Retrieve your entitled registry key
60
+
61
+
- Log in to [MyIBM Container Software Library](https://myibm.ibm.com/products-services/containerlibrary) with the IBMid and password that are associated with the entitled software.
62
+
63
+
- In the **Container Software and Entitlement Keys** tile, verify your entitlement on the **View library page**, and then go to *Entitlement keys* to retrieve the key.
64
+
65
+
### b. Create a pull secret by running the kubectl create secret command
-`<ENTITLEMENT_KEY>`: The entitlement key from the previous step. Make sure to enclose the key in double quotes.
74
+
-`<USER_EMAIL>`: The email address associated with your IBMid.
75
+
76
+
> **Note**
77
+
> The `cp.icr.io` value for the docker-server parameter is the only registry domain name that contains the images. You must set the docker-username to `cp` to use the entitlement key as the docker-password.
78
+
79
+
The `my-odm-docker-registry` secret name must be used for the `image.pullSecrets` parameter when you run a Helm install of your containers. The `image.repository` parameter should also set to `cp.icr.io/cp/cp4a/odm`.
ibmcharts/ibm-odm-prod <version><version> IBM Operational Decision Manager License By in...
94
+
NAME CHART VERSIONAPP VERSION DESCRIPTION
95
+
ibm-helm/ibm-odm-prod 25.0.0 9.5.0.0 IBM Operational Decision Manager License By in...
61
96
```
62
97
63
98
Create a file named `values.yaml`. This file will be used by the `helm install` command to specify the configuration parameters.
@@ -82,33 +117,42 @@ internalDatabase:
82
117
83
118
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.
84
119
85
-
Install an ODM release named `myodmsample` (if you choose a different release name, you need to edit the file [database.properties](src/ilog.rules.studio.samples.bomdomainpopulate/src/main/resources/data/database.properties)):
120
+
If you are on Openshift, you can use this [values.yaml](./src/ilog.rules.studio.samples.bomdomainpopulate/values.yaml) file by replacing `<FILESERVER_URL>` with the actual URL of the file server hosting the JARs.
> **NOTE**: If you choose a **different** release name, you must edit the value of `database.url` parameter accordingly in the [database.properties](src/ilog.rules.studio.samples.bomdomainpopulate/src/main/resources/data/database.properties), [rebuild](README-KUBERNETES.md#1-build-the-sample-code) the `bomdomainpopulate-1.0.jar`, and upload the JAR to the file server again.
89
127
90
128
## 4. Configuring Decision Center
91
129
92
130
The class that implements the customization must be declared:
93
-
- either using a custom setting
94
-
- or using a JVM parameter
131
+
- either using a custom setting at Business Console
132
+
- *or* using a JVM parameter
95
133
96
134
### 4.1 Using a custom setting
97
-
1. Log in into the Business Console as an admin
135
+
1. Log in to the Business Console. Use the following credentials if you install with the [values.yaml](./src/ilog.rules.studio.samples.bomdomainpopulate/values.yaml) for OCP:
136
+
- **Username**: `odmAdmin`
137
+
- **Password**: `odmAdmin`
98
138
1. Navigate to **Administration > Settings > Custom Settings**
99
139
1. Click the *Add custom setting* **icon** and set:
100
140
- name = `teamserver.derbyDataBaseDomainProvider`
101
141
- description = `derbyDataBaseDomainProvider`
102
142
- type = `String`
103
-
- leave `default value` empty
104
-
1. Set the value to `ilog.rules.studio.samples.bomdomainpopulate.DataBaseDomainValueProvider`
143
+
- leave `default value` empty. Save the setting.
144
+
1. Set the value of this new custom setting to `ilog.rules.studio.samples.bomdomainpopulate.DataBaseDomainValueProvider`.
105
145
106
146
### 4.2 Using a JVM parameter
107
147
108
-
Follow instructions similar to [here](https://www.ibm.com/docs/en/odm/9.0.0?topic=kubernetes-persisting-decision-center-ruleset-cache) to add the JVM parameter below: (using ina Config Map referenced by the Helm parameter **decisionCenter.jvmOptionsRef**)
148
+
Follow instructions as described [here](https://www.ibm.com/docs/en/odm/9.0.0?topic=kubernetes-persisting-decision-center-ruleset-cache) to create a Config Map with the additional JVM parameter below:
1. Import the rule project archive `projects/bomdomainpopulate-rules.zip`.
180
+
1. Import the rule project archive `dynamicdomain/projects/bomdomainpopulate-rules.zip`.
137
181
> Note: this rule project `bomdomainpopulate-rules` is only aimed at editing rules to demonstrate loading domains from a database. It is missing a deployment configuration and cannot be executed.
138
-
1. Display the rule `CheckOrder > OrderType`. Notice the error **Value (string) 'CompanyX' is incorrect**. Edit the rule and either remove **"CompanyX"** and press SPACE or double-click **"CompanyX"**. A list of suitable companies gets displayed in a drop-down. Close down the rule without saving.
182
+
1. Display the rule `CheckOrder > OrderType`. An error **Value (string) 'CompanyX' is incorrect** is displayed. Edit the rule and either remove **"CompanyX"** and press SPACE or double-click **"CompanyX"**. A list of suitable companies gets displayed in a drop-down. Close down the rule **without** saving.
139
183
1. Display the rule `CheckCurrency > CurrencyRestriction`. No warning is displayed.
140
184
1. Let's now make some changes in the dynamic domains in the database. Run:
1. Display the rule `CheckOrder > OrderType` back again. Notice that there is no error anymore. The effects of the changes done in the database are taken into account automatically because the values that the field `stock` can take are dynamically fetched from the database (and not stored in the BOM).
190
+
1. Display the rule `CheckOrder > OrderType` back again. Notice that there is no error anymore. The effects of the changes (the addition of `CompanyX` and `CompanyY`) done in the database are taken into account automatically because the values that the field `stock` can take are dynamically fetched from the database (and not stored in the BOM).
147
191
1. Conversely if you display the rule `CheckCurrency > CurrencyRestriction`, there is still no warning. So let's now import the changes done in the database into the BOM. Click the **Model** tab, and then the **Dynamic Domains** sub-tab. Expand all the three domains. You should see this: (Notice that the **Australian Dollar** was removed)
Copy file name to clipboardExpand all lines: decisioncenter/dynamicdomain/README.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# BOM dynamic domain Sample
1
+
# BOM dynamic domain sample
2
2
3
3
## Introduction
4
4
@@ -19,9 +19,9 @@ In this sample, you will :
19
19
- store new values of the dynamic domains in a database,
20
20
- update the rule project with the new values of the dynamic domains.
21
21
22
-
## Running this sample in Rule Designer
22
+
## 1. Running the sample in Rule Designer
23
23
24
-
### 1) Building the Eclipse plugin
24
+
### 1.1 Building the Eclipse plugin
25
25
26
26
To use the sample in Rule Designer, you need to build an Eclipse plugin.
27
27
- In Eclipse, make sure that,
@@ -31,27 +31,27 @@ To use the sample in Rule Designer, you need to build an Eclipse plugin.
31
31
- Select the folder `decisioncenter/dynamicdomain/src/ilog.rules.studio.samples.bomdomainpopulate`
32
32
- Tick the project `ilog.rules.studio.samples.bomdomainpopulate` and click **Finish**
33
33
- Right-click the `build-bomdomainepopulate.xml` file and click **Run as > Ant Build**. A file named `bomdomainpopulate.jar` gets generated at the root of the project.
34
-
-Click **Export > Plug-in Development > Deployable Plug-ins and fragments** to build the plugin. Click **Next**, choose`<ECLIPSE_HOME>/dropins` as the destination directory (where `<ECLIPSE_HOME` should be replaced by the HOME directory of the running Eclipse), and click **Finish**.
34
+
-Right-click on the project and click **Export > Plug-in Development > Deployable Plug-ins and fragments** to build the plugin. Click **Next**, enter`<ECLIPSE_HOME>/dropins` as the destination directory (where `<ECLIPSE_HOME>` should be replaced by the HOME directory of the running Eclipse), and click **Finish**.
35
35
- Restart Eclipse.
36
36
37
37
>Note: if you modify the plugin and deploy it again, start Eclipse with the `-clean` parameter to force a cache update.
38
38
39
-
### 2) Instructions to use the sample in Rule Designer
39
+
### 1.2 Instructions to use the sample in Rule Designer
40
40
41
41
- Import the projects below located in the `decisioncenter/dynamicdomain/projects/` directory:
42
42
- bomdomainpopulate-bd-helper
43
43
- bomdomainpopulate-rules
44
44
- bomdomainpopulate-xom
45
45
46
-
- Follow the [instructions from the documentation](https://www.ibm.com/docs/en/odm/9.0.0?topic=domains-data-sources-bom-sample-details).
46
+
- Follow the [instructions from the documentation](https://www.ibm.com/docs/en/odm/9.0.0?topic=domains-data-sources-bom-sample-details) to try out how the sample works in Rule Designer.
47
47
48
-
## Running this sample in Decision Center
48
+
## 2. Running the sample in Decision Center
49
49
50
-
### 1) Prerequisites
50
+
### 2.1 Prerequisites
51
51
52
52
Ensure you have at least Docker 24.0.x (and optionally Kubernetes 1.27+).
53
53
54
-
### 2) Configuring how to connect to the database (kubernetes only)
54
+
### 2.2 Configuring how to connect to the database (kubernetes only)
55
55
56
56
If you deploy ODM on Docker, there is nothing to configure.
0 commit comments