X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c3a5a3a4dd20432f4ba423614d2e5281e9a3bfe7..a858a15370220c57fc1feb3c6f50655244193e33:/tools/salt-install/provision.sh diff --git a/tools/salt-install/provision.sh b/tools/salt-install/provision.sh index a2cc01e5d1..9bd2d8f1e8 100755 --- a/tools/salt-install/provision.sh +++ b/tools/salt-install/provision.sh @@ -28,14 +28,15 @@ usage() { echo >&2 " Possible values are:" echo >&2 " api" echo >&2 " controller" + echo >&2 " dispatcher" + echo >&2 " keepproxy" echo >&2 " keepstore" - echo >&2 " websocket" echo >&2 " keepweb" - echo >&2 " workbench2" - echo >&2 " keepproxy" echo >&2 " shell" + echo >&2 " webshell" + echo >&2 " websocket" echo >&2 " workbench" - echo >&2 " dispatcher" + echo >&2 " workbench2" echo >&2 " Defaults to applying them all" echo >&2 " -h, --help Display this help and exit" echo >&2 " -v, --vagrant Run in vagrant and use the /vagrant shared dir" @@ -70,7 +71,7 @@ arguments() { for i in ${2//,/ } do # Verify the role exists - if [[ ! "database,api,controller,keepstore,websocket,keepweb,workbench2,keepproxy,shell,workbench,dispatcher" == *"$i"* ]]; then + if [[ ! "database,api,controller,keepstore,websocket,keepweb,workbench2,webshell,keepproxy,shell,workbench,dispatcher" == *"$i"* ]]; then echo "The role '${i}' is not a valid role" usage exit 1 @@ -126,11 +127,17 @@ WEBSOCKET_EXT_SSL_PORT=8002 WORKBENCH1_EXT_SSL_PORT=443 WORKBENCH2_EXT_SSL_PORT=3001 +# For a stable release, change RELEASE "production" and VERSION to the +# package version (including the iteration, e.g. X.Y.Z-1) of the +# release. RELEASE="production" -VERSION="2.1.2-1" +VERSION="2.2.0-1" + +# The arvados-formula version. For a stable release, this should be a +# branch name (e.g. X.Y-dev) or tag for the release. +ARVADOS_TAG="2.2-dev" -# Formulas versions -ARVADOS_TAG="master" +# Other formula versions we depend on POSTGRES_TAG="v0.41.6" NGINX_TAG="temp-fix-missing-statements-in-pillar" DOCKER_TAG="v1.0.0" @@ -209,7 +216,7 @@ mkdir -p ${S_DIR} ${F_DIR} ${P_DIR} # Get the formula and dependencies cd ${F_DIR} || exit 1 -git clone --branch "${ARVADOS_TAG}" https://github.com/arvados/arvados-formula.git +git clone --branch "${ARVADOS_TAG}" https://git.arvados.org/arvados-formula.git git clone --branch "${DOCKER_TAG}" https://github.com/saltstack-formulas/docker-formula.git git clone --branch "${LOCALE_TAG}" https://github.com/saltstack-formulas/locale-formula.git # git clone --branch "${NGINX_TAG}" https://github.com/saltstack-formulas/nginx-formula.git @@ -275,6 +282,7 @@ for f in $(ls "${SOURCE_PILLARS_DIR}"/*); do s#__KEEPSTORE1_INT_IP__#${KEEPSTORE1_INT_IP}#g; s#__KEEPWEB_INT_IP__#${KEEPWEB_INT_IP}#g; s#__WEBSHELL_INT_IP__#${WEBSHELL_INT_IP}#g; + s#__SHELL_INT_IP__#${SHELL_INT_IP}#g; s#__WORKBENCH1_INT_IP__#${WORKBENCH1_INT_IP}#g; s#__WORKBENCH2_INT_IP__#${WORKBENCH2_INT_IP}#g; s#__DATABASE_INT_IP__#${DATABASE_INT_IP}#g; @@ -377,7 +385,9 @@ if [ -z "${ROLES}" ]; then echo " - nginx.passenger" >> ${S_DIR}/top.sls # Currently, only available on config_examples/multi_host/aws if [ "x${USE_LETSENCRYPT}" = "xyes" ]; then - grep -q "aws_credentials" ${S_DIR}/top.sls || echo " - aws_credentials" >> ${S_DIR}/top.sls + if [ "x${USE_LETSENCRYPT_IAM_USER}" = "xyes" ]; then + grep -q "aws_credentials" ${S_DIR}/top.sls || echo " - aws_credentials" >> ${S_DIR}/top.sls + fi grep -q "letsencrypt" ${S_DIR}/top.sls || echo " - letsencrypt" >> ${S_DIR}/top.sls fi echo " - postgres" >> ${S_DIR}/top.sls @@ -398,7 +408,9 @@ if [ -z "${ROLES}" ]; then echo " - postgresql" >> ${P_DIR}/top.sls # Currently, only available on config_examples/multi_host/aws if [ "x${USE_LETSENCRYPT}" = "xyes" ]; then - grep -q "aws_credentials" ${P_DIR}/top.sls || echo " - aws_credentials" >> ${P_DIR}/top.sls + if [ "x${USE_LETSENCRYPT_IAM_USER}" = "xyes" ]; then + grep -q "aws_credentials" ${P_DIR}/top.sls || echo " - aws_credentials" >> ${P_DIR}/top.sls + fi grep -q "letsencrypt" ${P_DIR}/top.sls || echo " - letsencrypt" >> ${P_DIR}/top.sls fi else @@ -421,7 +433,9 @@ else ### after it so we add this here, as we are, after all, sharing the host for api and controller # Currently, only available on config_examples/multi_host/aws if [ "x${USE_LETSENCRYPT}" = "xyes" ]; then - grep -q "aws_credentials" ${S_DIR}/top.sls || echo " - aws_credentials" >> ${S_DIR}/top.sls + if [ "x${USE_LETSENCRYPT_IAM_USER}" = "xyes" ]; then + grep -q "aws_credentials" ${S_DIR}/top.sls || echo " - aws_credentials" >> ${S_DIR}/top.sls + fi grep -q "letsencrypt" ${S_DIR}/top.sls || echo " - letsencrypt" >> ${S_DIR}/top.sls fi grep -q "arvados.${R}" ${S_DIR}/top.sls || echo " - arvados.${R}" >> ${S_DIR}/top.sls @@ -432,21 +446,28 @@ else grep -q "nginx_passenger" ${P_DIR}/top.sls || echo " - nginx_passenger" >> ${P_DIR}/top.sls grep -q "nginx_${R}_configuration" ${P_DIR}/top.sls || echo " - nginx_${R}_configuration" >> ${P_DIR}/top.sls ;; - "controller" | "websocket" | "workbench" | "workbench2" | "keepweb" | "keepproxy") + "controller" | "websocket" | "workbench" | "workbench2" | "webshell" | "keepweb" | "keepproxy") # States grep -q "nginx.passenger" ${S_DIR}/top.sls || echo " - nginx.passenger" >> ${S_DIR}/top.sls # Currently, only available on config_examples/multi_host/aws if [ "x${USE_LETSENCRYPT}" = "xyes" ]; then - grep -q "aws_credentials" ${S_DIR}/top.sls || echo " - aws_credentials" >> ${S_DIR}/top.sls + if [ "x${USE_LETSENCRYPT_IAM_USER}" = "xyes" ]; then + grep -q "aws_credentials" ${S_DIR}/top.sls || echo " - aws_credentials" >> ${S_DIR}/top.sls + fi grep -q "letsencrypt" ${S_DIR}/top.sls || echo " - letsencrypt" >> ${S_DIR}/top.sls fi - grep -q "arvados.${R}" ${S_DIR}/top.sls || echo " - arvados.${R}" >> ${S_DIR}/top.sls + # webshell role is just a nginx vhost, so it has no state + if [ "${R}" != "webshell" ]; then + grep -q "arvados.${R}" ${S_DIR}/top.sls || echo " - arvados.${R}" >> ${S_DIR}/top.sls + fi # Pillars grep -q "nginx_passenger" ${P_DIR}/top.sls || echo " - nginx_passenger" >> ${P_DIR}/top.sls grep -q "nginx_${R}_configuration" ${P_DIR}/top.sls || echo " - nginx_${R}_configuration" >> ${P_DIR}/top.sls # Currently, only available on config_examples/multi_host/aws if [ "x${USE_LETSENCRYPT}" = "xyes" ]; then - grep -q "aws_credentials" ${P_DIR}/top.sls || echo " - aws_credentials" >> ${P_DIR}/top.sls + if [ "x${USE_LETSENCRYPT_IAM_USER}" = "xyes" ]; then + grep -q "aws_credentials" ${P_DIR}/top.sls || echo " - aws_credentials" >> ${P_DIR}/top.sls + fi grep -q "letsencrypt" ${P_DIR}/top.sls || echo " - letsencrypt" >> ${P_DIR}/top.sls grep -q "letsencrypt_${R}_configuration" ${P_DIR}/top.sls || echo " - letsencrypt_${R}_configuration" >> ${P_DIR}/top.sls fi @@ -457,7 +478,6 @@ else grep -q "arvados.${R}" ${S_DIR}/top.sls || echo " - arvados.${R}" >> ${S_DIR}/top.sls # Pillars grep -q "" ${P_DIR}/top.sls || echo " - docker" >> ${P_DIR}/top.sls - grep -q "nginx_webshell_configuration" ${P_DIR}/top.sls || echo " - nginx_webshell_configuration" >> ${P_DIR}/top.sls ;; "dispatcher") # States