blob: 74ce559dca8df552db54de9cab5e16a6d03d2d96 [file] [log] [blame]
Thomas Vachuskaa48e3d12015-06-02 09:43:29 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Untars ONOS tar.gz on the remote machine and runs ONOS.
4# -----------------------------------------------------------------------------
5
6[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7. $ONOS_ROOT/tools/build/envDefaults
8
9node=${1:-$OCI}
10remote=$ONOS_USER@$node
11
12ssh $remote "
13 [ -d $ONOS_INSTALL_DIR/bin ] && echo \"ONOS is already installed\" && exit 1
14 cd /tmp && rm -fr /tmp/$ONOS_BITS
15 tar zxf /tmp/$ONOS_BITS.tar.gz
16
17 cd /tmp/$ONOS_BITS
18 bin/onos-service server 1>/tmp/onos.out 2>/tmp/onos.err &
19
20 # Setup a symlink to allow other tools to work
21 sudo ln -s /tmp/$ONOS_BITS $ONOS_INSTALL_DIR
22"