Thomas Vachuska | a132e3a | 2015-02-21 01:53:14 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Remotely pushes bits to all remote nodes in preparation for install. |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1 |
| 7 | . $ONOS_ROOT/tools/build/envDefaults |
| 8 | |
Thomas Vachuska | 4a9d63e | 2015-05-21 12:15:36 -0700 | [diff] [blame] | 9 | OCT=${OCT:-$OCI} |
Thomas Vachuska | a132e3a | 2015-02-21 01:53:14 -0800 | [diff] [blame] | 10 | node=${1:-$OCT} |
| 11 | remote=$ONOS_USER@$node |
| 12 | shift |
| 13 | |
| 14 | echo "Pushing to proxy $node..." |
| 15 | onos-push-bits $node |
| 16 | |
Thomas Vachuska | 4a9d63e | 2015-05-21 12:15:36 -0700 | [diff] [blame] | 17 | others=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2 | grep -v $OCT) |
Thomas Vachuska | a132e3a | 2015-02-21 01:53:14 -0800 | [diff] [blame] | 18 | |
| 19 | for other in $others; do |
| 20 | echo "Pushing to $other..." |
| 21 | ssh $remote "scp $ONOS_TAR $ONOS_USER@$other:$ONOS_TAR" |
| 22 | done |