In preparation for dynamic clustering support:
- Added Cluster metadata service and metadata store interfaces
- Added a static cluster metadata store implementation that is backed by a local file.
- Consolidated the existing cluster.json and tablets.json metadata files into a single cluster.json file that has all the cluster related metadata.
- Removed dependency on ONOS_NIC env variable.
Change-Id: Ia0a8bb69740caecdcdde71a9408be37c56ae2504
diff --git a/tools/test/bin/onos-config b/tools/test/bin/onos-config
index 348cb83..e37dc3b 100755
--- a/tools/test/bin/onos-config
+++ b/tools/test/bin/onos-config
@@ -37,17 +37,6 @@
# ONOS builtin apps and providers ignited by default
export ONOS_APPS="${ONOS_APPS:-drivers,openflow}"
-# Generate a cluster.json from the ON* environment variables
-CDEF_FILE=/tmp/${remote}.cluster.json
-echo "{ \"ipPrefix\": \"$ONOS_NIC\"," > $CDEF_FILE
-echo " \"nodes\":[" >> $CDEF_FILE
-for node in $(env | sort | egrep "OC[2-9]+" | cut -d= -f2); do
- echo " { \"id\": \"$node\", \"ip\": \"$node\", \"tcpPort\": 9876 }," >> $CDEF_FILE
-done
-echo " { \"id\": \"$OC1\", \"ip\": \"$OC1\", \"tcpPort\": 9876 }" >> $CDEF_FILE
-echo "]}" >> $CDEF_FILE
-scp -q $CDEF_FILE $remote:$ONOS_INSTALL_DIR/config/cluster.json
-
ssh $remote "
echo \"onos.ip = \$(sudo ifconfig | grep $ONOS_NIC | cut -d: -f2 | cut -d\\ -f1)\" \
>> $ONOS_INSTALL_DIR/$KARAF_DIST/etc/system.properties
@@ -66,10 +55,10 @@
done
"
-# Generate a default tablets.json from the ON* environment variables
-TDEF_FILE=/tmp/${remote}.tablets.json
-onos-gen-partitions $TDEF_FILE
-scp -q $TDEF_FILE $remote:$ONOS_INSTALL_DIR/config/tablets.json
+# Generate a default cluster.json from the ON* environment variables
+CDEF_FILE=/tmp/${remote}.cluster.json
+onos-gen-partitions $CDEF_FILE
+scp -q $CDEF_FILE $remote:$ONOS_INSTALL_DIR/config/cluster.json
# Copy tools/package/config/ to remote
scp -qr ${ONOS_ROOT}/tools/package/config/ $remote:$ONOS_INSTALL_DIR/