[arvados] updated: 2.1.0-2625-gfb4570855
git repository hosting
git at public.arvados.org
Mon Jun 27 01:22:25 UTC 2022
Summary of changes:
tools/salt-install/installer.sh | 50 ++++++++++++++--------
.../local.params.example.multiple_hosts | 15 ++++---
2 files changed, 39 insertions(+), 26 deletions(-)
via fb457085545ac2ed304e076369a53c75250bc9de (commit)
from 0b390995fc59d54a97ffda1a9fc50bf0e2599e2f (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 fb457085545ac2ed304e076369a53c75250bc9de
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Sun Jun 26 21:22:03 2022 -0400
18870: Refactor sync
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 2024c2cd1..6fdd0320f 100755
--- a/tools/salt-install/installer.sh
+++ b/tools/salt-install/installer.sh
@@ -6,25 +6,35 @@
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]}"
+sync() {
+ if test $NODE = localhost ; then
+ # nothing to do
+ 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
+}
+
+deploynode() {
+ if test -z "${NODES[$NODE]}" ; then
+ echo "No roles declared for '$NODE' in local.params"
+ exit 1
+ fi
+
+ if test $NODE = localhost ; then
+ sudo ./provision.sh --config local.params --roles ${NODES[$NODE]}
+ else
+ ssh $DEPLOY_USER@$NODE "cd arvados-setup && sudo ./provision.sh --config local.params --roles ${NODES[$NODE]}"
+ fi
}
subcmd="$1"
@@ -76,7 +86,7 @@ case "$subcmd" in
git commit -m"initial commit"
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
@@ -98,9 +108,11 @@ case "$subcmd" in
if test -z "$NODE"; then
for NODE in "${!NODES[@]}"
do
+ sync
deploynode
done
else
+ sync
deploynode
fi
;;
diff --git a/tools/salt-install/local.params.example.multiple_hosts b/tools/salt-install/local.params.example.multiple_hosts
index 404d8b005..edbee413b 100644
--- a/tools/salt-install/local.params.example.multiple_hosts
+++ b/tools/salt-install/local.params.example.multiple_hosts
@@ -8,7 +8,8 @@
# The Arvados cluster ID, needs to be 5 lowercase alphanumeric characters.
CLUSTER="cluster_fixme_or_this_wont_work"
-# The domainname you want tou give to your cluster's hosts
+# The domain name you want to give to your cluster's hosts
+# the end result hostnames will be $SERVICE.$CLUSTER.$DOMAIN
DOMAIN="domain_fixme_or_this_wont_work"
# For multi-node installs, the ssh log in for each node
@@ -20,12 +21,12 @@ DEPLOY_USER=root
# it for the specified roles.
declare -A NODES
NODES=(
- [controller.$DOMAIN]=api,controller,websocket,dispatcher,keepbalance
- [keep0.$DOMAIN]=keepstore
- [keep1.$DOMAIN]=keepstore
- [keep.$DOMAIN]=keepproxy,keepweb
- [workbench.$DOMAIN]=workbench,workbench2,webshell
- [shell.$DOMAIN]=shell
+ [controller.${CLUSTER}.$DOMAIN]=api,controller,websocket,dispatcher,keepbalance
+ [keep0.${CLUSTER}.$DOMAIN]=keepstore
+ [keep1.${CLUSTER}.$DOMAIN]=keepstore
+ [keep.${CLUSTER}.$DOMAIN]=keepproxy,keepweb
+ [workbench.${CLUSTER}.$DOMAIN]=workbench,workbench2,webshell
+ [shell.${CLUSTER}.$DOMAIN]=shell
)
# Host SSL port where you want to point your browser to access Arvados
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list