Skip to main content

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

RoleDevelopmentStagingProduction
DeveloperFull AccessRead + DeployRead Only
DevOpsFull AccessFull AccessDeploy + Manage
SREFull AccessFull AccessFull Access
QARead + TestRead + TestRead 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

  1. Consistent configurations
  2. Environment parity
  3. Automated provisioning
  4. Regular maintenance

Security

  1. Environment isolation
  2. Access control
  3. Secret management
  4. Security scanning

Monitoring

  1. Comprehensive metrics
  2. Log aggregation
  3. Performance monitoring
  4. Alert configuration

Deployment

  1. Automated deployments
  2. Rollback procedures
  3. Change management
  4. Version control