176 lines
4.2 KiB
TOML
Raw Normal View History

# Cost-Optimized Workspace Configuration
# Multi-provider cost optimization using provider specialization
[workspace]
2026-01-12 05:18:28 +00:00
description = "Cost-optimized deployment using Hetzner compute, AWS managed services, and DigitalOcean CDN"
environment = "production"
2026-01-12 05:18:28 +00:00
name = "cost-optimized"
owner = "platform-team"
# Hetzner Configuration - Compute Tier (Best price/performance)
[providers.hetzner]
default_datacenter = "nbg1-dc8"
2026-01-12 05:18:28 +00:00
default_location = "nbg1"
enabled = true
provider_type = "primary_compute"
2026-01-12 05:18:28 +00:00
token_env = "HCLOUD_TOKEN"
2026-01-12 05:18:28 +00:00
[providers.hetzner.settings]
default_volume_format = "ext4"
enable_automount = false
region_name = "eu-central"
server_type_default = "cpx21"
# AWS Configuration - Managed Services
[providers.aws]
2026-01-12 05:18:28 +00:00
access_key_env = "AWS_ACCESS_KEY_ID"
enabled = true
2026-01-12 05:18:28 +00:00
provider_type = "managed_services"
region = "us-east-1"
secret_key_env = "AWS_SECRET_ACCESS_KEY"
2026-01-12 05:18:28 +00:00
[providers.aws.settings]
backup_retention_days = 30
enable_enhanced_monitoring = true
enable_performance_insights = true
multi_az = true
region_name = "us-east"
# DigitalOcean Configuration - CDN and Storage
[providers.digitalocean]
default_region = "nyc3"
2026-01-12 05:18:28 +00:00
enabled = true
provider_type = "cdn_and_storage"
2026-01-12 05:18:28 +00:00
token_env = "DIGITALOCEAN_TOKEN"
2026-01-12 05:18:28 +00:00
[providers.digitalocean.settings]
enable_backups = false
enable_monitoring = true
region_name = "us-east-cdn"
spaces_region = "nyc3"
# Cost Tracking and Budgets
[cost_tracking]
2026-01-12 05:18:28 +00:00
budget_alert_threshold = 280
enabled = true
monthly_budget = 300
2026-01-12 05:18:28 +00:00
[cost_tracking.regional_budgets]
aws = 120
digitalocean = 65
hetzner = 75
2026-01-12 05:18:28 +00:00
[cost_tracking.optimization_targets]
aws_managed = "$100/month for all managed services (vs $200+ for self-managed)"
digitalocean_cdn = "$64/month for CDN and storage (vs $150+ for CloudFront)"
hetzner_compute = "€20.90/month per CPX21 (vs €45+ for equivalent AWS)"
# Deployment Configuration
[deployment]
batch_size = 1
health_check_wait = 60
order = ["hetzner", "aws", "digitalocean"]
2026-01-12 05:18:28 +00:00
rollback_on_failure = true
strategy = "rolling"
# Networking Configuration
[networking]
enable_vpn_tunnels = true
vpn_authentication = "sha256"
2026-01-12 05:18:28 +00:00
vpn_encryption = "aes-256"
vpn_protocol = "ipsec"
2026-01-12 05:18:28 +00:00
[networking.cidr_blocks]
aws = "10.1.0.0/16"
hetzner = "10.0.0.0/16"
# Monitoring and Alerting
[monitoring]
2026-01-12 05:18:28 +00:00
alert_on_threshold_exceeded = true
enabled = true
metric_collection_interval = 60
2026-01-12 05:18:28 +00:00
[monitoring.thresholds]
cpu = 80
disk = 90
memory = 85
queue_depth = 1000
2026-01-12 05:18:28 +00:00
[monitoring.critical_alerts]
cache_eviction_high = { threshold = 10, action = "alert", severity = "warning" }
database_cpu_high = { threshold = 75, action = "scale_up", severity = "warning" }
queue_depth_high = { threshold = 1000, action = "alert", severity = "critical" }
# Backup Configuration
[backup]
2026-01-12 05:18:28 +00:00
compression = true
enabled = true
2026-01-12 05:18:28 +00:00
encryption = true
frequency = "daily"
retention_days = 30
2026-01-12 05:18:28 +00:00
[backup.strategies]
application = "Weekly Hetzner snapshots"
cdn = "Weekly Spaces backups to secondary region"
rds = "AWS managed, 30-day retention"
# Performance Configuration
[performance]
cache_ttl = 3600
cdn_cache_ttl = 86400
2026-01-12 05:18:28 +00:00
enable_caching = true
2026-01-12 05:18:28 +00:00
[performance.optimization]
cache = "ElastiCache Redis for session and data caching"
cdn = "Serve static assets from DigitalOcean CDN"
database = "Use read replicas for read-heavy workloads"
queue = "SQS for async job processing"
# Scaling Configuration
[scaling]
auto_scale_enabled = true
2026-01-12 05:18:28 +00:00
[scaling.hetzner]
max_instances = 5
min_instances = 2
scale_down_cpu_threshold = 30
scale_up_cpu_threshold = 80
2026-01-12 05:18:28 +00:00
[scaling.aws]
auto_scaling_enabled = false
note = "RDS handles scaling automatically, SQS scales automatically"
# Security Configuration
[security]
2026-01-12 05:18:28 +00:00
backup_encryption = true
enable_encryption = true
enable_monitoring = true
2026-01-12 05:18:28 +00:00
[security.vpn_tunnel]
authentication = "SHA256"
dh_group = "Group 14"
encryption_algorithm = "AES-256"
encryption_integrity = "enabled"
# Application Settings
[application]
app_name = "cost-optimized-app"
version = "1.0"
2026-01-12 05:18:28 +00:00
[application.database]
connection_pool = 20
engine = "postgresql"
idle_timeout = 900
version = "14.6"
[application.cache]
engine = "redis"
eviction_policy = "allkeys-lru"
max_memory = "250MB"
version = "7.0"
[application.queue]
default_visibility_timeout = 300
long_poll_interval = 20
max_message_size = 262144