diff options
Diffstat (limited to 'kubernetes/sdnc/resources/config')
-rwxr-xr-x | kubernetes/sdnc/resources/config/bin/startODL.sh | 33 | ||||
-rw-r--r-- | kubernetes/sdnc/resources/config/conf/lcm-dg.properties | 18 |
2 files changed, 38 insertions, 13 deletions
diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh index 288ce11b8b..86f45d3fbd 100755 --- a/kubernetes/sdnc/resources/config/bin/startODL.sh +++ b/kubernetes/sdnc/resources/config/bin/startODL.sh @@ -38,18 +38,14 @@ function enable_odl_cluster(){ 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}-0.{{.Values.service.name}}-cluster.{{.Release.Namespace}}"; - - for ((i=1;i<${SDNC_REPLICAS};i++)); - do - 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 + if $GEO_ENABLED; then echo "This is a Geo cluster" + if [ -z $IS_PRIMARY_CLUSTER ] || [ -z $MY_ODL_CLUSTER ] || [ -z $PEER_ODL_CLUSTER ]; then + echo "IS_PRIMARY_CLUSTER, MY_ODL_CLUSTER and PEER_ODL_CLUSTER must all be configured in Env field" + return + fi + if $IS_PRIMARY_CLUSTER; then PRIMARY_NODE=${MY_ODL_CLUSTER} SECONDARY_NODE=${PEER_ODL_CLUSTER} @@ -60,7 +56,19 @@ function enable_odl_cluster(){ fi node_list="${PRIMARY_NODE} ${SECONDARY_NODE}" + /opt/onap/sdnc/bin/configure_geo_cluster.sh $((node_index+member_offset)) ${node_list} + else + echo "This is a local cluster" + + node_list="${node}-0.{{.Values.service.name}}-cluster.{{.Release.Namespace}}"; + + for ((i=1;i<${SDNC_REPLICAS};i++)); + do + 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} fi } @@ -73,10 +81,9 @@ 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} MYSQL_HOST=${MYSQL_HOST:-{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}} -IS_PRIMARY_CLUSTER=${IS_PRIMARY_CLUSTER:-false} -MY_ODL_CLUSTER=${MY_ODL_CLUSTER:-127.0.0.1} +ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false} +GEO_ENABLED=${GEO_ENABLED:-false} # # Wait for database to init properly diff --git a/kubernetes/sdnc/resources/config/conf/lcm-dg.properties b/kubernetes/sdnc/resources/config/conf/lcm-dg.properties new file mode 100644 index 0000000000..625cf63e03 --- /dev/null +++ b/kubernetes/sdnc/resources/config/conf/lcm-dg.properties @@ -0,0 +1,18 @@ +ansible.agenturl=http://{{.Values.config.ansibleServiceName}}:{{.Values.config.ansiblePort}}/Dispatch +ansible.user=sdnc +ansible.password=sdnc +ansible.lcm.localparameters= +ansible.nodelist= +ansible.timeout=60 +ansible.version=0.00 +lcm.upgrade-pre-check.playbookname=ansible_precheck +lcm.upgrade-post-check.playbookname=ansible_postcheck +lcm.upgrade-software.playbookname=ansible_upgradesw +restapi.templateDir=/opt/onap/sdnc/restapi/templates +restapi.lcm.dmaap.publish.templatefile=lcm-dmaap-publish-template.json +lcm.dmaap.url=http://message-router.{{.Release.Namespace}}:{{.Values.config.dmaapPort}}/events/SDNC-LCM-WRITE +lcm.dmaap.user=admin +lcm.dmaap.password=admin +lcm.dmaap.version=1.0 +lcm.dmaap.partition=SDNC-LCM-WRITE +lcm.dmaap.type=response
\ No newline at end of file |