-
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
, no-okta-mgmt
, create-sample-data
and server-debug
. 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) -
azure-${ENV}
, where the current list of options includesdev
(confusingly),test
,demo
,training
,stg
,prod
andpentest
. These are the base profiles for deploying through managed infrastructure in Azure: other bean profiles activated for each environment are listed inspring.profiles.include
in these property files.
In addition, we have one set of "facet" profiles to link API deployments to Okta environments: okta-dev
, okta-stg
and so forth. These should be included in deployment-specific profiles using spring.profiles.include
, as if they were bean-activating profiles.
Profile | Comments |
---|---|
no-security | Disables Okta authentication and gets user identity from demo user configuration, not JWT |
no-okta-mgmt | Creates and manages Okta resources (users, groups) in-memory vs thru Okta management API. Highly correlated with no-security. |
create-sample-data | Initializes sample organization, facilities, users |
server-debug | enables some simple echo-back features to show what the server sees for a request, to be compared with what the developer expected it to see |
Environment | azure-* | okta-* | no-security | no-okta-mgmt | create-sample-data | server-debug | local |
---|---|---|---|---|---|---|---|
prod | Y | Y | |||||
demo | Y | Y | Y | Y | |||
training | Y | Y | Y | Y | |||
pentest | Y | Y | |||||
stg | Y | Y | |||||
dev | Y | Y | Y | ||||
test | Y | Y | Y | ||||
local dev | Y | Y | Y | Y | Y | ||
unit tests | Y | Y |
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