summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/resources/config/bin
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/sdnc/resources/config/bin')
-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}