Skip to content

Commit abc1bcd

Browse files
committed
https://github.ibm.com/dba/icp4a-defects/issues/4780
1 parent 97d3049 commit abc1bcd

File tree

3 files changed

+81
-2
lines changed

3 files changed

+81
-2
lines changed

decisioncenter/script/rundc.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@ $SCRIPT/setTimeZone.sh
2525

2626
. $SCRIPT/setUTF8Locale.sh
2727

28-
if [ -s "$SCRIPT/customEnd.sh" ]
28+
if [ -s "$SCRIPT/customEnd.sh" ]
2929
then
30-
$SCRIPT/customEnd.sh
30+
$SCRIPT/customEnd.sh
31+
fi
32+
33+
if [ -n "$DEMO" ]
34+
then
35+
$SCRIPT/updateDemoServers.sh &
3136
fi
3237

3338
/opt/ibm/wlp/bin/server run defaultServer

decisioncenter/script/updateDCConfigurations.sh

100644100755
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ then
253253
sed -i 's|/DecisionRunner|'$DECISIONRUNNER_CONTEXT_ROOT/DecisionRunner'|g' $DC_SERVER_CONFIG
254254
fi
255255

256+
if [ -n "$DEMO" ]
257+
then
258+
echo "Update flag to allow update of existing server definition in $DC_SERVER_CONFIG"
259+
sed -i 's|false|true|g' $DC_SERVER_CONFIG
260+
fi
261+
256262
if [ -s "/config/auth/ldap-configurations.xml" ]
257263
then
258264
echo "Update LDAP synchronization mode to users in decisioncenter-configuration.properties"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/bin/bash
2+
3+
sleep 60
4+
5+
PROTOCOL=http
6+
7+
if [ -n "$ENABLE_TLS" ]
8+
then
9+
PROTOCOL=https
10+
fi
11+
12+
DSC_HOST=odm-decisionserverconsole
13+
14+
if [ -n "$DECISIONSERVERCONSOLE_NAME" ]
15+
then
16+
DSC_HOST=$DECISIONSERVERCONSOLE_NAME
17+
fi
18+
19+
DR_HOST=odm-decisionrunner
20+
21+
if [ -n "$DECISIONRUNNER_NAME" ]
22+
then
23+
DR_HOST=$DECISIONRUNNER_NAME
24+
fi
25+
26+
DSC_PORT=9080
27+
28+
if [ -n "$DECISIONSERVERCONSOLE_PORT" ]
29+
then
30+
DSC_PORT=$DECISIONSERVERCONSOLE_PORT
31+
fi
32+
33+
DR_PORT=9080
34+
35+
if [ -n "$DECISIONRUNNER_PORT" ]
36+
then
37+
DR_PORT=$DECISIONRUNNER_PORT
38+
fi
39+
40+
DSE_URL=$PROTOCOL"://"$DSC_HOST":"$DSC_PORT"/res"
41+
42+
DR_URL=$PROTOCOL"://"$DR_HOST":"$DR_PORT"/DecisionRunner"
43+
44+
retry=0
45+
while [[ ("$(curl -X POST "http://localhost:9060/decisioncenter-api/v1/servers/d8cb5830-14aa-45e0-89e2-8837f4d91021" -H "Content-Type: application/json;charset=UTF-8" -d "{ \"url\": \"$DSE_URL\"}" -H "authorization: Basic b2RtQWRtaW46b2RtQWRtaW4=" -w "%{http_code}" -s -o /dev/null)" != 200) && ( $retry -lt 10) ]];do
46+
echo "try updating Decision Service Execution with $DSE_URL"
47+
sleep 5
48+
retry=$((retry + 1))
49+
done
50+
51+
if [[ $retry == 10 ]];then
52+
echo "failed to update Decision Service Execution with $DSE_URL"
53+
else
54+
echo "successfully updated Decision Service Execution with $DSE_URL"
55+
fi
56+
57+
retry=0
58+
while [[ ("$(curl -X POST "http://localhost:9060/decisioncenter-api/v1/servers/a677f1c1-8633-42ff-8e4e-994fb52b3384" -H "Content-Type: application/json;charset=UTF-8" -d "{ \"url\": \"$DR_URL\"}" -H "authorization: Basic b2RtQWRtaW46b2RtQWRtaW4=" -w "%{http_code}" -s -o /dev/null)" != 200) && ( $retry -lt 10) ]];do
59+
echo "try updating Test and Simulation Execution with $DR_URL"
60+
sleep 5
61+
retry=$((retry + 1))
62+
done
63+
64+
if [[ $retry == 10 ]];then
65+
echo "failed to update Test and Simulation Execution with $DR_URL"
66+
else
67+
echo "successfully updated Test and Simulation Execution with $DR_URL"
68+
fi

0 commit comments

Comments
 (0)