X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f1a48936453b1017d192a40b0b84d71777011071..bcbba709ff8e7a186a3adf917ca8e5aee673a8ab:/tools/salt-install/installer.sh diff --git a/tools/salt-install/installer.sh b/tools/salt-install/installer.sh index 37007da7b6..d2f58fd03d 100755 --- a/tools/salt-install/installer.sh +++ b/tools/salt-install/installer.sh @@ -106,10 +106,13 @@ sync() { deploynode() { local NODE=$1 local ROLES=$2 + local BRANCH=$3 # Deploy a node. This runs the provision script on the node, with # the appropriate roles. + sync $NODE $BRANCH + if [[ -z "$ROLES" ]] ; then echo "No roles specified for $NODE, will deploy all roles" else @@ -289,17 +292,15 @@ case "$subcmd" in if [[ -z "$NODE" ]]; then for NODE in "${!NODES[@]}" do - # First, push the git repo to each node. This also - # confirms that we have git and can log into each - # node. - sync $NODE $BRANCH + # First, just confirm we can ssh to each node. + `ssh_cmd "$NODE"` $DEPLOY_USER@$NODE true done for NODE in "${!NODES[@]}" do # Do 'database' role first, if [[ "${NODES[$NODE]}" =~ database ]] ; then - deploynode $NODE "${NODES[$NODE]}" + deploynode $NODE "${NODES[$NODE]}" $BRANCH unset NODES[$NODE] fi done @@ -326,12 +327,11 @@ case "$subcmd" in do # Everything else (we removed the nodes that we # already deployed from the list) - deploynode $NODE "${NODES[$NODE]}" + deploynode $NODE "${NODES[$NODE]}" $BRANCH done else # Just deploy the node that was supplied on the command line. - sync $NODE $BRANCH - deploynode $NODE "${NODES[$NODE]}" + deploynode $NODE "${NODES[$NODE]}" $BRANCH fi set +x