Browse Source

Production manifest (#286)

* Update infra setup readme

* Update production manifest
pull/288/head
baarkerlounger 3 years ago committed by GitHub
parent
commit
b553140d0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 31
      infrastructure_setup.md
  2. 5
      manifest.yml

31
infrastructure_setup.md

@ -1,10 +1,10 @@
# Staging # Staging
1. Login:\ 1. Login:\
`cf login -a api.london.cloud.service.gov.uk -u <your_username>` `cf login -a api.london.cloud.service.gov.uk -u <your_username>`
2. Set your deployment target (staging):\ 2. Set your deployment target (staging):\
`cf target -o dluhc-core -s staging` `cf target -o dluhc-core -s staging`
3. Create required Postgres and S3 bucket backing services (this will take ~15 mins to finish creating):\ 3. Create required Postgres and S3 bucket backing services (this will take ~15 mins to finish creating):\
`cf create-service postgres tiny-unencrypted-13 dluhc-core-staging-postgres` `cf create-service postgres tiny-unencrypted-13 dluhc-core-staging-postgres`
@ -13,9 +13,34 @@
`cf create-service aws-s3-bucket default dluhc-core-staging-export-bucket` `cf create-service aws-s3-bucket default dluhc-core-staging-export-bucket`
4. Deploy manifest:\
`cf push dluhc-core-staging --strategy rolling`
5. Bind S3 services to app:\
`cf bind-service dluhc-core-staging dluhc-core-staging-import-bucket -c '{"permissions": "read-only"}'` `cf bind-service dluhc-core-staging dluhc-core-staging-import-bucket -c '{"permissions": "read-only"}'`
`cf bind-service dluhc-core-staging dluhc-core-staging-export-bucket -c '{"permissions": "read-write"}'` `cf bind-service dluhc-core-staging dluhc-core-staging-export-bucket -c '{"permissions": "read-write"}'`
# Production
1. Login:\
`cf login -a api.london.cloud.service.gov.uk -u <your_username>`
2. Set your deployment target (production):\
`cf target -o dluhc-core -s production`
3. Create required Postgres and S3 bucket backing services (this will take ~15 mins to finish creating):\
`cf create-service postgres small-ha-13 dluhc-core-production-postgres`
`cf create-service aws-s3-bucket default dluhc-core-production-import-bucket`
`cf create-service aws-s3-bucket default dluhc-core-production-export-bucket`
4. Deploy manifest:\ 4. Deploy manifest:\
`cf push dluhc-core-staging --strategy rolling` `cf push dluhc-core-production --strategy rolling`
5. Bind S3 services to app:\
`cf bind-service dluhc-core-production dluhc-core-production-import-bucket -c '{"permissions": "read-only"}'`
`cf bind-service dluhc-core-production dluhc-core-production-export-bucket -c '{"permissions": "read-write"}'`

5
manifest.yml

@ -20,6 +20,11 @@ applications:
- name: dluhc-core-production - name: dluhc-core-production
<<: *defaults <<: *defaults
processes:
- type: web
command: bundle exec rake cf:on_first_instance db:migrate && bin/rails server
instances: 4
memory: 1G
env: env:
RAILS_ENV: production RAILS_ENV: production
host: submit-social-housing-lettings-sales-data host: submit-social-housing-lettings-sales-data

Loading…
Cancel
Save