-
Notifications
You must be signed in to change notification settings - Fork 53
SimpleReport Deployment Process
This page helps guide through the deployment process.
SimpleReport uses a continuous deployment (CD) deployment process
Once a PR is merged into main
, the changes are deployed following the process below:
Note: A bad version can be rolled back independent of the FE via the rollback API actions
- checkout
main
- create a new branch (example:
tim-best/revert-feature-A
) - Revert to the desired commit
git revert --no-commit 9999999..HEAD && git commit
where 9999999 is the commit you want to revert to- This will revert everything from the HEAD back to the commit hash, meaning it will recreate that commit state in the working tree as if every commit after 9999999 had been walked back
- Create a PR with your branch, wait for tests to pass, get approval and merge
This is helpful for deploying branches that you are developing to a lower environment for testing purposes.
If you are deploying to a lower environment (e.g. test
, sr-dev1
, pentest
, etc...), please claim the environment you are using in Slack.
Navigate to the Github Actions Tab
- Select the environment you want to deploy to from the workflows list on the left. In this case we are selecting the
test
environment - Click the "Run workflow" button
- Select the branch you want to deploy. In this case we are deploying the latest commit on
main
- Click the green "Run workflow" button.
- After the workflow is completed you can verify the changes are live by Checking the deployed commit hash. This is done my going to
/app/static/commit.txt
and/api/actuator/info
- Visit the environment url to see your changes:
https://{environment}.simplereport.gov/
Users can be notified of deployment issues by placing SimpleReport in maintenance mode. When maintenance mode is enabled, a banner will appear at the top of each page stating that SimpleReport is currently experiencing an outage, along with a configurable supplemental message (e.g. a reason why).
To do so manually:
- Create a
MAINTENANCE MESSAGE
in JSON format with anactive
and amessage
key. Example:{"active": true, "message": "SimpleReport is currently undergoing maintenance"}
. Note that theactive
value must be a boolean, not a string. cd frontend && MAINTENANCE_MESSAGE=(JSON message here) MAINTENANCE_ENV=(desired env) yarn run maintenance:start
Example:
MAINTENANCE_MESSAGE='{"active": true, "header" : "SimpleReport is currently experiencing an outage.", "message": "SimpleReport is currently experiencing service degradation"}' MAINTENANCE_ENV=dev yarn run maintenance:start
Possible values for MAINTENANCE_ENV
: dev
, test
, pentest
, training
, demo
, stg
, prod
An easier way is to run the Maintenance Mode
Action, which will automatically enable/disable maintenance mode for all environments with your desired message.
To claim a lower environment for testing, you will need access to the Skylight Slack and access to #proj-cdc-prime-simplereport-engineering
.
In the #proj-cdc-prime-simplereport-engineering
channel (it doesn't have to be this channel, but it is nice to claim it here so that others can in that channel can see the actions being taken) do the following:
- run
/dibs list
to see the environments that are open
- recommended to use any of the
dev
ortest
environments aspentest
does not contain any data
- To claim an environment, run
/dibs on <environment>
(e.g./dibs on sr-dev1
)
- you can claim it for a certain period of time by doing
/dibs on <environment> for <duration>
(e.g./dibs on sr-dev1 for 1 hour
)
- To release the environment, run
/dibs off <environment>
(e.g./dibs off sr-dev1
) - For more
/dibs
commands, run/dibs help
in Slack
- Getting Started
- [Setup] Docker and docker compose development
- [Setup] IntelliJ run configurations
- [Setup] Running DB outside of Docker (optional)
- [Setup] Running nginx locally (optional)
- [Setup] Running outside of docker
- Accessing and testing weird parts of the app on local dev
- Accessing patient experience in local dev
- API Testing with Insomnia
- Cypress
- How to run e2e locally for development
- E2E tests
- Database maintenance
- MailHog
- Running tests
- SendGrid
- Setting up okta
- Sonar
- Storybook and Chromatic
- Twilio
- User roles
- Wiremock
- CSV Uploader
- Log local DB queries
- Code review and PR conventions
- SimpleReport Style Guide
- How to Review and Test Pull Requests for Dependabot
- How to Review and Test Pull Requests with Terraform Changes
- SimpleReport Deployment Process
- Adding a Developer
- Removing a developer
- Non-deterministic test tracker
- Alert Response - When You Know What is Wrong
- What to Do When You Have No Idea What is Wrong
- Main Branch Status
- Maintenance Mode
- Swapping Slots
- Monitoring
- Container Debugging
- Debugging the ReportStream Uploader
- Renew Azure Service Principal Credentials
- Releasing Changelog Locks
- Muting Alerts
- Architectural Decision Records
- Backend Stack Overview
- Frontend Overview
- Cloud Architecture
- Cloud Environments
- Database ERD
- External IDs
- GraphQL Flow
- Hibernate Lazy fetching and nested models
- Identity Verification (Experian)
- Spring Profile Management
- SR Result bulk uploader device validation logic
- Test Metadata and how we store it
- TestOrder vs TestEvent
- ReportStream Integration
- Feature Flag Setup
- FHIR Resources
- FHIR Conversions
- Okta E2E Integration
- Deploy Application Action
- Slack notifications for support escalations
- Creating a New Environment Within a Resource Group
- How to Add and Use Environment Variables in Azure
- Web Application Firewall (WAF) Troubleshooting and Maintenance
- How to Review and Test Pull Requests with Terraform Changes