Work with ${LAYERS_DIR} bit more predictably

This commit is contained in:
Disassembler 2020-03-23 10:10:57 +01:00
parent 102761efac
commit 746713eb9f
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
8 changed files with 18 additions and 10 deletions

View File

@ -6,6 +6,7 @@ POSTGRES_DATA="${VOLUMES_DIR}/ckan/postgres_data"
REDIS_CONF="${VOLUMES_DIR}/ckan/redis_conf" REDIS_CONF="${VOLUMES_DIR}/ckan/redis_conf"
REDIS_DATA="${VOLUMES_DIR}/ckan/redis_data" REDIS_DATA="${VOLUMES_DIR}/ckan/redis_data"
SOLR_DATA="${VOLUMES_DIR}/ckan/solr_data" SOLR_DATA="${VOLUMES_DIR}/ckan/solr_data"
SOLR_LAYER="${LAYERS_DIR}/solr6_6.5.1-200313"
DATAPUSHER_CONF="${VOLUMES_DIR}/ckan/datapusher_conf" DATAPUSHER_CONF="${VOLUMES_DIR}/ckan/datapusher_conf"
DATAPUSHER_DATA="${VOLUMES_DIR}/ckan/datapusher_data" DATAPUSHER_DATA="${VOLUMES_DIR}/ckan/datapusher_data"
CKAN_CONF="${VOLUMES_DIR}/ckan/ckan_conf" CKAN_CONF="${VOLUMES_DIR}/ckan/ckan_conf"
@ -33,7 +34,7 @@ spoc-container start ckan-redis
# Configure Solr # Configure Solr
install -o 108983 -g 108983 -m 750 -d ${SOLR_DATA} install -o 108983 -g 108983 -m 750 -d ${SOLR_DATA}
install -o 108983 -g 108983 -m 640 ${LAYERS_DIR}/solr6_6.5.1-200313/opt/solr/server/solr/solr.xml ${SOLR_DATA}/solr.xml cp -p ${SOLR_LAYER}/opt/solr/server/solr/solr.xml ${SOLR_DATA}/solr.xml
spoc-container start ckan-solr spoc-container start ckan-solr
# Configure CKAN Solr core # Configure CKAN Solr core

View File

@ -4,6 +4,7 @@ set -ev
# Volumes # Volumes
POSTGRES_DATA="${VOLUMES_DIR}/crisiscleanup/postgres_data" POSTGRES_DATA="${VOLUMES_DIR}/crisiscleanup/postgres_data"
CC_CONF="${VOLUMES_DIR}/crisiscleanup/cc_conf" CC_CONF="${VOLUMES_DIR}/crisiscleanup/cc_conf"
CC_LAYER="${LAYERS_DIR}/crisiscleanup_2.2.0-200313"
# Create Postgres instance # Create Postgres instance
install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA} install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA}
@ -19,7 +20,7 @@ spoc-container start crisiscleanup-postgres
envsubst <createdb.sql | spoc-container exec crisiscleanup-postgres -- psql envsubst <createdb.sql | spoc-container exec crisiscleanup-postgres -- psql
# Copy existing config files into persistent storage # Copy existing config files into persistent storage
cp -rp ${LAYERS_DIR}/crisiscleanup_2.2.0-200313/srv/crisiscleanup/config ${CC_CONF} cp -rp ${CC_LAYER}/srv/crisiscleanup/config ${CC_CONF}
# Configure CrisisCleanup # Configure CrisisCleanup
export CRISISCLEANUP_ADMIN_USER="Admin" export CRISISCLEANUP_ADMIN_USER="Admin"

View File

@ -4,6 +4,7 @@ set -ev
# Volumes # Volumes
POSTGRES_DATA="${VOLUMES_DIR}/cts/postgres_data" POSTGRES_DATA="${VOLUMES_DIR}/cts/postgres_data"
CTS_CONF="${VOLUMES_DIR}/cts/cts_conf" CTS_CONF="${VOLUMES_DIR}/cts/cts_conf"
CTS_LAYER="${LAYERS_DIR}/cts_0.8.0-200313"
# Create Postgres instance # Create Postgres instance
install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA} install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA}
@ -19,7 +20,7 @@ spoc-container start cts-postgres
envsubst <createdb.sql | spoc-container exec cts-postgres -- psql envsubst <createdb.sql | spoc-container exec cts-postgres -- psql
# Copy existing config files into persistent storage # Copy existing config files into persistent storage
cp -rp ${LAYERS_DIR}/cts_0.8.0-200313/srv/cts/cts/settings ${CTS_CONF} cp -rp ${CTS_LAYER}/srv/cts/cts/settings ${CTS_CONF}
# Configure CTS # Configure CTS
export CTS_SECRET=$(head -c 26 /dev/urandom | base64 | tr -d '+/=') export CTS_SECRET=$(head -c 26 /dev/urandom | base64 | tr -d '+/=')

View File

@ -5,6 +5,7 @@ set -ev
POSTGRES_DATA="${VOLUMES_DIR}/decidim/postgres_data" POSTGRES_DATA="${VOLUMES_DIR}/decidim/postgres_data"
DECIDIM_CONF="${VOLUMES_DIR}/decidim/decidim_conf" DECIDIM_CONF="${VOLUMES_DIR}/decidim/decidim_conf"
DECIDIM_DATA="${VOLUMES_DIR}/decidim/decidim_data" DECIDIM_DATA="${VOLUMES_DIR}/decidim/decidim_data"
DECIDIM_LAYER="${LAYERS_DIR}/decidim_0.20.0-200313"
# Create Postgres instance # Create Postgres instance
install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA} install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA}
@ -20,7 +21,7 @@ spoc-container start decidim-postgres
envsubst <createdb.sql | spoc-container exec decidim-postgres -- psql envsubst <createdb.sql | spoc-container exec decidim-postgres -- psql
# Copy existing config files into persistent storage # Copy existing config files into persistent storage
cp -rp ${LAYERS_DIR}/decidim_0.20.0-200313/srv/decidim-app/config ${DECIDIM_CONF} cp -rp ${DECIDIM_LAYER}/srv/decidim-app/config ${DECIDIM_CONF}
# Configure Decidim # Configure Decidim
install -o 108080 -g 108080 -m 700 -d ${DECIDIM_DATA}/storage install -o 108080 -g 108080 -m 700 -d ${DECIDIM_DATA}/storage

View File

@ -4,6 +4,7 @@ set -ev
# Volumes # Volumes
OMK_CONF="${VOLUMES_DIR}/openmapkit/omk_conf" OMK_CONF="${VOLUMES_DIR}/openmapkit/omk_conf"
OMK_DATA="${VOLUMES_DIR}/openmapkit/omk_data" OMK_DATA="${VOLUMES_DIR}/openmapkit/omk_data"
OMK_LAYER="${LAYERS_DIR}/openmapkit_0.12.0-200313"
# Configure OpenMapKit # Configure OpenMapKit
export OPENMAPKIT_ADMIN_USER="admin" export OPENMAPKIT_ADMIN_USER="admin"
@ -12,7 +13,7 @@ install -o 108080 -g 108080 -m 750 -d ${OMK_CONF}
envsubst <omk_conf/settings.js | install -o 108080 -g 108080 -m 640 /dev/stdin ${OMK_CONF}/settings.js envsubst <omk_conf/settings.js | install -o 108080 -g 108080 -m 640 /dev/stdin ${OMK_CONF}/settings.js
# Copy existing files into persistent storage # Copy existing files into persistent storage
cp -rp ${LAYERS_DIR}/openmapkit_0.12.0-200313/srv/openmapkit/data ${OMK_DATA} cp -rp ${OMK_LAYER}/srv/openmapkit/data ${OMK_DATA}
# Register application # Register application
vmmgr register-app openmapkit omk "${OPENMAPKIT_ADMIN_USER}" "${OPENMAPKIT_ADMIN_PWD}" vmmgr register-app openmapkit omk "${OPENMAPKIT_ADMIN_USER}" "${OPENMAPKIT_ADMIN_PWD}"

View File

@ -5,6 +5,7 @@ set -ev
POSTGRES_DATA="${VOLUMES_DIR}/sahana-demo/postgres_data" POSTGRES_DATA="${VOLUMES_DIR}/sahana-demo/postgres_data"
SAHANA_DATA="${VOLUMES_DIR}/sahana-demo/sahana_data" SAHANA_DATA="${VOLUMES_DIR}/sahana-demo/sahana_data"
SAHANA_CONF="${VOLUMES_DIR}/sahana-demo/sahana_conf" SAHANA_CONF="${VOLUMES_DIR}/sahana-demo/sahana_conf"
SAHANA_LAYER="${LAYERS_DIR}/sahana_0.0.1-200313"
# Create Postgres instance # Create Postgres instance
install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA} install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA}
@ -21,8 +22,8 @@ envsubst <createdb.sql | spoc-container exec sahana-demo-postgres -- psql
# Prepare persistent directory structure # Prepare persistent directory structure
install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/databases install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/databases
install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/uploads install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/uploads
cp -rp ${LAYERS_DIR}/sahana_0.0.1-200313/srv/web2py/applications/eden/models ${SAHANA_CONF} cp -rp ${SAHANA_LAYER}/srv/web2py/applications/eden/models ${SAHANA_CONF}
cp -rp ${LAYERS_DIR}/sahana_0.0.1-200313/srv/web2py/applications/eden/modules/templates/default ${SAHANA_DATA}/default cp -rp ${SAHANA_LAYER}/srv/web2py/applications/eden/modules/templates/default ${SAHANA_DATA}/default
# Configure Sahana # Configure Sahana
export SAHANADEMO_HMAC=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export SAHANADEMO_HMAC=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')

View File

@ -5,6 +5,7 @@ set -ev
POSTGRES_DATA="${VOLUMES_DIR}/sahana/postgres_data" POSTGRES_DATA="${VOLUMES_DIR}/sahana/postgres_data"
SAHANA_DATA="${VOLUMES_DIR}/sahana/sahana_data" SAHANA_DATA="${VOLUMES_DIR}/sahana/sahana_data"
SAHANA_CONF="${VOLUMES_DIR}/sahana/sahana_conf" SAHANA_CONF="${VOLUMES_DIR}/sahana/sahana_conf"
SAHANA_LAYER="${LAYERS_DIR}/sahana_0.0.1-200313"
# Create Postgres instance # Create Postgres instance
install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA} install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA}
@ -22,7 +23,7 @@ envsubst <createdb.sql | spoc-container exec sahana-postgres -- psql
# Prepare persistent directory structure # Prepare persistent directory structure
install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/databases install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/databases
install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/uploads install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/uploads
cp -rp ${LAYERS_DIR}/sahana_0.0.1-200313/srv/web2py/applications/eden/models ${SAHANA_CONF} cp -rp ${SAHANA_LAYER}/srv/web2py/applications/eden/models ${SAHANA_CONF}
# Copy Spotter template # Copy Spotter template
cp -r sahana_data/Spotter ${SAHANA_DATA}/Spotter cp -r sahana_data/Spotter ${SAHANA_DATA}/Spotter

View File

@ -5,6 +5,7 @@ set -ev
POSTGRES_DATA="${VOLUMES_DIR}/sambro/postgres_data" POSTGRES_DATA="${VOLUMES_DIR}/sambro/postgres_data"
SAHANA_DATA="${VOLUMES_DIR}/sambro/sahana_data" SAHANA_DATA="${VOLUMES_DIR}/sambro/sahana_data"
SAHANA_CONF="${VOLUMES_DIR}/sambro/sahana_conf" SAHANA_CONF="${VOLUMES_DIR}/sambro/sahana_conf"
SAHANA_LAYER="${LAYERS_DIR}/sahana_0.0.1-200313"
# Create Postgres instance # Create Postgres instance
install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA} install -o 105432 -g 105432 -m 700 -d ${POSTGRES_DATA}
@ -22,8 +23,8 @@ envsubst <createdb.sql | spoc-container exec sambro-postgres -- psql
# Prepare persistent directory structure # Prepare persistent directory structure
install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/databases install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/databases
install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/uploads install -o 108080 -g 108080 -m 750 -d ${SAHANA_DATA}/uploads
cp -rp ${LAYERS_DIR}/sahana_0.0.1-200313/srv/web2py/applications/eden/models ${SAHANA_CONF} cp -rp ${SAHANA_LAYER}/srv/web2py/applications/eden/models ${SAHANA_CONF}
cp -rp ${LAYERS_DIR}/sahana_0.0.1-200313/srv/web2py/applications/eden/modules/templates/SAMBRO ${SAHANA_DATA}/SAMBRO cp -rp ${SAHANA_LAYER}/srv/web2py/applications/eden/modules/templates/SAMBRO ${SAHANA_DATA}/SAMBRO
# Configure SAMBRO # Configure SAMBRO
export SAMBRO_HMAC=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') export SAMBRO_HMAC=$(head -c 18 /dev/urandom | base64 | tr -d '+/=')