diff options
author | Trevor Tait <rtait@amdocs.com> | 2018-04-20 11:21:09 -0400 |
---|---|---|
committer | Trevor Tait <rtait@amdocs.com> | 2018-04-20 11:43:41 -0400 |
commit | 702d105ef26c9868632aab515484ae7eef1fea4e (patch) | |
tree | febffca1fc6c77ff8e24dba9e99c8fa979a10453 /kubernetes/sdnc/resources | |
parent | eb47e3e157856c02b957fb3816cad29e016fa98c (diff) |
Fix startODL.sh
Issue-ID: SDNC-286
Change-Id: I223e97c634deac5d235701f30e755b86b13a27ad
Signed-off-by: Trevor Tait <rtait@amdocs.com>
Diffstat (limited to 'kubernetes/sdnc/resources')
-rwxr-xr-x | kubernetes/sdnc/resources/config/bin/startODL.sh | 12 |
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} |