diff --git a/ops/scripts/create_environment.sh b/ops/scripts/create_environment_migrate.sh similarity index 97% rename from ops/scripts/create_environment.sh rename to ops/scripts/create_environment_migrate.sh index 761a94905..52b80909e 100755 --- a/ops/scripts/create_environment.sh +++ b/ops/scripts/create_environment_migrate.sh @@ -40,7 +40,7 @@ then fi echo "Creating manifest for $1..." -cp ops/scripts/manifest-sandbox-template.yaml ops/manifests/manifest-$1.yaml +cp ops/scripts/manifest-sandbox-template-migrate.yaml ops/manifests/manifest-$1.yaml sed -i '' "s/ENVIRONMENT/$1/" "ops/manifests/manifest-$1.yaml" echo "Adding new environment to settings.py..." @@ -129,7 +129,7 @@ then exit 1 fi -cf service-key github-cd-account github-cd-key | sed 1,2d | jq -r '[.username, .password]|@tsv' | +cf service-key github-cd-account github-cd-key | sed 1,2d | jq -r '[.credentials.username, .credentials.password]|@tsv' | while read -r username password; do gh secret --repo cisagov/getgov set CF_${upcase_name}_USERNAME --body $username gh secret --repo cisagov/getgov set CF_${upcase_name}_PASSWORD --body $password diff --git a/ops/scripts/manifest-sandbox-template-migrate.yaml b/ops/scripts/manifest-sandbox-template-migrate.yaml new file mode 100644 index 000000000..8789effa5 --- /dev/null +++ b/ops/scripts/manifest-sandbox-template-migrate.yaml @@ -0,0 +1,30 @@ +--- +applications: +- name: getgov-ENVIRONMENT + buildpacks: + - python_buildpack + path: ../../src + instances: 1 + memory: 512M + stack: cflinuxfs4 + timeout: 180 + command: ./run.sh + health-check-type: http + health-check-http-endpoint: /health + env: + # Send stdout and stderr straight to the terminal without buffering + PYTHONUNBUFFERED: yup + # Tell Django where to find its configuration + DJANGO_SETTINGS_MODULE: registrar.config.settings + # Tell Django where it is being hosted + DJANGO_BASE_URL: https://getgov-ENVIRONMENT.app.cloud.gov + # Tell Django how much stuff to log + DJANGO_LOG_LEVEL: INFO + # default public site location + GETGOV_PUBLIC_SITE_URL: https://beta.get.gov + # use a non-default route to avoid conflicts + routes: + - route: getgov-ENVIRONMENT-migrate.app.cloud.gov + services: + - getgov-credentials + - getgov-ENVIRONMENT-database