Environment Configuration
Environment Overview
Environment Specifications
Development Environment
development:
kubernetes:
version: 1.25
node_pools:
- name: dev-pool
size: 2
instance_type: VM.Standard.E4.Flex
database:
type: ATP
cpu: 1
storage: 100GB
cache:
type: Redis
size: cache.t3.micro
endpoints:
api: https://api.dev.oanfinance.com
web: https://dev.oanfinance.com
Staging Environment
staging:
kubernetes:
version: 1.25
node_pools:
- name: stage-pool
size: 3
instance_type: VM.Standard.E4.Flex
database:
type: ATP
cpu: 2
storage: 250GB
cache:
type: Redis
size: cache.t3.small
endpoints:
api: https://api.staging.oanfinance.com
web: https://staging.oanfinance.com
Production Environment
production:
kubernetes:
version: 1.25
node_pools:
- name: prod-pool
size: 5
instance_type: VM.Standard.E4.Flex
database:
type: ATP
cpu: 4
storage: 500GB
cache:
type: Redis
size: cache.t3.medium
endpoints:
api: https://api.oanfinance.com
web: https://oanfinance.com
Environment Variables
Variable Management
Configuration Structure
config:
common:
LOG_LEVEL: info
NODE_ENV: ${ENVIRONMENT}
development:
API_URL: https://api.dev.oanfinance.com
FEATURE_FLAGS:
NEW_PAYMENT_FLOW: true
BETA_FEATURES: true
staging:
API_URL: https://api.staging.oanfinance.com
FEATURE_FLAGS:
NEW_PAYMENT_FLOW: true
BETA_FEATURES: false
production:
API_URL: https://api.oanfinance.com
FEATURE_FLAGS:
NEW_PAYMENT_FLOW: false
BETA_FEATURES: false
Access Control
Environment Access Matrix
| Role | Development | Staging | Production |
|---|---|---|---|
| Developer | Full Access | Read + Deploy | Read Only |
| DevOps | Full Access | Full Access | Deploy + Manage |
| SRE | Full Access | Full Access | Full Access |
| QA | Read + Test | Read + Test | Read Only |
Monitoring Configuration
Monitoring Settings
monitoring:
development:
log_level: debug
metrics_retention: 7d
trace_sampling: 1.0
staging:
log_level: info
metrics_retention: 14d
trace_sampling: 0.5
production:
log_level: warn
metrics_retention: 30d
trace_sampling: 0.1
Backup Strategy
Backup Configuration
backups:
development:
frequency: daily
retention: 7d
type: snapshot
staging:
frequency: daily
retention: 14d
type: snapshot
production:
frequency: hourly
retention: 30d
type: continuous
dr_replication: true
Deployment Process
Best Practices
Environment Management
- Consistent configurations
- Environment parity
- Automated provisioning
- Regular maintenance
Security
- Environment isolation
- Access control
- Secret management
- Security scanning
Monitoring
- Comprehensive metrics
- Log aggregation
- Performance monitoring
- Alert configuration
Deployment
- Automated deployments
- Rollback procedures
- Change management
- Version control