diff --git a/CHANGELOG-stage-deployment-delete.md b/CHANGELOG-stage-deployment-delete.md new file mode 100644 index 0000000000..7b942f2e5e --- /dev/null +++ b/CHANGELOG-stage-deployment-delete.md @@ -0,0 +1 @@ +- Delete STAGE environment and spin up new portal instance on TEST diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index b7d9690b70..06c5b465f7 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.7" - services: portal-ui: build: ../context diff --git a/compose/example.env b/compose/example.env index fac048b007..23d2ec919b 100644 --- a/compose/example.env +++ b/compose/example.env @@ -1,7 +1,7 @@ -# This variable to be used by DEV/TEST/PROD deployments +# This variable to be used by DEV and PROD deployments LOG_STREAM=DEV -# Following variables to be used by STAGE deployment only +# Following variables to be used by TEST deployment only # due to the fact we have two instances -LOG_STREAM_STAGE=STAGE -LOG_STREAM_STAGE_PROD=STAGE-PROD +LOG_STREAM_TEST=TEST +LOG_STREAM_TEST_PROD=TEST-PROD diff --git a/compose/hubmap.stage.yml b/compose/hubmap.test.yml similarity index 93% rename from compose/hubmap.stage.yml rename to compose/hubmap.test.yml index 8d70313fd4..8f933daffc 100644 --- a/compose/hubmap.stage.yml +++ b/compose/hubmap.test.yml @@ -1,5 +1,3 @@ -version: "3.7" - services: portal-ui: hostname: portal-ui @@ -20,7 +18,7 @@ services: options: awslogs-region: us-east-1 awslogs-group: portal-ui-docker-logs - awslogs-stream: ${LOG_STREAM_STAGE} + awslogs-stream: ${LOG_STREAM_TEST} # Service names need to be kept in sync with gateway: # https://github.com/hubmapconsortium/gateway/blob/f2c2d5d/nginx/conf.d-stage/prod-portal-ui.conf @@ -44,7 +42,7 @@ services: options: awslogs-region: us-east-1 awslogs-group: portal-ui-docker-logs - awslogs-stream: ${LOG_STREAM_STAGE_PROD} + awslogs-stream: ${LOG_STREAM_TEST_PROD} networks: # This is the network created by gateway to enable communicaton between multiple docker-compose projects diff --git a/compose/hubmap.yml b/compose/hubmap.yml index 65087973a9..91801f871f 100644 --- a/compose/hubmap.yml +++ b/compose/hubmap.yml @@ -1,5 +1,3 @@ -version: "3.7" - services: portal-ui: hostname: portal-ui diff --git a/context/app/static/js/helpers/init-trackers.js b/context/app/static/js/helpers/init-trackers.js index f2b90143d5..3b102114c7 100644 --- a/context/app/static/js/helpers/init-trackers.js +++ b/context/app/static/js/helpers/init-trackers.js @@ -11,7 +11,7 @@ import { getUserGroups, getUserType } from './trackers'; function initTrackers() { const version = `portal-ui-react@${PACKAGE_VERSION}`; const environment = sentryEnv; - const shouldReport = ['prod', 'prod-stage'].includes(environment); + const shouldReport = ['prod', 'prod-test'].includes(environment); initializeFaro({ url: 'https://faro-collector-prod-us-east-0.grafana.net/collect/77a0efade67edd876ae6c63ebb2d825c', diff --git a/etc/build/redeploy.sh b/etc/build/redeploy.sh index 24b893e7ff..96c71f2cde 100755 --- a/etc/build/redeploy.sh +++ b/etc/build/redeploy.sh @@ -3,7 +3,7 @@ set -o errexit die() { set +v; echo "$*" 1>&2 ; exit 1; } -[ "$#" -eq 2 ] || die "usage: $0 USERNAME [ dev | test | stage]" +[ "$#" -eq 2 ] || die "usage: $0 USERNAME [dev | test]" USER="$1" TARGET="$2" @@ -19,8 +19,8 @@ cd /opt/hubmap/portal-ui/compose echo 'portal running?' \`docker ps | grep portal-ui\` COMPOSE_CONFIG=hubmap.yml -[ "$TARGET" = "stage" ] && COMPOSE_CONFIG=hubmap.stage.yml -# hubmap.stage.yml includes two portal instances. +[ "$TARGET" = "test" ] && COMPOSE_CONFIG=hubmap.test.yml +# hubmap.test.yml includes two portal instances. echo 'stopping...' docker-compose -f \$COMPOSE_CONFIG down @@ -33,10 +33,10 @@ docker rmi hubmap/portal-ui:latest echo 'starting...' docker-compose -f \$COMPOSE_CONFIG up -d -# We don't understand why the prod-stage instance is getting the wrong configuration. +# We don't understand why the prod-test instance is getting the wrong configuration. # We hope turning it off-and-on will help, but this is not a good situation. -if [ "$TARGET" = "stage" ]; then - echo 'Restart the hubmap-auth container... for STAGE only' +if [ "$TARGET" = "test" ]; then + echo 'Restart the hubmap-auth container... for TEST only' docker restart hubmap-auth fi @@ -48,4 +48,4 @@ EOF echo "Visit --> http://portal.$TARGET.hubmapconsortium.org/" -[ "$TARGET" = "stage" ] && echo "Visit --> http://portal-prod.stage.hubmapconsortium.org/" +[ "$TARGET" = "test" ] && echo "Visit --> http://portal-prod.test.hubmapconsortium.org/"