The script validate-odm.sh is now available for you to perform a minimal acceptance validation of ODM automatically.
This can be used to validate custom images of ODM or an ODM instance deployed on a kubernetes cluster using the odm helm chart.
The script configuration requires environment variables defining the ODM endpoints and authentication parameters to use.
It accepts basic and OpenID authentication methods.
This bash script executes curl
commands on the Rest API of the components to validate the following scenario:
-
-
Run the Main Scoring test suite
-
deploy the test_deployment and production_deployment RuleApps
-
Verify the deployment in RES
-
Execute a RuleSet in DSR and verify its result
-
[Optional] Delete the RuleApps in RES
Prerequisites
You need the following ODM components to be running: Decision Center (DC), Decision Server Console (RES) and Decision Server Runtime (DSR).
Take a note of the endpoints of your components.
Usage
- Get the script source folder
$ wget https://github.com/DecisionsDev/odm-ondocker/releases/latest/download/validate-odm-script.zip
$ unzip validate-odm-script.zip
$ cd validate-odm
- Define the required environment variables to configure ODM endpoints and credentials, refer to Environment Variables section for more information.
You can fill the provided
.env.template
file:
$ mv .env.template .env
$ vi .env
- Run the script
./validate-odm.sh
📥 Upload Decision Service to DC: COMPLETED
🧪 Running Main Scoring test suite in DC ...
▪ Wait for Main Scoring test suite to be completed in DC: DONE
▪ Test report status in DC: SUCCEEDED
🚀 Deploy RuleApp test_deployment/1.0 to DC: COMPLETED
🔎 Verifying test_deployment RuleApp deployment ...
▪ Get RuleApp test_deployment/1.0 in RES: DONE
▪ Verify last RuleSet deployed test_deployment/1.0/loan_validation_production/1.0 in RES: SUCCEEDED
▪ Verify last RuleSet deployed test_deployment/1.0/loan_validation_with_score_and_grade/1.0 in RES: SUCCEEDED
🚀 Deploy RuleApp production_deployment/1.0 to DC: COMPLETED
🔎 Verifying test_deployment RuleApp deployment ...
▪ Get RuleApp production_deployment/1.0 in RES: DONE
▪ Verify last RuleSet deployed production_deployment/1.0/loan_validation_production/1.0 in RES: SUCCEEDED
🧪 Running RuleSet test ...
▪ Test RuleSet production_deployment/1.0/loan_validation_production/1.0 in DSR: COMPLETED
▪ Check RuleSet test result in DSR: SUCCEEDED
🎉 ODM has been successfully validated!
Note: To be able to see the emojis, a font like fonts-noto-color-emoji
should be installed in your terminal.
Environment variables
The script requires the following environment variables to be defined either manually or in a .env
file:
- ODM endpoints:
DC_URL
: Endpoint of the Decision Center instance to test
RES_URL
: Endpoint of the Decision Server Console (RES) instance to test
DSR_URL
: Endpoint of the Decision Server Runtime instance to test
Note: Endpoint corresponds to the service URL or the route URL without the context route of the application.
- Authentication configuration:
- To use basic authentication mode, define:
ODM_CREDS
: Credentials to connect to ODM using the format <user>:<password>
- To use OpenID authentication mode, define:
ODM_CREDS
: Credentials to get the token using the format <clientId>:<clientSecret>
OPENID_URL
: URL of the OpenId Server
Cleaning
You can use the option -c
to delete the created RuleApps in Decision Server Console at the end of the validation process.
Resources