[arvados] updated: 2.1.0-2624-g0b390995f

git repository hosting git at public.arvados.org
Mon Jun 27 00:46:54 UTC 2022


Summary of changes:
 tools/salt-install/installer.sh | 51 ++++++++++++++++++++++++++---------------
 1 file changed, 32 insertions(+), 19 deletions(-)

       via  0b390995fc59d54a97ffda1a9fc50bf0e2599e2f (commit)
       via  161172379f58e4ef3ac26c175d62ee6b1a2bcbc5 (commit)
      from  e67249f53f7d4b1c46cbd9270f1776d354c8895b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0b390995fc59d54a97ffda1a9fc50bf0e2599e2f
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Sun Jun 26 20:46:41 2022 -0400

    18870: Deploy individual nodes
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/tools/salt-install/installer.sh b/tools/salt-install/installer.sh
index b901651e7..2024c2cd1 100755
--- a/tools/salt-install/installer.sh
+++ b/tools/salt-install/installer.sh
@@ -6,6 +6,27 @@
 
 set -e
 
+deploynode() {
+	    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 $BRANCH
+		    ssh $NODE git clone arvados-setup.git arvados-setup
+		fi
+
+		git push $NODE $BRANCH
+		ssh $NODE git -C arvados-setup checkout $BRANCH
+		ssh $NODE git -C arvados-setup pull
+
+		ssh $DEPLOY_USER@$NODE "cd arvados-setup && sudo ./provision.sh --config local.params --roles ${NODES[$NODE]}"
+	    fi
+}
+
 subcmd="$1"
 if test -n "$subcmd" ; then
     shift
@@ -57,6 +78,7 @@ case "$subcmd" in
 	echo "setup directory initialized, now go to $SETUPDIR, edit 'local.params' and 'local_config_dir' as needed, then run 'installer.sh deploy'"
     ;;
     deploy)
+	NODE=$1
 	CONFIG_FILE=local.params
 	if ! test -s $CONFIG_FILE ; then
 	    echo "Must be run from arvados-setup, maybe you need to 'initialize' first?"
@@ -72,27 +94,15 @@ case "$subcmd" in
 	if ! git diff --cached --exit-code ; then
 	    git commit -m"prepare for deploy"
 	fi
-	for NODE in "${!NODES[@]}"
-	do
-	    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 $BRANCH
-		    ssh $NODE git clone arvados-setup.git arvados-setup
-		fi
 
-		git push $NODE $BRANCH
-		ssh $NODE git -C arvados-setup checkout $BRANCH
-		ssh $NODE git -C arvados-setup pull
-
-		ssh $DEPLOY_USER@$NODE "cd arvados-setup && sudo ./provision.sh --config local.params --roles ${NODES[$NODE]}"
-	    fi
-	done
+	if test -z "$NODE"; then
+	    for NODE in "${!NODES[@]}"
+	    do
+		deploynode
+	    done
+	else
+	    deploynode
+	fi
 	;;
     *)
 	echo "Arvados installer"

commit 161172379f58e4ef3ac26c175d62ee6b1a2bcbc5
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Sun Jun 26 19:43:26 2022 -0400

    18870: Flexible branch naming
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/tools/salt-install/installer.sh b/tools/salt-install/installer.sh
index 37f1baf20..b901651e7 100755
--- a/tools/salt-install/installer.sh
+++ b/tools/salt-install/installer.sh
@@ -66,6 +66,8 @@ case "$subcmd" in
 
 	set -x
 
+	BRANCH=$(git branch --show-current)
+
 	git add -A
 	if ! git diff --cached --exit-code ; then
 	    git commit -m"prepare for deploy"
@@ -80,11 +82,12 @@ case "$subcmd" in
 		    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
+		    git push $NODE $BRANCH
 		    ssh $NODE git clone arvados-setup.git arvados-setup
 		fi
 
-		git push $NODE master
+		git push $NODE $BRANCH
+		ssh $NODE git -C arvados-setup checkout $BRANCH
 		ssh $NODE git -C arvados-setup pull
 
 		ssh $DEPLOY_USER@$NODE "cd arvados-setup && sudo ./provision.sh --config local.params --roles ${NODES[$NODE]}"

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list