Mercurial > public > ssdt-docker
changeset 145:75aa7005b544
DEP-12: move comopse files to 'pilot' location
author | smith@nwoca.org |
---|---|
date | Mon, 10 Jul 2017 18:13:18 +0100 |
parents | 249ec634da33 |
children | 790e72b5b2fe |
files | compose3/preview/import-usas.yml compose3/preview/import-usps.yml compose3/preview/setup.sh compose3/preview/training.yml compose3/preview/usas-services.yml compose3/preview/usps-services.yml pilot/import-usas.yml pilot/import-usps.yml pilot/setup.sh pilot/training.yml pilot/usas-services.yml pilot/usps-services.yml |
diffstat | 12 files changed, 241 insertions(+), 241 deletions(-) [+] |
line wrap: on
line diff
--- a/compose3/preview/import-usas.yml Mon Jul 10 18:02:19 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -version: "3.1" -services: - usasimport: - image: docker.ssdt.io/usas-import:preview - command: -i ${IMP_IRN- } -u ${IMP_URL- } -r ${IMP_PATH- } - depends_on: - - usasdb - environment: - - DB_HOST=usasdb - - DB_NAME=usasdb - - DB_USER=usas - - DB_PASS=${USAS_DB_PASSWORD:-usasdefault} \ No newline at end of file
--- a/compose3/preview/import-usps.yml Mon Jul 10 18:02:19 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -version: "3.1" -services: - uspsimport: - image: docker.ssdt.io/usps-import:preview - command: -i ${IMP_IRN- } -u ${IMP_URL- } -r ${IMP_PATH- } ${IMP_ANON- } ${IMP_EM- } - depends_on: - - uspsdb - environment: - - DB_HOST=uspsdb - - DB_NAME=uspsdb - - DB_USER=usps - - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault} - \ No newline at end of file
--- a/compose3/preview/setup.sh Mon Jul 10 18:02:19 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -#!/bin/bash -# Sets up a new district project based on SSDT default configuration in the current working directory. -# -# Usage: -# -# /data/preview/sampletown $ /ssdt/compose2/preview/setup.sh [usas,usps...] -# -# -# -# Will create a docker-compose.yml and .env file with default settings. -# -# -source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/.functions.sh" - -md5calc() { - md5sum ${1} ; -} - -md5verify() { - md5sum -c --status ${1} ; -} - -base=$(dirname "${BASH_SOURCE[0]}") -default_name=$(basename $PWD) - -args="$1$2" - -usas="" -usps="" - -if [ "$args" == "" ] || [ -z "${args##*usas*}" ] -then - usas=1 -fi - -if [ "$args" == "" ] || [ -z "${args##*usps*}" ] -then - usps=1 -fi - -echo "Preparing '$(basename $PWD)' with default USxS configuration" - -touch .env -source .env - -if [ "$COMPOSE_PROJECT_NAME" == "" ] -then - read -e -p "Enter project name: <${default_name}> " answer - project_name=${answer:-$default_name} - echo "COMPOSE_PROJECT_NAME=${project_name}" >> .env - echo "set project name in .env file" - source .env -fi - -if [ ! -e "docker-compose.yml" ] -then - create="OK" -elif [ -e ".docker-compose.md5" ]; then - md5verify ./.docker-compose.md5 && create="OK" -fi - -if [ "$create" == "OK" ] -then - echo "version: \"3.1\"" > ./docker-compose.yml - echo "services:" >> ./docker-compose.yml - - [ ! "$usas" == "" ] && cat $base/usas-services.yml >> ./docker-compose.yml - - [ ! "$usps" == "" ] && cat $base/usps-services.yml >> ./docker-compose.yml - - echo "volumes:" >> ./docker-compose.yml - - [ ! "$usas" == "" ] && echo " usasdata:" >> ./docker-compose.yml - [ ! "$usps" == "" ] && echo " uspsdata:" >> ./docker-compose.yml - - echo "" >> ./docker-compose.yml - - md5calc ./docker-compose.yml > .docker-compose.md5 - - echo "created docker-compose.yml" - -else - echo " - - Error! docker-compose.yml file has been modified or checksum missing. Can auto-apply update(s). - Move customizations to docker-compose.override.yml then delete the docker-compose.yml -" -fi - -if [ "$USAS_APPLICATIONID" == "" ] -then - read -e -p "Generate USAS and USPS integration config? <Y/n> " answer - case $answer in - y | Y | yes | YES ) answer="y";; - n | N | no | NO ) answer="n";; - *) answer="y" - esac - if [ "$answer" == "y" ] - then - usas_id=${COMPOSE_PROJECT_NAME}-usas - usas_key=$(openssl rand -hex 32) - usps_id=${COMPOSE_PROJECT_NAME}-usps - usps_key=$(openssl rand -hex 32) - echo "USAS_APPLICATIONID=${usas_id}" >> .env - echo "USAS_APIKEY=$usas_key" >> .env - echo "USPS_APPLICATIONID=${usps_id}" >> .env - echo "USPS_APIKEY=$usps_key" >> .env - echo "Created integration API keys. Enable integration modules after applications start" - fi -fi - -echo "Review or create a docker-compose.override.yml for custom settings." -
--- a/compose3/preview/training.yml Mon Jul 10 18:02:19 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -usasdb: - restart: unless-stopped - image: docker.ssdt.io/trainingdb-usas - environment: - - DB_NAME=usasdb - - DB_USER=usas - - DB_PASS=usasdefault -usasapp: - restart: unless-stopped - image: docker.ssdt.io/usas-app:preview - volumes: - - ${PWD}/config:/config - environment: - - DB_HOST=usas-database - - DB_NAME=usasdb - - DB_USER=usas - - DB_PASS=usasdefault - - JAVA_OPTS=-Xmx640m - links: - - usasdb:usas-database -uspsdb: - restart: unless-stopped - image: docker.ssdt.io/trainingdb-usps - environment: - - DB_NAME=uspsdb - - DB_USER=usps - - DB_PASS=uspsdefault -uspsapp: - restart: unless-stopped - image: docker.ssdt.io/usps-app:preview - volumes: - - ${PWD}/config:/config - environment: - - DB_HOST=usps-database - - DB_NAME=uspsdb - - DB_USER=usps - - DB_PASS=uspsdefault - - JAVA_OPTS=-Xmx640m - links: - - uspsdb:usps-database -
--- a/compose3/preview/usas-services.yml Mon Jul 10 18:02:19 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ - usasdb: - restart: unless-stopped - image: docker.ssdt.io/ssdt-postgres:4 - volumes: - - usasdata:/var/lib/postgresql/data - networks: - - default - environment: - - DB_NAME=usasdb - - DB_USER=usas - - DB_PASS=${USAS_DB_PASSWORD:-usasdefault} - usasapp: - restart: unless-stopped - image: docker.ssdt.io/usas-app:preview - depends_on: - - usasdb - networks: - - default - environment: - - DB_HOST=usasdb - - DB_NAME=usasdb - - DB_USER=usas - - DB_PASS=${USAS_DB_PASSWORD:-usasdefault} - - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_CLIENTHOST=uspsapp - - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_CLIENTDNSLOOKUP=true - - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOST=0.0.0.0 - - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOSTDNSLOOKUP=false - - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_APPLICATIONID=${USAS_APPLICATIONID:- } - - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_APIKEY=${USAS_APIKEY:- } - - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_REMOTEAPPLICATIONID=${USPS_APPLICATIONID:- } - - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_REMOTEAPIKEY=${USPS_APIKEY:- }
--- a/compose3/preview/usps-services.yml Mon Jul 10 18:02:19 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ - uspsdb: - restart: unless-stopped - image: docker.ssdt.io/ssdt-postgres:4 - volumes: - - uspsdata:/var/lib/postgresql/data - networks: - - default - environment: - - DB_NAME=uspsdb - - DB_USER=usps - - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault} - uspsapp: - restart: unless-stopped - image: docker.ssdt.io/usps-app:preview - depends_on: - - uspsdb - networks: - - default - environment: - - DB_HOST=uspsdb - - DB_NAME=uspsdb - - DB_USER=usps - - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault} - - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_CLIENTHOST=usasapp - - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_CLIENTDNSLOOKUP=true - - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOST=0.0.0.0 - - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOSTDNSLOOKUP=false - - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_APPLICATIONID=${USPS_APPLICATIONID:- } - - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_APIKEY=${USPS_APIKEY:- } - - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_REMOTEAPPLICATIONID=${USAS_APPLICATIONID:- } - - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_REMOTEAPIKEY=${USAS_APIKEY:- }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pilot/import-usas.yml Mon Jul 10 18:13:18 2017 +0100 @@ -0,0 +1,12 @@ +version: "3.3" +services: + usasimport: + image: docker.ssdt.io/usas-import:preview + command: -i ${IMP_IRN- } -u ${IMP_URL- } -r ${IMP_PATH- } + depends_on: + - usasdb + environment: + - DB_HOST=usasdb + - DB_NAME=usasdb + - DB_USER=usas + - DB_PASS=${USAS_DB_PASSWORD:-usasdefault} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pilot/import-usps.yml Mon Jul 10 18:13:18 2017 +0100 @@ -0,0 +1,13 @@ +version: "3.3" +services: + uspsimport: + image: docker.ssdt.io/usps-import:preview + command: -i ${IMP_IRN- } -u ${IMP_URL- } -r ${IMP_PATH- } ${IMP_ANON- } ${IMP_EM- } + depends_on: + - uspsdb + environment: + - DB_HOST=uspsdb + - DB_NAME=uspsdb + - DB_USER=usps + - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault} + \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pilot/setup.sh Mon Jul 10 18:13:18 2017 +0100 @@ -0,0 +1,113 @@ +#!/bin/bash +# Sets up a new district project based on SSDT default configuration in the current working directory. +# +# Usage: +# +# /data/preview/sampletown $ /ssdt/compose2/preview/setup.sh [usas,usps...] +# +# +# +# Will create a docker-compose.yml and .env file with default settings. +# +# +source "$(dirname "${BASH_SOURCE[0]}")/../scripts/.functions.sh" + +md5calc() { + md5sum ${1} ; +} + +md5verify() { + md5sum -c --status ${1} ; +} + +base=$(dirname "${BASH_SOURCE[0]}") +default_name=$(basename $PWD) + +args="$1$2" + +usas="" +usps="" + +if [ "$args" == "" ] || [ -z "${args##*usas*}" ] +then + usas=1 +fi + +if [ "$args" == "" ] || [ -z "${args##*usps*}" ] +then + usps=1 +fi + +echo "Preparing '$(basename $PWD)' with default USxS configuration" + +touch .env +source .env + +if [ "$COMPOSE_PROJECT_NAME" == "" ] +then + read -e -p "Enter project name: <${default_name}> " answer + project_name=${answer:-$default_name} + echo "COMPOSE_PROJECT_NAME=${project_name}" >> .env + echo "set project name in .env file" + source .env +fi + +if [ ! -e "docker-compose.yml" ] +then + create="OK" +elif [ -e ".docker-compose.md5" ]; then + md5verify ./.docker-compose.md5 && create="OK" +fi + +if [ "$create" == "OK" ] +then + echo "version: \"3.1\"" > ./docker-compose.yml + echo "services:" >> ./docker-compose.yml + + [ ! "$usas" == "" ] && cat $base/usas-services.yml >> ./docker-compose.yml + + [ ! "$usps" == "" ] && cat $base/usps-services.yml >> ./docker-compose.yml + + echo "volumes:" >> ./docker-compose.yml + + [ ! "$usas" == "" ] && echo " usasdata:" >> ./docker-compose.yml + [ ! "$usps" == "" ] && echo " uspsdata:" >> ./docker-compose.yml + + echo "" >> ./docker-compose.yml + + md5calc ./docker-compose.yml > .docker-compose.md5 + + echo "created docker-compose.yml" + +else + echo " + + Error! docker-compose.yml file has been modified or checksum missing. Can auto-apply update(s). + Move customizations to docker-compose.override.yml then delete the docker-compose.yml +" +fi + +if [ "$USAS_APPLICATIONID" == "" ] +then + read -e -p "Generate USAS and USPS integration config? <Y/n> " answer + case $answer in + y | Y | yes | YES ) answer="y";; + n | N | no | NO ) answer="n";; + *) answer="y" + esac + if [ "$answer" == "y" ] + then + usas_id=${COMPOSE_PROJECT_NAME}-usas + usas_key=$(openssl rand -hex 32) + usps_id=${COMPOSE_PROJECT_NAME}-usps + usps_key=$(openssl rand -hex 32) + echo "USAS_APPLICATIONID=${usas_id}" >> .env + echo "USAS_APIKEY=$usas_key" >> .env + echo "USPS_APPLICATIONID=${usps_id}" >> .env + echo "USPS_APIKEY=$usps_key" >> .env + echo "Created integration API keys. Enable integration modules after applications start" + fi +fi + +echo "Review or create a docker-compose.override.yml for custom settings." +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pilot/training.yml Mon Jul 10 18:13:18 2017 +0100 @@ -0,0 +1,41 @@ +usasdb: + restart: unless-stopped + image: docker.ssdt.io/trainingdb-usas + environment: + - DB_NAME=usasdb + - DB_USER=usas + - DB_PASS=usasdefault +usasapp: + restart: unless-stopped + image: docker.ssdt.io/usas-app:preview + volumes: + - ${PWD}/config:/config + environment: + - DB_HOST=usas-database + - DB_NAME=usasdb + - DB_USER=usas + - DB_PASS=usasdefault + - JAVA_OPTS=-Xmx640m + links: + - usasdb:usas-database +uspsdb: + restart: unless-stopped + image: docker.ssdt.io/trainingdb-usps + environment: + - DB_NAME=uspsdb + - DB_USER=usps + - DB_PASS=uspsdefault +uspsapp: + restart: unless-stopped + image: docker.ssdt.io/usps-app:preview + volumes: + - ${PWD}/config:/config + environment: + - DB_HOST=usps-database + - DB_NAME=uspsdb + - DB_USER=usps + - DB_PASS=uspsdefault + - JAVA_OPTS=-Xmx640m + links: + - uspsdb:usps-database +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pilot/usas-services.yml Mon Jul 10 18:13:18 2017 +0100 @@ -0,0 +1,31 @@ + usasdb: + restart: unless-stopped + image: docker.ssdt.io/ssdt-postgres:4 + volumes: + - usasdata:/var/lib/postgresql/data + networks: + - default + environment: + - DB_NAME=usasdb + - DB_USER=usas + - DB_PASS=${USAS_DB_PASSWORD:-usasdefault} + usasapp: + restart: unless-stopped + image: docker.ssdt.io/usas-app:preview + depends_on: + - usasdb + networks: + - default + environment: + - DB_HOST=usasdb + - DB_NAME=usasdb + - DB_USER=usas + - DB_PASS=${USAS_DB_PASSWORD:-usasdefault} + - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_CLIENTHOST=uspsapp + - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_CLIENTDNSLOOKUP=true + - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOST=0.0.0.0 + - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOSTDNSLOOKUP=false + - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_APPLICATIONID=${USAS_APPLICATIONID:- } + - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_APIKEY=${USAS_APIKEY:- } + - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_REMOTEAPPLICATIONID=${USPS_APPLICATIONID:- } + - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_REMOTEAPIKEY=${USPS_APIKEY:- }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pilot/usps-services.yml Mon Jul 10 18:13:18 2017 +0100 @@ -0,0 +1,31 @@ + uspsdb: + restart: unless-stopped + image: docker.ssdt.io/ssdt-postgres:4 + volumes: + - uspsdata:/var/lib/postgresql/data + networks: + - default + environment: + - DB_NAME=uspsdb + - DB_USER=usps + - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault} + uspsapp: + restart: unless-stopped + image: docker.ssdt.io/usps-app:preview + depends_on: + - uspsdb + networks: + - default + environment: + - DB_HOST=uspsdb + - DB_NAME=uspsdb + - DB_USER=usps + - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault} + - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_CLIENTHOST=usasapp + - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_CLIENTDNSLOOKUP=true + - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOST=0.0.0.0 + - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOSTDNSLOOKUP=false + - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_APPLICATIONID=${USPS_APPLICATIONID:- } + - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_APIKEY=${USPS_APIKEY:- } + - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_REMOTEAPPLICATIONID=${USAS_APPLICATIONID:- } + - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_REMOTEAPIKEY=${USAS_APIKEY:- }