blob: b6e6ef0328a2dacdfcd837832819d01d46f9ee7b [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
Thomas Vachuska750ab042015-06-17 10:42:15 -070020 # Setup a few symlinks to allow other tools to work
Thomas Vachuskaa48e3d12015-06-02 09:43:29 -070021 sudo ln -s /tmp/$ONOS_BITS $ONOS_INSTALL_DIR
Thomas Vachuska750ab042015-06-17 10:42:15 -070022 sudo ln -s /tmp/$ONOS_BITS/$KARAF_DIST/data/log $ONOS_INSTALL_DIR/log
Thomas Vachuskaa48e3d12015-06-02 09:43:29 -070023"