Charles M.C. Chan
Committed by Pavlin Radoslavov

ONOS-487: Allow ONOS to be installed using different user/group

Change-Id: Ica926a2a6e0870e3aeab1e1585073196358c8184
...@@ -33,4 +33,5 @@ export ONOS_ZIP=$ONOS_STAGE.zip ...@@ -33,4 +33,5 @@ export ONOS_ZIP=$ONOS_STAGE.zip
33 export ONOS_INSTALL_DIR="/opt/onos" # Installation directory on remote 33 export ONOS_INSTALL_DIR="/opt/onos" # Installation directory on remote
34 export OCI="${OCI:-192.168.56.101}" # ONOS Controller Instance 34 export OCI="${OCI:-192.168.56.101}" # ONOS Controller Instance
35 export ONOS_USER="${ONOS_USER:-sdn}" # ONOS user on remote system 35 export ONOS_USER="${ONOS_USER:-sdn}" # ONOS user on remote system
36 +export ONOS_GROUP="${ONOS_GROUP:-sdn}" # ONOS group on remote system
36 export ONOS_PWD="rocks" # ONOS user password on remote system 37 export ONOS_PWD="rocks" # ONOS user password on remote system
......
...@@ -77,7 +77,7 @@ function cell { ...@@ -77,7 +77,7 @@ function cell {
77 if [ -n "$1" ]; then 77 if [ -n "$1" ]; then
78 [ ! -f $ONOS_ROOT/tools/test/cells/$1 ] && \ 78 [ ! -f $ONOS_ROOT/tools/test/cells/$1 ] && \
79 echo "No such cell: $1" >&2 && return 1 79 echo "No such cell: $1" >&2 && return 1
80 - unset ONOS_CELL ONOS_NIC ONOS_FEATURES 80 + unset ONOS_CELL ONOS_NIC ONOS_FEATURES ONOS_USER ONOS_GROUP
81 unset OC0 OC1 OC2 OC3 OC4 OC5 OC6 OC7 OC8 OC9 OCN OCI 81 unset OC0 OC1 OC2 OC3 OC4 OC5 OC6 OC7 OC8 OC9 OCN OCI
82 export ONOS_CELL=$1 82 export ONOS_CELL=$1
83 . $ONOS_ROOT/tools/test/cells/$1 83 . $ONOS_ROOT/tools/test/cells/$1
......
...@@ -27,7 +27,7 @@ ssh $remote " ...@@ -27,7 +27,7 @@ ssh $remote "
27 [ -d $ONOS_INSTALL_DIR/bin ] && echo \"ONOS is already installed\" && exit 1 27 [ -d $ONOS_INSTALL_DIR/bin ] && echo \"ONOS is already installed\" && exit 1
28 28
29 # Prepare a landing zone and unroll the bits 29 # Prepare a landing zone and unroll the bits
30 - sudo mkdir -p $ONOS_INSTALL_DIR && sudo chown ${ONOS_USER}:${ONOS_USER} $ONOS_INSTALL_DIR 30 + sudo mkdir -p $ONOS_INSTALL_DIR && sudo chown ${ONOS_USER}:${ONOS_GROUP} $ONOS_INSTALL_DIR
31 tar zxmf /tmp/$ONOS_BITS.tar.gz -C $ONOS_INSTALL_DIR --strip-components=1 31 tar zxmf /tmp/$ONOS_BITS.tar.gz -C $ONOS_INSTALL_DIR --strip-components=1
32 32
33 # Make a link to the log file directory and make a home for auxiliaries 33 # Make a link to the log file directory and make a home for auxiliaries
......