Refactored startup script.
- Added onos_node.cfg as centralized config file
- To configure choice of backend (hazelcast/ramcloud)
- To configure ZooKeeper cluster member
- To create myid
- To configure default startup mode (single-node/coord-node/server-node)
- To configure RAMCloud address/port
- Added "onos.sh setup" option to create logback.xml and zoo.cfg
- A few bugfixes
Change-Id: I76fd23967087ad73ae42742288b8c548c2c2202f
diff --git a/conf/onos_node.conf b/conf/onos_node.conf
new file mode 100644
index 0000000..acc74a0
--- /dev/null
+++ b/conf/onos_node.conf
@@ -0,0 +1,38 @@
+# Name of this host (`hostname` by default)
+host.name = onosdev1
+
+# IP address of this host used for ONOS communication
+host.ip = 127.0.0.1
+
+# Role of this host
+# single-node: run ONOS with RAMCloud coordinator and server
+# coord-node : run ONOS with RAMCloud coordinator
+# server-node: run ONOS with RAMCloud server
+host.role = single-node
+
+# Back-end module to store topology/flows
+host.backend = hazelcast
+#host.backend = ramcloud
+
+# List of host name/IPs that constitute ZooKeeper cluster
+# myid will be assigned incrementally according to order of list
+zookeeper.hosts = onosdev1
+#zookeeper.hosts = onosdev1,onosdev2,onosdev3,onosdev4
+
+# Protocol used by RAMCloud coordinator (fast+udp by default)
+#ramcloud.coordinator.protocol = fast+udp
+
+# IP address of RAMCloud coordinator (host.ip by default)
+#ramcloud.coordinator.ip = 127.0.0.1
+
+# Port number of RAMCloud coordinator (12246 by default)
+#ramcloud.coordinator.port = 12246
+
+# Protocol used by RAMCloud server (fast+udp by default)
+#ramcloud.server.protocol = fast+udp
+
+# IP address of RAMCloud server (host.ip by default)
+#ramcloud.server.ip = 127.0.0.1
+
+# Port number of RAMCloud server (12242 by default)
+#ramcloud.server.port = 12242
diff --git a/conf/zoo.cfg.template b/conf/zoo.cfg.template
new file mode 100644
index 0000000..39dc329
--- /dev/null
+++ b/conf/zoo.cfg.template
@@ -0,0 +1,37 @@
+# The number of milliseconds of each tick
+tickTime=2000
+# The number of ticks that the initial
+# synchronization phase can take
+initLimit=10
+# The number of ticks that can pass between
+# sending a request and getting an acknowledgement
+syncLimit=5
+# the directory where the snapshot is stored.
+# do not use /tmp for storage, /tmp here is just
+# example sakes.
+dataDir=__DATADIR__
+# the port at which the clients will connect
+clientPort=2181
+#
+# specify all servers in the Zookeeper ensemble
+#server.1=onosgui1:2888:3888
+#server.2=onosgui2:2888:3888
+#server.3=onosgui3:2888:3888
+#server.4=onosgui4:2888:3888
+#server.5=onosgui5:2888:3888
+#server.6=onosgui6:2888:3888
+#server.7=onosgui7:2888:3888
+#server.8=onosgui8:2888:3888
+#
+#
+# Be sure to read the maintenance section of the
+# administrator guide before turning on autopurge.
+#
+# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
+#
+# The number of snapshots to retain in dataDir
+#autopurge.snapRetainCount=3
+# Purge task interval in hours
+# Set to "0" to disable auto purge feature
+#autopurge.purgeInterval=1
+__HOSTS__