Fixed incorrect "Env vars" description in onos.sh.
Modified onos.sh so that ZooKeeper logdir can be configurable.
Fixed onos.py so that Hazelcast properly works.
 - Made onos_node.conf, hazelcast.xml and logback.xml to be specific for each instance.
Added note about Hazelcast config file to onos.properties.

Change-Id: I0fd3367fa38c0a7ee1b774977ca52e5202e02b04
diff --git a/onos.sh b/onos.sh
index dbf2739..9bc7a3d 100755
--- a/onos.sh
+++ b/onos.sh
@@ -6,12 +6,13 @@
 # $ONOS_CONF       : path of ONOS node config file (~/ONOS/conf/onos_node.`hostname`.conf or onos_node.conf)
 # $ONOS_PROPS      : path of ONOS properties file (~/ONOS/conf/onos.properties)
 # $ONOS_LOGBACK    : path of logback config file (~/ONOS/conf/logback.`hostname`.xml)
-# $LOGDIR          : path of log output directory (~/ONOS/onos-logs)
-# $LOGBASE         : base name of log output file (onos.`hostname`)
+# $ONOS_LOGDIR     : path of log output directory (~/ONOS/onos-logs)
+# $ONOS_LOGBASE    : base name of log output file (onos.`hostname`)
 # $RAMCLOUD_HOME   : path of root directory of RAMCloud repository (~/ramcloud)
 # $RAMCLOUD_BRANCH : branch name of RAMCloud to use (master)
 # $ZK_HOME         : path of root directory of ZooKeeper (~/zookeeper-3.4.5)
 # $ZK_LIB_DIR      : path of ZooKeeper library (/var/lib/zookeeper)
+# $ZK_LOG_DIR      : path of ZooKeeper log output directory (~/ONOS/onos-logs/zk-`hostname`)
 # $JVM_OPTS        : JVM options ONOS starts with
 # $ZK_CONF         : path of ZooKeeper config file (~/ONOS/conf/zoo.cfg)
 # $HC_CONF         : path of Hazelcast config file (~/ONOS/conf/hazelcast.xml)
@@ -62,7 +63,7 @@
 ZK_CONF=${ZK_CONF:-${ONOS_CONF_DIR}/zoo.cfg}
 ZK_CONF_TEMPLATE=${ONOS_TEMPLATE_DIR}/zoo.cfg.template
 # Adding ONOS_HOST_NAME dir since file name (zookeeper.out) cannot be controlled.
-ZK_LOG_DIR=${ONOS_HOME}/onos-logs/${ONOS_HOST_NAME}
+ZK_LOG_DIR=${ZK_LOG_DIR:-${ONOS_HOME}/onos-logs/zk-${ONOS_HOST_NAME}}
 ZK_LIB_DIR=${ZK_LIB_DIR:-/var/lib/zookeeper}
 ZK_MY_ID=${ZK_LIB_DIR}/myid
 
@@ -124,6 +125,8 @@
 
 JVM_OPTS="$JVM_OPTS -Dhazelcast.logging.type=slf4j"
 
+JVM_OPTS="${JVM_OPTS} -Dnet.onrc.onos.core.datagrid.HazelcastDatagrid.datagridConfig=${HC_CONF}"
+
 # Uncomment to dump final JVM flags to stdout
 #JVM_OPTS="$JVM_OPTS -XX:+PrintFlagsFinal"