X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/722fbc71928e7fc6b91eb101788b51c2bb9577eb..fc3e2c30b85c138fdbdf440f4f29f5f710de2814:/tools/salt-install/installer.sh diff --git a/tools/salt-install/installer.sh b/tools/salt-install/installer.sh index 7bd789f689..37f1baf20e 100755 --- a/tools/salt-install/installer.sh +++ b/tools/salt-install/installer.sh @@ -64,20 +64,31 @@ case "$subcmd" in source ${CONFIG_FILE} - git commit -m"prepare for deploy" + set -x + + git add -A + if ! git diff --cached --exit-code ; then + git commit -m"prepare for deploy" + fi for NODE in "${!NODES[@]}" do - if ! ssh $NODE test -d arvados-setup.git ; then - ssh $NODE git init --bare arvados-setup.git - git add remote $NODE $DEPLOY_USER@$NODE:arvados-setup.git - git push $NODE - ssh $NODE git clone arvados-setup.git arvados-setup + if test $NODE = localhost ; then + sudo ./provision.sh --config local.params --roles ${NODES[$NODE]} + else + if ! ssh $NODE test -d arvados-setup ; then + ssh $NODE git init --bare arvados-setup.git + if ! git remote add $NODE $DEPLOY_USER@$NODE:arvados-setup.git ; then + git remote set-url $NODE $DEPLOY_USER@$NODE:arvados-setup.git + fi + git push $NODE master + ssh $NODE git clone arvados-setup.git arvados-setup + fi + + git push $NODE master + ssh $NODE git -C arvados-setup pull + + ssh $DEPLOY_USER@$NODE "cd arvados-setup && sudo ./provision.sh --config local.params --roles ${NODES[$NODE]}" fi - - git push $NODE master - ssh $NODE git -C arvados-setup pull - - ssh $DEPLOY_USER@$NODE "cd arvados-setup && sudo ./provision.sh --config local.params --roles ${NODES[$NODE]}" done ;; *)