From ca15b920b57259eccc7dbaea5200f393d3f8bfe6 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 10 Oct 2017 16:18:27 -0400 Subject: Add ability to turn off policy preload You can now set environment variable to override whether or not the policies are pre-loaded by the engines during docker image startup. The README.md is updated with instructions. Each docker-compose has a different default set. The .env file is set to load policies by default to true. You can override by either changing this file or setting the environment: export PRELOAD_POLICIES=false Issue-ID: POLICY-304 Change-Id: Ia96788ac3b8d47814eea1046d96c4e3e4a0b9664 Signed-off-by: Pamela Dragosh --- config/pe/push-policies.sh | 6 ++++++ 1 file changed, 6 insertions(+) mode change 100644 => 100755 config/pe/push-policies.sh (limited to 'config/pe') diff --git a/config/pe/push-policies.sh b/config/pe/push-policies.sh old mode 100644 new mode 100755 index 77f94c0f..d50706de --- a/config/pe/push-policies.sh +++ b/config/pe/push-policies.sh @@ -12,6 +12,12 @@ sleep 2 curl -v --silent -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -F "file=@cl-amsterdam-template.drl" -F "importParametersJson={\"serviceName\":\"ClosedLoopControlName\",\"serviceType\":\"BRMSPARAM\"}" 'http://pdp:8081/pdp/api/policyEngineImport' +echo "PRELOAD_POLICIES is $PRELOAD_POLICIES" + +if [ "$PRELOAD_POLICIES" == "false" ]; then + exit 0 +fi + #########################################Create BRMS Param policies########################################## echo "Create BRMSParam Operational Policies" -- cgit 1.2.3-korg