X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4aa7117228caac24eaa7db489bdf772f6f0e6ab0..0b4945244d55214b331adabce38e33800b55b3e1:/tools/salt-install/provision.sh diff --git a/tools/salt-install/provision.sh b/tools/salt-install/provision.sh index 44f3d4dffc..c9e535fad2 100755 --- a/tools/salt-install/provision.sh +++ b/tools/salt-install/provision.sh @@ -274,7 +274,7 @@ if [ ! -z "${HOSTNAME_EXT}" ] ; then # Make sure that the value configured as IP_INT is a real IP on the system. # If we don't error out early here when there is a mismatch, the formula will # fail with hard to interpret nginx errors later on. - ip addr list |grep -q "${IP_INT}/" + ip addr list |grep "${IP_INT}/" >/dev/null if [[ $? -ne 0 ]]; then echo "Unable to find the IP_INT address '${IP_INT}' on the system, please correct the value in local.params. Exiting..." exit 1 @@ -549,14 +549,15 @@ if [ -z "${ROLES}" ]; then fi grep -q "letsencrypt" ${S_DIR}/top.sls || echo " - letsencrypt" >> ${S_DIR}/top.sls else - # Use custom certs, as both bring-your-own and self-signed are copied using this state - # Copy certs to formula extra/files - # In dev mode, the files will be created and put in the destination directory by the - # snakeoil_certs.sls state file mkdir -p /srv/salt/certs - cp -rv ${CUSTOM_CERTS_DIR}/* /srv/salt/certs/ - # We add the custom_certs state - grep -q "custom_certs" ${S_DIR}/top.sls || echo " - extra.custom_certs" >> ${S_DIR}/top.sls + if [ "${SSL_MODE}" = "bring-your-own" ]; then + # Copy certs to formula extra/files + cp -rv ${CUSTOM_CERTS_DIR}/* /srv/salt/certs/ + # We add the custom_certs state + grep -q "custom_certs" ${S_DIR}/top.sls || echo " - extra.custom_certs" >> ${S_DIR}/top.sls + fi + # In self-signed mode, the certificate files will be created and put in the + # destination directory by the snakeoil_certs.sls state file fi echo " - postgres" >> ${S_DIR}/top.sls @@ -564,6 +565,7 @@ if [ -z "${ROLES}" ]; then echo " - arvados" >> ${S_DIR}/top.sls echo " - extra.shell_sudo_passwordless" >> ${S_DIR}/top.sls echo " - extra.shell_cron_add_login_sync" >> ${S_DIR}/top.sls + echo " - extra.passenger_rvm" >> ${S_DIR}/top.sls # Pillars echo " - docker" >> ${P_DIR}/top.sls @@ -656,6 +658,7 @@ else else echo " - nginx.passenger" >> ${S_DIR}/top.sls fi + echo " - extra.passenger_rvm" >> ${S_DIR}/top.sls ### If we don't install and run LE before arvados-api-server, it fails and breaks everything ### after it. So we add this here as we are, after all, sharing the host for api and controller if [ "${SSL_MODE}" = "lets-encrypt" ]; then