Thomas Vachuska
Committed by Gerrit Code Review

Fixing onos-setup-karaf to always generate tablets.json and cluster.json config …

…files without having to specify 'clean' option.

Change-Id: I23b4d86fb5bdfd5e93a0d7fa8e18de8ecdbc2bee
......@@ -94,19 +94,17 @@ if [ ! -f $KARAF_ROOT/lib/onos-branding-$ONOS_POM_VERSION.jar ]; then
$KARAF_ROOT/lib
fi
if [ ! -d $STAGE/config ]; then
echo "Creating local cluster configs for IP $IP..."
mkdir -p $STAGE/config
cat > $STAGE/config/cluster.json <<EOF
echo "Creating local cluster configs for IP $IP..."
[ -d $STAGE/config ] || mkdir -p $STAGE/config
cat > $STAGE/config/cluster.json <<EOF
{ "ipPrefix": "$SUBNET.*",
"nodes":[ { "id": "$IP", "ip": "$IP", "tcpPort": 9876 }]}
EOF
cat > $STAGE/config/tablets.json <<EOF
cat > $STAGE/config/tablets.json <<EOF
{ "nodes": [ { "ip": "$IP", "id": "$IP", "tcpPort": 7238 }],
"partitions": { "p1": [ { "ip": "$IP", "id": "$IP", "tcpPort": 7238 }]}}
EOF
fi
echo "Setting up hazelcast.xml for subnet $SUBNET.*..."
cp $ONOS_ROOT/tools/package/etc/hazelcast.xml $KARAF_ROOT/etc/hazelcast.xml
......