Thomas Vachuska | a48e3d1 | 2015-06-02 09:43:29 -0700 | [diff] [blame] | 1 | #!/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 | |
| 9 | node=${1:-$OCI} |
| 10 | remote=$ONOS_USER@$node |
| 11 | |
| 12 | ssh $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 Vachuska | 750ab04 | 2015-06-17 10:42:15 -0700 | [diff] [blame] | 20 | # Setup a few symlinks to allow other tools to work |
Thomas Vachuska | a48e3d1 | 2015-06-02 09:43:29 -0700 | [diff] [blame] | 21 | sudo ln -s /tmp/$ONOS_BITS $ONOS_INSTALL_DIR |
Thomas Vachuska | 750ab04 | 2015-06-17 10:42:15 -0700 | [diff] [blame] | 22 | sudo ln -s /tmp/$ONOS_BITS/$KARAF_DIST/data/log $ONOS_INSTALL_DIR/log |
Thomas Vachuska | a48e3d1 | 2015-06-02 09:43:29 -0700 | [diff] [blame] | 23 | " |