From: Luis Gomez Date: Thu, 29 Oct 2015 23:36:51 +0000 (+0000) Subject: Merge "Configure clustering on a list of controllers." X-Git-Tag: release/beryllium~430 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=00b1f5fe743c81105ffe57b94a726bcbb53344b5;hp=1cdb24cd5633315baa263394530fbcfad912f221;p=releng%2Fbuilder.git Merge "Configure clustering on a list of controllers." --- diff --git a/jjb/integration/include-raw-integration-configure-clustering-list.sh b/jjb/integration/include-raw-integration-configure-clustering-list.sh new file mode 100644 index 000000000..77301b123 --- /dev/null +++ b/jjb/integration/include-raw-integration-configure-clustering-list.sh @@ -0,0 +1,108 @@ +#!/bin/bash +# +# Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v1.0 which accompanies this distribution, +# and is available at http://www.eclipse.org/legal/epl-v10.html +# + + +echo "#################################################" +echo "## Configure Cluster and Start ##" +echo "#################################################" + +AKKACONF=/tmp/${BUNDLEFOLDER}/configuration/initial/akka.conf +MODULESCONF=/tmp/${BUNDLEFOLDER}/configuration/initial/modules.conf +MODULESHARDSCONF=/tmp/${BUNDLEFOLDER}/configuration/initial/module-shards.conf +JOLOKIACONF=/tmp/${BUNDLEFOLDER}/deploy/jolokia.xml + +# Create the list of controllers from the CONTROLLER_LIST variable +ODL_SYSTEM_IPS=( ${ODL_SYSTEM_IP_LIST//,/ } ) + +# Utility function for joining strings. +function join { + delim=',\n\t\t' + final=$1; shift + + for str in $* ; do + final=${final}${delim}${str} + done + + echo ${final} +} + +# Create the strings for data and rpc seed nodes +# First create various arrays with one element per controller. +# Then merge each array using the join utility defined above. +count=1 +for ip in ${ODL_SYSTEM_IPS[@]} ; do + data_seed_nodes[$count]=\\\"akka.tcp:\\/\\/opendaylight-cluster-data@${ip}:2550\\\" + rpc_seed_nodes[$count]=\\\"akka.tcp:\\/\\/odl-cluster-rpc@${ip}:2551\\\" + member_names[$count]=\\\"member-${count}\\\" + count=$[count + 1] +done +data_seed_list=$(join ${data_seed_nodes[@]}) +rpc_seed_list=$(join ${rpc_seed_nodes[@]}) +member_name_list=$(join ${member_names[@]}) + +# echo ${ODL_SYSTEM_IP_LIST} +# echo ${ODL_SYSTEM_IPS[@]} +# echo ${data_seed_list} +# echo ${rpc_seed_list} +# echo ${member_name_list} + +# Create the configuration script to be run on controllers. +cat > ${WORKSPACE}/configuration-script.sh <