Environments
Multi-environment deployment support in StrictOps
Environments
Environments let you deploy your application to different stages (production, staging, development) with environment-specific configuration.
Default Environments
If you don't specify environments in your strictops.yml, StrictOps uses these defaults:
- Environments:
dev,prod - Production:
prod(orproduction, if present in your environments list)
Defining Environments
Environments are defined in the deploy section of your strictops.yml:
The environments array lists all environment names. The production array marks which environments are considered production (affects alerting, safeguards, and stack strategy isolation).
Environment-Specific Configuration
Services can have different configuration per environment:
Environment overrides merge with the base service configuration.
How Environments Work
When you deploy to an environment:
- StrictOps reads your
strictops.ymlconfiguration - Base service settings are loaded
- Environment-specific overrides are applied
- A CloudFormation stack is created/updated for that environment
Each environment gets its own:
- CloudFormation stack
- ECS service instances
- Load balancer target group
- CloudWatch log group
Environment Isolation
Environments are isolated at the infrastructure level:
| Resource | Isolation |
|---|---|
| ECS Services | Separate service per environment |
| CloudFormation | Separate stack per environment |
| Logs | Separate log group per environment |
| URLs | Different service URL per environment |
The degree of isolation depends on the stack strategy configured for the project (shared, split, or isolated).
Typical Setup
A common pattern is three environments:
| Environment | Purpose |
|---|---|
dev | Developer testing, frequent deploys |
staging | Pre-production testing, mirrors production |
prod | Live customer traffic |
Deployment Targeting
When creating a deployment, specify the target environment:
The deployment will use the configuration for that environment.
Relationship to Other Entities
- Projects define which environments are available
- Deployments target a specific environment
- Services can have per-environment configuration overrides
- Logs are separated by environment
- Stack Strategies control how environments are grouped into CloudFormation stacks