19215: Check for git and ip tools
authorPeter Amstutz <peter.amstutz@curii.com>
Fri, 30 Sep 2022 20:20:57 +0000 (16:20 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Fri, 30 Sep 2022 20:20:57 +0000 (16:20 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

doc/_includes/_download_installer.liquid
tools/salt-install/installer.sh

index 280308beb13747249e7eed82196f7f10650246f0..d8b6fe0d3a186a39d43e62d9f27e8079e9cba724 100644 (file)
@@ -20,9 +20,12 @@ The @install.sh@ and @provision.sh@ scripts will help you deploy Arvados by prep
 
 h2(#copy_config). Initialize the installer
 
+Replace "xarv1" with the cluster id you selected earlier.
+
 <notextile>
-<pre><code>./installer.sh initialize ~/setup-arvados-xarv1 {{local_params_src}} {{config_examples_src}}
-cd ~/setup-arvados-xarv1
+<pre><code>CLUSTER=xarv1
+./installer.sh initialize ~/setup-arvados-${CLUSTER} {{local_params_src}} {{config_examples_src}}
+cd ~/setup-arvados-${CLUSTER}
 </code></pre>
 </notextile>
 
index 2b576893a8aca56511b6d4d301d00fe105cafc8b..ea79cfd660f4d5af77216c77bec55d3d0ee01e9a 100755 (executable)
@@ -42,6 +42,19 @@ declare DEPLOY_USER
 # This will be populated by loadconfig()
 declare GITTARGET
 
+checktools() {
+    MISSING=''
+    for a in git ip ; do
+       if ! which $a ; then
+           MISSING="$MISSING $a"
+       fi
+    done
+    if [[ -n "$MISSING" ]] ; then
+       echo "Some tools are missing, please make sure you have the 'git' and 'iproute2' packages installed"
+       exit 1
+    fi
+}
+
 sync() {
     local NODE=$1
     local BRANCH=$2
@@ -122,6 +135,8 @@ case "$subcmd" in
            exit
        fi
 
+       checktools
+
        set +u
        SETUPDIR=$1
        PARAMS=$2
@@ -170,6 +185,8 @@ case "$subcmd" in
        NODE=$1
        set -u
 
+       checktools
+
        loadconfig
 
        if grep -rni 'fixme' ${CONFIG_FILE} ${CONFIG_DIR} ; then