[ARVADOS] created: 2.1.0-2246-g4aa711722

Git user git at public.arvados.org
Fri Apr 8 21:31:30 UTC 2022


        at  4aa7117228caac24eaa7db489bdf772f6f0e6ab0 (commit)


commit 4aa7117228caac24eaa7db489bdf772f6f0e6ab0
Author: Javier Bértoli <jbertoli at curii.com>
Date:   Fri Apr 8 18:30:51 2022 -0300

    16375: Add multinode testing code
    
    Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli at curii.com>

diff --git a/tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls b/tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls
index b92c818b8..58c5f6d14 100644
--- a/tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls
+++ b/tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
 ---
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
@@ -72,14 +74,21 @@ arvados:
       host: __DATABASE_INT_IP__
       password: "__DATABASE_PASSWORD__"
       user: __CLUSTER___arvados
-      encoding: en_US.utf8
-      client_encoding: UTF8
+      extra_conn_params:
+        client_encoding: UTF8
+      # Centos7 does not enable SSL by default, so we disable
+      # it here just for testing of the formula purposes only.
+      # You should not do this in production, and should
+      # configure Postgres certificates correctly
+      {%- if grains.os_family in ('RedHat',) %}
+        sslmode: disable
+      {%- endif %}
 
     tls:
       # certificate: ''
       # key: ''
-      # required to test with arvados-snakeoil certs
-      insecure: false
+      # When using arvados-snakeoil certs set insecure: true
+      insecure: true
 
     resources:
       virtual_machines:
diff --git a/tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls b/tools/salt-install/config_examples/multi_host/aws/pillars/arvados_development.sls
similarity index 51%
copy from tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls
copy to tools/salt-install/config_examples/multi_host/aws/pillars/arvados_development.sls
index b92c818b8..21712d972 100644
--- a/tools/salt-install/config_examples/multi_host/aws/pillars/arvados.sls
+++ b/tools/salt-install/config_examples/multi_host/aws/pillars/arvados_development.sls
@@ -1,8 +1,13 @@
+# -*- coding: utf-8 -*-
+# vim: ft=yaml
 ---
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0
 
+# This config file is used to test a multi-node deployment using a local
+# dispatcher. This setup is not recommended for production use.
+
 # The variables commented out are the default values that the formula uses.
 # The uncommented values are REQUIRED values. If you don't set them, running
 # this formula will fail.
@@ -54,11 +59,6 @@ arvados:
   ## should be set to that of the web server, usually `www-data`
   #   group: root
   #   mode: 640
-  dispatcher:
-    pkg:
-      name: arvados-dispatch-cloud
-    service:
-      name: arvados-dispatch-cloud
 
   ### ARVADOS CLUSTER CONFIG
   cluster:
@@ -69,17 +69,24 @@ arvados:
       # max concurrent connections per arvados server daemon
       # connection_pool_max: 32
       name: __CLUSTER___arvados
-      host: __DATABASE_INT_IP__
+      host: 127.0.0.1
       password: "__DATABASE_PASSWORD__"
       user: __CLUSTER___arvados
-      encoding: en_US.utf8
-      client_encoding: UTF8
+      extra_conn_params:
+        client_encoding: UTF8
+      # Centos7 does not enable SSL by default, so we disable
+      # it here just for testing of the formula purposes only.
+      # You should not do this in production, and should
+      # configure Postgres certificates correctly
+      {%- if grains.os_family in ('RedHat',) %}
+        sslmode: disable
+      {%- endif %}
 
     tls:
       # certificate: ''
       # key: ''
-      # required to test with arvados-snakeoil certs
-      insecure: false
+      # When using arvados-snakeoil certs set insecure: true
+      insecure: true
 
     resources:
       virtual_machines:
@@ -107,48 +114,27 @@ arvados:
             Email: __INITIAL_USER_EMAIL__
             Password: __INITIAL_USER_PASSWORD__
 
-    ### CONTAINERS
-    Containers:
-      MaxRetryAttempts: 10
-      CloudVMs:
-        ResourceTags:
-          Name: __CLUSTER__-compute-node
-        BootProbeCommand: 'systemctl is-system-running'
-        ImageID: ami-FIXMEFIXMEFIXMEFI
-        Driver: ec2
-        DriverParameters:
-          Region: FIXME
-          EBSVolumeType: gp2
-          AdminUsername: FIXME
-          ### This SG should allow SSH from the dispatcher to the compute nodes
-          SecurityGroupIDs: ['sg-FIXMEFIXMEFIXMEFI']
-          SubnetID: subnet-FIXMEFIXMEFIXMEFI
-      DispatchPrivateKey: |
-        -----BEGIN OPENSSH PRIVATE KEY-----
-        Read https://doc.arvados.org/install/crunch2-cloud/install-compute-node.html#sshkeypair
-        for details on how to create this key.
-        FIXMEFIXMEFIXMEFI
-        -----END OPENSSH PRIVATE KEY-----
-
     ### VOLUMES
     ## This should usually match all your `keepstore` instances
     Volumes:
       # the volume name will be composed with
       # <cluster>-nyw5e-<volume>
       __CLUSTER__-nyw5e-000000000000000:
+        AccessViaHosts:
+          'http://__KEEPSTORE0_INT_IP__:25107':
+            ReadOnly: false
         Replication: 2
-        Driver: S3
+        Driver: Directory
         DriverParameters:
-          Bucket: __CLUSTER__-nyw5e-000000000000000-volume
-          IAMRole: __CLUSTER__-keepstore-00-iam-role
-          Region: FIXME
-      __CLUSTER__-nyw5e-0000000000000001:
+          Root: /tmp
+      __CLUSTER__-nyw5e-000000000000001:
+        AccessViaHosts:
+          'http://__KEEPSTORE1_INT_IP__:25107':
+            ReadOnly: false
         Replication: 2
-        Driver: S3
+        Driver: Directory
         DriverParameters:
-          Bucket: __CLUSTER__-nyw5e-000000000000001-volume
-          IAMRole: __CLUSTER__-keepstore-01-iam-role
-          Region: FIXME
+          Root: /tmp
 
     Users:
       NewUsersAreActive: true
@@ -161,16 +147,13 @@ arvados:
         ExternalURL: 'https://__CLUSTER__.__DOMAIN__:__CONTROLLER_EXT_SSL_PORT__'
         InternalURLs:
           'http://localhost:8003': {}
-      DispatchCloud:
-        InternalURLs:
-          'http://__CONTROLLER_INT_IP__:9006': {}
       Keepbalance:
         InternalURLs:
-          'http://localhost:9005': {}
+          'http://__CONTROLLER_INT_IP__:9005': {}
       Keepproxy:
-        ExternalURL: 'https://keep.__CLUSTER__.__DOMAIN__:__KEEP_EXT_SSL_PORT__'
+        ExternalURL: 'https://__CLUSTER__.__DOMAIN__:__KEEP_EXT_SSL_PORT__'
         InternalURLs:
-          'http://localhost:25107': {}
+          'http://__KEEP_INT_IP__:25100': {}
       Keepstore:
         InternalURLs:
           'http://__KEEPSTORE0_INT_IP__:25107': {}
@@ -179,80 +162,18 @@ arvados:
         InternalURLs:
           'http://localhost:8004': {}
       WebDAV:
-        ExternalURL: 'https://*.collections.__CLUSTER__.__DOMAIN__:__KEEPWEB_EXT_SSL_PORT__/'
+        ExternalURL: 'https://__CLUSTER__.__DOMAIN__:__KEEPWEB_EXT_SSL_PORT__'
         InternalURLs:
           'http://localhost:9002': {}
       WebDAVDownload:
-        ExternalURL: 'https://download.__CLUSTER__.__DOMAIN__:__KEEPWEB_EXT_SSL_PORT__'
+        ExternalURL: 'https://__CLUSTER__.__DOMAIN__:__KEEPWEB_EXT_SSL_PORT__'
       WebShell:
-        ExternalURL: 'https://webshell.__CLUSTER__.__DOMAIN__:__KEEPWEB_EXT_SSL_PORT__'
+        ExternalURL: 'https://__CLUSTER__.__DOMAIN__:__WEBSHELL_EXT_SSL_PORT__'
       Websocket:
-        ExternalURL: 'wss://ws.__CLUSTER__.__DOMAIN__/websocket'
+        ExternalURL: 'wss://__CLUSTER__.__DOMAIN__:__WEBSOCKET_EXT_SSL_PORT__/websocket'
         InternalURLs:
-          'http://localhost:8005': {}
+          'http://__WEBSOCKET_INT_IP__:8005': {}
       Workbench1:
-        ExternalURL: 'https://workbench.__CLUSTER__.__DOMAIN__:__WORKBENCH1_EXT_SSL_PORT__'
+        ExternalURL: 'https://__CLUSTER__.__DOMAIN__:__WORKBENCH1_EXT_SSL_PORT__'
       Workbench2:
-        ExternalURL: 'https://workbench2.__CLUSTER__.__DOMAIN__:__WORKBENCH2_EXT_SSL_PORT__'
-
-    InstanceTypes:
-      t3small:
-        ProviderType: t3.small
-        VCPUs: 2
-        RAM: 2GiB
-        AddedScratch: 50GB
-        Price: 0.0208
-      c5large:
-        ProviderType: c5.large
-        VCPUs: 2
-        RAM: 4GiB
-        AddedScratch: 50GB
-        Price: 0.085
-      m5large:
-        ProviderType: m5.large
-        VCPUs: 2
-        RAM: 8GiB
-        AddedScratch: 50GB
-        Price: 0.096
-      c5xlarge:
-        ProviderType: c5.xlarge
-        VCPUs: 4
-        RAM: 8GiB
-        AddedScratch: 100GB
-        Price: 0.17
-      m5xlarge:
-        ProviderType: m5.xlarge
-        VCPUs: 4
-        RAM: 16GiB
-        AddedScratch: 100GB
-        Price: 0.192
-      m5xlarge_extradisk:
-        ProviderType: m5.xlarge
-        VCPUs: 4
-        RAM: 16GiB
-        AddedScratch: 400GB
-        Price: 0.193
-      c52xlarge:
-        ProviderType: c5.2xlarge
-        VCPUs: 8
-        RAM: 16GiB
-        AddedScratch: 200GB
-        Price: 0.34
-      m52xlarge:
-        ProviderType: m5.2xlarge
-        VCPUs: 8
-        RAM: 32GiB
-        AddedScratch: 200GB
-        Price: 0.384
-      c54xlarge:
-        ProviderType: c5.4xlarge
-        VCPUs: 16
-        RAM: 32GiB
-        AddedScratch: 400GB
-        Price: 0.68
-      m54xlarge:
-        ProviderType: m5.4xlarge
-        VCPUs: 16
-        RAM: 64GiB
-        AddedScratch: 400GB
-        Price: 0.768
+        ExternalURL: 'https://__CLUSTER__.__DOMAIN__:__WORKBENCH2_EXT_SSL_PORT__'
diff --git a/tools/salt-install/provision.sh b/tools/salt-install/provision.sh
index f6e3bb3ae..44f3d4dff 100755
--- a/tools/salt-install/provision.sh
+++ b/tools/salt-install/provision.sh
@@ -12,6 +12,17 @@
 
 set -o pipefail
 
+_exit_handler() {
+  local rc="$?"
+  trap - EXIT
+  if [ "$rc" -ne 0 ]; then
+    echo "Error occurred ($rc) while running $0 at line $1 : $BASH_COMMAND"
+  fi
+  exit "$rc"
+}
+
+trap '_exit_handler $LINENO' EXIT ERR
+
 # capture the directory that the script is running from
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 
@@ -350,9 +361,9 @@ echo "...arvados"
 git clone --quiet https://git.arvados.org/arvados-formula.git ${F_DIR}/arvados
 
 # If we want to try a specific branch of the formula
-if [ "x${BRANCH}" != "x" ]; then
+if [ "x${BRANCH}" != "x" -a $(git rev-parse --abbrev-ref HEAD) != "${BRANCH}" ]; then
   ( cd ${F_DIR}/arvados && git checkout --quiet -t origin/"${BRANCH}" -b "${BRANCH}" )
-elif [ "x${ARVADOS_TAG}" != "x" ]; then
+elif [ "x${ARVADOS_TAG}" != "x" -a $(git rev-parse --abbrev-ref HEAD) != "${ARVADOS_TAG}" ]; then
 ( cd ${F_DIR}/arvados && git checkout --quiet tags/"${ARVADOS_TAG}" -b "${ARVADOS_TAG}" )
 fi
 
@@ -671,6 +682,7 @@ else
         sed -i "s/__NGINX_INSTALL_SOURCE__/${NGINX_INSTALL_SOURCE}/g" ${P_DIR}/nginx_passenger.sls
       ;;
       "controller" | "websocket" | "workbench" | "workbench2" | "webshell" | "keepweb" | "keepproxy")
+        NGINX_INSTALL_SOURCE="install_from_repo"
         # States
         if [ "${R}" = "workbench" ]; then
           NGINX_INSTALL_SOURCE="install_from_phusionpassenger"
@@ -751,7 +763,7 @@ else
                     s#__CERT_PEM__#/etc/nginx/ssl/arvados-${R}.pem#g;
                     s#__CERT_KEY__#/etc/nginx/ssl/arvados-${R}.key#g" \
             ${P_DIR}/nginx_${R}_configuration.sls
-            grep -q ${R} ${P_DIR}/extra_custom_certs.sls || echo "  - ${R}" >> ${P_DIR}/extra_custom_certs.sls
+            grep -q ${R}$ ${P_DIR}/extra_custom_certs.sls || echo "  - ${R}" >> ${P_DIR}/extra_custom_certs.sls
           fi
         fi
         # We need to tweak the Nginx's pillar depending whether we want plain nginx or nginx+passenger
@@ -796,15 +808,17 @@ fi
 
 # Leave a copy of the Arvados CA so the user can copy it where it's required
 if [ "$DEV_MODE" = "yes" ]; then
-  echo "Copying the Arvados CA certificate to the installer dir, so you can import it"
+  ARVADOS_SNAKEOIL_CA_DEST_FILE="${SCRIPT_DIR}/${CLUSTER}.${DOMAIN}-arvados-snakeoil-ca.pem"
+
   # If running in a vagrant VM, also add default user to docker group
   if [ "x${VAGRANT}" = "xyes" ]; then
-    cp /etc/ssl/certs/arvados-snakeoil-ca.pem /vagrant/${CLUSTER}.${DOMAIN}-arvados-snakeoil-ca.pem
-
     echo "Adding the vagrant user to the docker group"
     usermod -a -G docker vagrant
-  else
-    cp /etc/ssl/certs/arvados-snakeoil-ca.pem ${SCRIPT_DIR}/${CLUSTER}.${DOMAIN}-arvados-snakeoil-ca.pem
+    ARVADOS_SNAKEOIL_CA_DEST_FILE="/vagrant/${CLUSTER}.${DOMAIN}-arvados-snakeoil-ca.pem"
+  fi
+  if [ -f /etc/ssl/certs/arvados-snakeoil-ca.pem ]; then
+    echo "Copying the Arvados CA certificate to the installer dir, so you can import it"
+    cp /etc/ssl/certs/arvados-snakeoil-ca.pem ${ARVADOS_SNAKEOIL_CA_DEST_FILE}
   fi
 fi
 
diff --git a/tools/salt-install/tests/run-test.sh b/tools/salt-install/tests/run-test.sh
index cf43273a1..805d8259e 100755
--- a/tools/salt-install/tests/run-test.sh
+++ b/tools/salt-install/tests/run-test.sh
@@ -9,13 +9,13 @@ export ARVADOS_API_HOST_INSECURE=true
 
 set -o pipefail
 
-# First, validate that the CA is installed and that we can query it with no errors.
-if ! curl -s -o /dev/null https://${ARVADOS_API_HOST}/users/welcome?return_to=%2F; then
-  echo "The Arvados CA was not correctly installed. Although some components will work,"
-  echo "others won't. Please verify that the CA cert file was installed correctly and"
-  echo "retry running these tests."
-  exit 1
-fi
+# # First, validate that the CA is installed and that we can query it with no errors.
+# if ! curl -s -o /dev/null https://${ARVADOS_API_HOST}/users/welcome?return_to=%2F; then
+#   echo "The Arvados CA was not correctly installed. Although some components will work,"
+#   echo "others won't. Please verify that the CA cert file was installed correctly and"
+#   echo "retry running these tests."
+#   exit 1
+# fi
 
 # https://doc.arvados.org/v2.0/install/install-jobs-image.html
 echo "Creating Arvados Standard Docker Images project"

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list