aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMandeep Khinda <Mandeep.Khinda@amdocs.com>2018-04-20 18:59:07 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-20 18:59:07 +0000
commit214d1cd3201e1778e1545bb9df03a0e447fcfd8c (patch)
tree6ce1f8868e5797a2d5fdd136e016964e6fc164b1
parentdf82a596ddec19bdb16af3b1673cbf149b339573 (diff)
parent702d105ef26c9868632aab515484ae7eef1fea4e (diff)
Merge "Fix startODL.sh"
-rwxr-xr-xkubernetes/sdnc/resources/config/bin/startODL.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh
index aa5b6d1479..288ce11b8b 100755
--- a/kubernetes/sdnc/resources/config/bin/startODL.sh
+++ b/kubernetes/sdnc/resources/config/bin/startODL.sh
@@ -34,17 +34,17 @@ function enable_odl_cluster(){
hm=$(hostname)
echo "Get current Hostname ${hm}"
- node=($(echo ${hm} | tr '-' '\n'))
- node_name=${node[0]}
- node_index=${node[1]}
+ node=($(echo ${hm} | sed 's/-[0-9]*$//g'))
+ node_index=($(echo ${hm} | awk -F"-" '{print $NF}'))
+ member_offset=1
if [ -z $PEER_ODL_CLUSTER ]; then
echo "This is a local cluster"
- node_list="${node_name}-0.{{.Values.service.name}}-cluster.{{.Release.Namespace}}";
+ node_list="${node}-0.{{.Values.service.name}}-cluster.{{.Release.Namespace}}";
for ((i=1;i<${SDNC_REPLICAS};i++));
do
- node_list="${node_list} ${node_name}-$i.{{.Values.service.name}}-cluster.{{.Release.Namespace}}"
+ node_list="${node_list} ${node}-$i.{{.Values.service.name}}-cluster.{{.Release.Namespace}}"
done
/opt/opendaylight/current/bin/configure_cluster.sh $((node_index+1)) ${node_list}
else
@@ -70,6 +70,7 @@ function enable_odl_cluster(){
ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
+CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
SLEEP_TIME=${SLEEP_TIME:-120}
MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}}
ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false}
@@ -95,6 +96,7 @@ then
echo "Installing SDN-C keyStore"
${SDNC_HOME}/bin/addSdncKeyStore.sh
echo "Starting OpenDaylight"
+ ${CCSDK_HOME}/bin/installOdlHostKey.sh
${ODL_HOME}/bin/start
echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
sleep ${SLEEP_TIME}