diff --git a/.circleci/config.yml b/.circleci/config.yml index b1a1d2a590..8b5c25c821 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -109,7 +109,7 @@ parameters: default: "main" type: string sandbox_git_branch: # change to feature branch to test deployment - default: "js-128-add-multiselect-component" + default: "sj-bind-rds" type: string jobs: build: diff --git a/deployment_config/dev_vars.yml b/deployment_config/dev_vars.yml index 8081cf49b0..44f3d8f473 100644 --- a/deployment_config/dev_vars.yml +++ b/deployment_config/dev_vars.yml @@ -6,5 +6,6 @@ instances: 1 NODE_ENV: production # This env variable should go away soon in favor of TTA_SMART_HUB_URI REDIRECT_URI_HOST: https://tta-smarthub-dev.app.cloud.gov -TTA_SMART_HUB_URI: https://tta-smarthub-dev.app.cloud.gov +rds_instance: ttahub-dev SESSION_SECRET: ((SESSION_SECRET)) +TTA_SMART_HUB_URI: https://tta-smarthub-dev.app.cloud.gov diff --git a/deployment_config/prod_vars.yml b/deployment_config/prod_vars.yml index 80d91a2512..502dab021e 100644 --- a/deployment_config/prod_vars.yml +++ b/deployment_config/prod_vars.yml @@ -6,5 +6,6 @@ instances: 2 NODE_ENV: production # This env variable should go away soon in favor of TTA_SMART_HUB_URI REDIRECT_URI_HOST: https://tta-smarthub-prod.app.cloud.gov -TTA_SMART_HUB_URI: https://tta-smarthub-prod.app.cloud.gov +rds_instance: ttahub-prod SESSION_SECRET: ((SESSION_SECRET)) +TTA_SMART_HUB_URI: https://tta-smarthub-prod.app.cloud.gov diff --git a/deployment_config/sandbox_vars.yml b/deployment_config/sandbox_vars.yml index 4b921f082f..3ce4e0e7e3 100644 --- a/deployment_config/sandbox_vars.yml +++ b/deployment_config/sandbox_vars.yml @@ -6,5 +6,6 @@ instances: 1 NODE_ENV: production # This env variable should go away soon in favor of TTA_SMART_HUB_URI REDIRECT_URI_HOST: https://tta-smarthub-sandbox.app.cloud.gov -TTA_SMART_HUB_URI: https://tta-smarthub-sandbox.app.cloud.gov +rds_instance: ttahub-sandbox SESSION_SECRET: ((SESSION_SECRET)) +TTA_SMART_HUB_URI: https://tta-smarthub-sandbox.app.cloud.gov diff --git a/deployment_config/staging_vars.yml b/deployment_config/staging_vars.yml index 5f615245f0..6884c5e1f5 100644 --- a/deployment_config/staging_vars.yml +++ b/deployment_config/staging_vars.yml @@ -6,5 +6,6 @@ instances: 1 NODE_ENV: production # This env variable should go away soon in favor of TTA_SMART_HUB_URI REDIRECT_URI_HOST: https://tta-smarthub-staging.app.cloud.gov -TTA_SMART_HUB_URI: https://tta-smarthub-staging.app.cloud.gov +rds_instance: ttahub-staging SESSION_SECRET: ((SESSION_SECRET)) +TTA_SMART_HUB_URI: https://tta-smarthub-staging.app.cloud.gov diff --git a/manifest.yml b/manifest.yml index f658ef2603..417aa2ff57 100644 --- a/manifest.yml +++ b/manifest.yml @@ -1,14 +1,16 @@ --- applications: -- name: tta-smarthub-((env)) - instances: ((instances)) - command: yarn start - env: - AUTH_BASE: ((AUTH_BASE)) - AUTH_CLIENT_ID: ((AUTH_CLIENT_ID)) - AUTH_CLIENT_SECRET: ((AUTH_CLIENT_SECRET)) - NODE_ENV: ((NODE_ENV)) - # Soon to be removed in favor of TTA_SMART_HUB_URI - REDIRECT_URI_HOST: ((REDIRECT_URI_HOST)) - TTA_SMART_HUB_URI: ((TTA_SMART_HUB_URI)) - SESSION_SECRET: ((SESSION_SECRET)) + - name: tta-smarthub-((env)) + instances: ((instances)) + command: yarn start + env: + AUTH_BASE: ((AUTH_BASE)) + AUTH_CLIENT_ID: ((AUTH_CLIENT_ID)) + AUTH_CLIENT_SECRET: ((AUTH_CLIENT_SECRET)) + NODE_ENV: ((NODE_ENV)) + # Soon to be removed in favor of TTA_SMART_HUB_URI + REDIRECT_URI_HOST: ((REDIRECT_URI_HOST)) + TTA_SMART_HUB_URI: ((TTA_SMART_HUB_URI)) + SESSION_SECRET: ((SESSION_SECRET)) + services: + - ((rds_instance)) diff --git a/terraform/README.md b/terraform/README.md index 43a334382c..11776f920b 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -143,13 +143,18 @@ _Tip: You run terraform files from the directory in which they are stored. For e ```bash terraform apply ``` +1. **Bind the infrastructure to the application** + + CloudFoundry/cloud.gov requires that some "services" (e.g. AWS infrastructure) be "bound" to the application instance. S3, Redis, and Elasticsearch are all services that require this "binding" step. See the [cloud.gov documentation][cloudgov-bind] for more direction on this. Also, check out [PR#71][PR#71] for an example of how this was done for the RDS instances. [aws-config]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config [aws-install]: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html +[cloudgov-bind]: https://cloud.gov/docs/deployment/managed-services/#bind-the-service-instance [cloudgov-deployer]: https://cloud.gov/docs/services/cloud-gov-service-account/ [cloudgov-service-keys]: https://cloud.gov/docs/services/s3/#interacting-with-your-s3-bucket-from-outside-cloudgov [cf-install]: https://docs.cloudfoundry.org/cf-cli/install-go-cli.html +[PR#71]: https://github.com/adhocteam/Head-Start-TTADP/pull/71 [tf]: https://www.terraform.io/downloads.html [tf-vars]: https://www.terraform.io/docs/configuration/variables.html#variable-definitions-tfvars-files