[arvados] updated: 2.1.0-2944-g2a3754695

git repository hosting git at public.arvados.org
Fri Sep 30 20:49:33 UTC 2022


Summary of changes:
 tools/salt-install/installer.sh | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

       via  2a375469539ea0fe7c47d8f4ba1726caff99eedb (commit)
      from  1c064386fd4ae04f349ca629beb13aa10a4d421b (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 2a375469539ea0fe7c47d8f4ba1726caff99eedb
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Fri Sep 30 16:49:08 2022 -0400

    19215: Making installer.sh work for single node
    
    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 ea79cfd66..b8c7e52a6 100755
--- a/tools/salt-install/installer.sh
+++ b/tools/salt-install/installer.sh
@@ -43,7 +43,7 @@ declare DEPLOY_USER
 declare GITTARGET
 
 checktools() {
-    MISSING=''
+    local MISSING=''
     for a in git ip ; do
 	if ! which $a ; then
 	    MISSING="$MISSING $a"
@@ -99,8 +99,9 @@ deploynode() {
     # the appropriate roles.
 
     if [[ -z "$ROLES" ]] ; then
-	echo "No roles declared for '$NODE' in ${CONFIG_FILE}"
-	exit 1
+	echo "No roles specified for $NODE, will deploy all roles"
+    else
+	ROLES="--roles ${ROLES}"
     fi
 
     logfile=deploy-${NODE}-$(date -Iseconds).log
@@ -110,9 +111,9 @@ deploynode() {
 	if [[ $(whoami) != 'root' ]] ; then
 	    SUDO=sudo
 	fi
-	$SUDO ./provision.sh --config ${CONFIG_FILE} --roles ${ROLES} 2>&1 | tee $logfile
+	$SUDO ./provision.sh --config ${CONFIG_FILE} ${ROLES} 2>&1 | tee $logfile
     else
-	ssh $DEPLOY_USER@$NODE "cd ${GITTARGET} && sudo ./provision.sh --config ${CONFIG_FILE} --roles ${ROLES}" 2>&1 | tee $logfile
+	ssh $DEPLOY_USER@$NODE "cd ${GITTARGET} && sudo ./provision.sh --config ${CONFIG_FILE} ${ROLES}" 2>&1 | tee $logfile
     fi
 }
 
@@ -124,7 +125,10 @@ loadconfig() {
     GITTARGET=arvados-deploy-config-${CLUSTER}
 }
 
+set +u
 subcmd="$1"
+set -u
+
 if [[ -n "$subcmd" ]] ; then
     shift
 fi
@@ -217,7 +221,7 @@ case "$subcmd" in
 	    do
 		# Do 'database' role first,
 		if [[ "${NODES[$NODE]}" =~ database ]] ; then
-		    deploynode $NODE ${NODES[$NODE]}
+		    deploynode $NODE "${NODES[$NODE]}"
 		    unset NODES[$NODE]
 		fi
 	    done
@@ -226,7 +230,7 @@ case "$subcmd" in
 	    do
 		# then  'api' or 'controller' roles
 		if [[ "${NODES[$NODE]}" =~ (api|controller) ]] ; then
-		    deploynode $NODE ${NODES[$NODE]}
+		    deploynode $NODE "${NODES[$NODE]}"
 		    unset NODES[$NODE]
 		fi
 	    done
@@ -235,12 +239,12 @@ 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]}"
 	    done
 	else
 	    # Just deploy the node that was supplied on the command line.
 	    sync $NODE $BRANCH
-	    deploynode $NODE
+	    deploynode $NODE ""
 	fi
 
 	echo

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list