-
Notifications
You must be signed in to change notification settings - Fork 53
Spring Profile Management
We need to outline our best (or at least, shared) practices. This page will do that. It doesn't yet.
Our current practice is to have two (mostly) sets of bean profiles: profiles that activate or deactivate beans directly within the application context, and profiles that are linked to a deployment environment and include profiles from the first set within them.
See the BeanProfiles class for profiles that can be used within the code. At the time of this writing they are no-security
, single-tenant
, and auth-dev
. In addition, there is a test
profile for integration tests, though this should probably be removed (or at least moved
out of src/main). These profiles are mainly incorporated into deployment profiles by way of the spring.profiles.include
property.
Profiles that are intended to define a deployment environment include:
-
dev
(local development, though also used for some tests) -
local
is a special case profile that is ignored by git so that local property overrides can be made without editing a version-controlled file. It is automatically included in thedev
profile, but otherwise ignored. -
prod
(original production deployment) -
cloud
(any deployment to cloud.gov or other PCF instance) -
azure-dev
,azure-demo
,azure-staging
andazure-prod
, which are the eventual profiles for deploying through managed infrastructure.
In addition, we have one set of "facet" profiles to link API deployments to Okta environments: okta-dev
, okta-stg
and okta-prod
. These should be included in deployment-specific profiles using spring.profiles.include
, as if they were bean-activating profiles.
Profile | Applicable Environments | Authentication | Contains Profiles | Comments |
---|---|---|---|---|
okta-prod | prod | Okta | ||
no-security | unit tests,dev,demo,training | None | ||
no-okta-mgmt | demo,training(?) | N/A | ||
single-tenant | ||||
create-sample-data | ||||
Generated by Table Generator |
Environment | All included Spring profiles | azure- | okta- | no-security | single-tenant | no-okta-mgmt | **create-sample- | okta- | auth-dev | local |
---|---|---|---|---|---|---|---|---|---|---|
prod | azure-prod,okta-prod | |||||||||
demo | azure-demo,no-security,single-tenant,no-okta-mgmt,create-sample-data | |||||||||
training | azure-training,no-security,single-tenant,no-okta-mgmt,create-sample-data | |||||||||
pentest | azure-pentest,okta-pentest | |||||||||
stg | azure-stg,okta-stg | |||||||||
dev | azure-dev,okta-dev,auth-dev | |||||||||
test | azure-test,okta-test,auth-dev | |||||||||
local | dev,no-security,auth-dev,single-tenant,create-sample-data,local | |||||||||
unit tests | no-security,no-okta-mgmt,local(?) |
See src/main/resources or grep for @Profile
in src/ to find out!
- 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