chore: fix config examples location
This commit is contained in:
parent
3c3ef47f7f
commit
1697d0a39e
@ -1,351 +0,0 @@
|
||||
# Development Environment Configuration Template
|
||||
# Copy this file to config.dev.toml for development-optimized settings
|
||||
#
|
||||
# This template provides pre-configured settings optimized for development work:
|
||||
# - Enhanced debugging and logging
|
||||
# - Local provider as default
|
||||
# - Relaxed validation for faster iteration
|
||||
# - Development-friendly output formats
|
||||
# - Comprehensive error reporting
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT-OPTIMIZED CORE CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
[core]
|
||||
version = "1.0.0"
|
||||
name = "provisioning-system-dev"
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT PATHS
|
||||
# =============================================================================
|
||||
# Configured for typical development directory structures
|
||||
|
||||
[paths]
|
||||
# Development base path - adjust to your development environment
|
||||
# Common development locations:
|
||||
# base = "/Users/yourname/dev/provisioning" # macOS development
|
||||
# base = "/home/developer/workspace/provisioning" # Linux development
|
||||
# base = "C:/dev/provisioning" # Windows development
|
||||
base = "/path/to/your/dev/provisioning"
|
||||
|
||||
# Development-specific path overrides
|
||||
# Uncomment if you use custom development directory structure
|
||||
# kloud = "{{paths.base}}/dev-infra"
|
||||
# providers = "{{paths.base}}/dev-providers"
|
||||
# taskservs = "{{paths.base}}/dev-taskservs"
|
||||
# templates = "{{paths.base}}/dev-templates"
|
||||
|
||||
[paths.files]
|
||||
# Development configuration files
|
||||
settings = "{{paths.base}}/kcl/settings.k"
|
||||
keys = "{{paths.base}}/keys.yaml"
|
||||
requirements = "{{paths.base}}/requirements.yaml"
|
||||
notify_icon = "{{paths.base}}/resources/icon.png"
|
||||
|
||||
# =============================================================================
|
||||
# ENHANCED DEBUGGING FOR DEVELOPMENT
|
||||
# =============================================================================
|
||||
# Aggressive debugging settings for development workflow
|
||||
|
||||
[debug]
|
||||
# Enable comprehensive debugging
|
||||
enabled = true
|
||||
|
||||
# Show detailed metadata for debugging complex issues
|
||||
metadata = true
|
||||
|
||||
# Enable check mode by default to prevent accidental changes
|
||||
# Set to false when you want to actually execute operations
|
||||
check = true
|
||||
|
||||
# Enable remote debugging for distributed development
|
||||
remote = true
|
||||
|
||||
# Use debug logging level for maximum information
|
||||
log_level = "debug"
|
||||
|
||||
# Disable terminal optimizations for better IDE integration
|
||||
no_terminal = false
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT-FRIENDLY OUTPUT
|
||||
# =============================================================================
|
||||
|
||||
[output]
|
||||
# Use bat for syntax highlighting if available, fallback to less
|
||||
file_viewer = "bat"
|
||||
|
||||
# JSON format for easier programmatic processing and debugging
|
||||
format = "json"
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT SOPS CONFIGURATION
|
||||
# =============================================================================
|
||||
# Simplified SOPS setup for development
|
||||
|
||||
[sops]
|
||||
# Enable SOPS for testing encryption workflows
|
||||
use_sops = true
|
||||
|
||||
# Development SOPS configuration
|
||||
config_path = "{{paths.base}}/.sops.yaml"
|
||||
|
||||
# Extended search paths for development keys
|
||||
key_search_paths = [
|
||||
"{{paths.base}}/keys/dev-age.txt",
|
||||
"{{paths.base}}/keys/age.txt",
|
||||
"~/.config/sops/age/dev-keys.txt",
|
||||
"~/.config/sops/age/keys.txt",
|
||||
"~/.age/dev-keys.txt",
|
||||
"~/.age/keys.txt",
|
||||
"./dev-keys/age.txt"
|
||||
]
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT RUNTIME CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
[taskservs]
|
||||
# Separate development runtime directory
|
||||
run_path = "{{paths.base}}/run/dev-taskservs"
|
||||
|
||||
[clusters]
|
||||
# Development cluster runtime
|
||||
run_path = "{{paths.base}}/run/dev-clusters"
|
||||
|
||||
[generation]
|
||||
# Development generation directory with timestamping
|
||||
dir_path = "{{paths.base}}/generated/dev"
|
||||
defs_file = "dev-defs.toml"
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT PROVIDER CONFIGURATION
|
||||
# =============================================================================
|
||||
# Optimized for local development and testing
|
||||
|
||||
[providers]
|
||||
# Default to local provider for development
|
||||
default = "local"
|
||||
|
||||
# AWS Development Configuration
|
||||
[providers.aws]
|
||||
# Use localstack or development AWS account
|
||||
api_url = ""
|
||||
auth = ""
|
||||
interface = "CLI"
|
||||
|
||||
# UpCloud Development Configuration
|
||||
[providers.upcloud]
|
||||
# Standard UpCloud API for development testing
|
||||
api_url = "https://api.upcloud.com/1.3"
|
||||
auth = ""
|
||||
interface = "CLI"
|
||||
|
||||
# Local Development Provider
|
||||
[providers.local]
|
||||
# Local development configuration
|
||||
api_url = ""
|
||||
auth = ""
|
||||
interface = "CLI"
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT ENVIRONMENT OPTIMIZATIONS
|
||||
# =============================================================================
|
||||
|
||||
# Development environment defaults
|
||||
[environments.dev]
|
||||
debug.enabled = true
|
||||
debug.log_level = "debug"
|
||||
debug.metadata = true
|
||||
debug.check = true
|
||||
debug.remote = true
|
||||
providers.default = "local"
|
||||
output.format = "json"
|
||||
output.file_viewer = "bat"
|
||||
|
||||
# Override for when switching to production testing
|
||||
[environments.prod]
|
||||
debug.enabled = false
|
||||
debug.log_level = "warn"
|
||||
debug.check = true
|
||||
debug.metadata = false
|
||||
providers.default = "aws"
|
||||
output.format = "yaml"
|
||||
|
||||
# Test environment for CI/CD
|
||||
[environments.test]
|
||||
debug.enabled = true
|
||||
debug.log_level = "info"
|
||||
debug.check = true
|
||||
debug.metadata = false
|
||||
providers.default = "local"
|
||||
output.format = "json"
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT-SPECIFIC EXTENSIONS
|
||||
# =============================================================================
|
||||
|
||||
# Development notifications
|
||||
[notifications]
|
||||
enabled = true
|
||||
icon_path = "{{paths.base}}/resources/dev-icon.png"
|
||||
sound_enabled = false
|
||||
# Development-specific notification channels
|
||||
slack_webhook = ""
|
||||
teams_webhook = ""
|
||||
|
||||
# Development performance settings
|
||||
[performance]
|
||||
# Reduced parallelism for easier debugging
|
||||
parallel_operations = 2
|
||||
# Shorter timeouts for faster feedback
|
||||
timeout_seconds = 120
|
||||
# Enable caching for faster iteration
|
||||
cache_enabled = true
|
||||
# Development cache directory
|
||||
cache_dir = "{{paths.base}}/cache/dev"
|
||||
|
||||
# Development security settings
|
||||
[security]
|
||||
# Require confirmation for destructive operations
|
||||
require_confirmation = true
|
||||
# Log sensitive data in development (careful with this)
|
||||
log_sensitive_data = false
|
||||
# Relaxed validation for faster development
|
||||
strict_validation = false
|
||||
# Development backup settings
|
||||
auto_backup = true
|
||||
backup_dir = "{{paths.base}}/backups/dev"
|
||||
|
||||
# Development tool integration
|
||||
[tools]
|
||||
# Editor for configuration files
|
||||
editor = "code"
|
||||
# Terminal for SSH sessions
|
||||
terminal = "iterm2"
|
||||
# Browser for web interfaces
|
||||
browser = "chrome"
|
||||
# Diff tool for configuration comparison
|
||||
diff_tool = "code --diff"
|
||||
|
||||
# Development container settings
|
||||
[containers]
|
||||
# Container runtime for local testing
|
||||
runtime = "docker"
|
||||
# Development registry
|
||||
registry = "localhost:5000"
|
||||
# Development namespace
|
||||
namespace = "dev-provisioning"
|
||||
|
||||
# Development monitoring
|
||||
[monitoring]
|
||||
# Enable development metrics
|
||||
enabled = true
|
||||
# Metrics endpoint for development
|
||||
endpoint = "http://localhost:8080/metrics"
|
||||
# Development log aggregation
|
||||
log_endpoint = "http://localhost:3000"
|
||||
|
||||
# Development backup and recovery
|
||||
[backup]
|
||||
# Enable automatic backups during development
|
||||
enabled = true
|
||||
# Backup interval for development
|
||||
interval = "30m"
|
||||
# Development backup retention
|
||||
retention_days = 7
|
||||
# Development backup location
|
||||
location = "{{paths.base}}/backups/dev"
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT WORKFLOW SHORTCUTS
|
||||
# =============================================================================
|
||||
|
||||
# Common development aliases and shortcuts
|
||||
[aliases]
|
||||
# Quick commands for development workflow
|
||||
dev-setup = "generate infra --new dev-test --template basic"
|
||||
dev-clean = "delete server --infra dev-test --yes"
|
||||
dev-status = "show servers --infra dev-test --out json"
|
||||
dev-logs = "show logs --follow --level debug"
|
||||
dev-validate = "validate config --strict"
|
||||
|
||||
# Development template configurations
|
||||
[templates]
|
||||
# Default template for development
|
||||
default = "dev-basic"
|
||||
# Template search paths
|
||||
search_paths = [
|
||||
"{{paths.base}}/templates/dev",
|
||||
"{{paths.base}}/templates/common"
|
||||
]
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT USAGE EXAMPLES
|
||||
# =============================================================================
|
||||
#
|
||||
# Quick Development Commands:
|
||||
# --------------------------
|
||||
#
|
||||
# 1. Create development infrastructure:
|
||||
# ./core/nulib/provisioning generate infra --new mydev --template dev-basic
|
||||
#
|
||||
# 2. Validate configuration with debug output:
|
||||
# ./core/nulib/provisioning validate config --debug
|
||||
#
|
||||
# 3. Test server creation (check mode):
|
||||
# ./core/nulib/provisioning server create --infra mydev --check
|
||||
#
|
||||
# 4. Monitor operations with enhanced logging:
|
||||
# ./core/nulib/provisioning show logs --follow --level debug
|
||||
#
|
||||
# 5. Interactive development shell:
|
||||
# ./core/nulib/provisioning nu
|
||||
#
|
||||
# Development Environment Variables:
|
||||
# ---------------------------------
|
||||
# export PROVISIONING_ENV=dev
|
||||
# export PROVISIONING_DEBUG=true
|
||||
# export PROVISIONING_LOG_LEVEL=debug
|
||||
#
|
||||
# Development Testing Workflow:
|
||||
# ----------------------------
|
||||
# 1. Create test infrastructure: provisioning generate infra --new test-$(date +%s)
|
||||
# 2. Validate: provisioning validate config
|
||||
# 3. Test locally: provisioning server create --check
|
||||
# 4. Deploy to dev: provisioning server create
|
||||
# 5. Run tests: provisioning taskserv create --check
|
||||
# 6. Clean up: provisioning delete server --yes
|
||||
#
|
||||
# =============================================================================
|
||||
# DEVELOPMENT TROUBLESHOOTING
|
||||
# =============================================================================
|
||||
#
|
||||
# Common Development Issues:
|
||||
# -------------------------
|
||||
#
|
||||
# 1. SOPS Key Issues:
|
||||
# - Check key paths in sops.key_search_paths
|
||||
# - Verify SOPS_AGE_KEY_FILE environment variable
|
||||
# - Test: sops -d path/to/encrypted/file
|
||||
#
|
||||
# 2. Path Configuration:
|
||||
# - Verify paths.base points to correct directory
|
||||
# - Check file permissions
|
||||
# - Test: provisioning validate config
|
||||
#
|
||||
# 3. Provider Authentication:
|
||||
# - Check cloud provider credentials
|
||||
# - Verify API endpoints
|
||||
# - Test: provisioning providers
|
||||
#
|
||||
# 4. Debug Output Not Showing:
|
||||
# - Ensure debug.enabled = true
|
||||
# - Check debug.log_level setting
|
||||
# - Verify no_terminal = false
|
||||
#
|
||||
# 5. Performance Issues:
|
||||
# - Reduce parallel_operations
|
||||
# - Enable caching
|
||||
# - Check timeout_seconds setting
|
@ -1,490 +0,0 @@
|
||||
# Production Environment Configuration Template
|
||||
# Copy this file to config.prod.toml for production-ready settings
|
||||
#
|
||||
# This template provides secure, performance-optimized settings for production:
|
||||
# - Minimal logging to reduce overhead
|
||||
# - Security-focused configurations
|
||||
# - Production provider defaults
|
||||
# - Optimized performance settings
|
||||
# - Robust error handling and validation
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION CORE CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
[core]
|
||||
version = "1.0.0"
|
||||
name = "provisioning-system-prod"
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION PATHS
|
||||
# =============================================================================
|
||||
# Configured for production deployment standards
|
||||
|
||||
[paths]
|
||||
# Production base path - typically system-wide installation
|
||||
# Standard production locations:
|
||||
# base = "/opt/provisioning" # Standard system location
|
||||
# base = "/usr/local/provisioning" # Alternative system location
|
||||
# base = "/app/provisioning" # Container deployment
|
||||
# base = "/srv/provisioning" # Service directory
|
||||
base = "/opt/provisioning"
|
||||
|
||||
# Production paths follow security best practices
|
||||
# All paths inherit from base for consistency
|
||||
kloud = "{{paths.base}}/infra"
|
||||
providers = "{{paths.base}}/providers"
|
||||
taskservs = "{{paths.base}}/taskservs"
|
||||
clusters = "{{paths.base}}/cluster"
|
||||
resources = "{{paths.base}}/resources"
|
||||
templates = "{{paths.base}}/templates"
|
||||
tools = "{{paths.base}}/tools"
|
||||
core = "{{paths.base}}/core"
|
||||
|
||||
[paths.files]
|
||||
# Production configuration files with secure defaults
|
||||
settings = "{{paths.base}}/kcl/settings.k"
|
||||
keys = "{{paths.base}}/keys/prod-keys.yaml"
|
||||
requirements = "{{paths.base}}/requirements.yaml"
|
||||
notify_icon = "{{paths.base}}/resources/icon.png"
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION SECURITY AND DEBUGGING
|
||||
# =============================================================================
|
||||
# Minimal debugging for security and performance
|
||||
|
||||
[debug]
|
||||
# Disable debug mode in production for security
|
||||
enabled = false
|
||||
|
||||
# Never show metadata in production logs
|
||||
metadata = false
|
||||
|
||||
# Never enable check mode by default in production
|
||||
check = false
|
||||
|
||||
# Disable remote debugging in production
|
||||
remote = false
|
||||
|
||||
# Use warning level logging to capture only important events
|
||||
# This reduces log volume while maintaining operational visibility
|
||||
log_level = "warn"
|
||||
|
||||
# Ensure terminal features work properly in production
|
||||
no_terminal = false
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION OUTPUT CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
[output]
|
||||
# Use less for reliable paging in production environments
|
||||
file_viewer = "less"
|
||||
|
||||
# YAML format for human-readable production output
|
||||
format = "yaml"
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION SOPS CONFIGURATION
|
||||
# =============================================================================
|
||||
# Secure secrets management for production
|
||||
|
||||
[sops]
|
||||
# Enable SOPS for production secret management
|
||||
use_sops = true
|
||||
|
||||
# Production SOPS configuration with strict security
|
||||
config_path = "{{paths.base}}/.sops.yaml"
|
||||
|
||||
# Secure key search paths for production
|
||||
# Only search trusted, secure locations
|
||||
key_search_paths = [
|
||||
"/etc/sops/age/keys.txt",
|
||||
"{{paths.base}}/keys/age.txt",
|
||||
"/var/lib/provisioning/keys/age.txt"
|
||||
]
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION RUNTIME CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
[taskservs]
|
||||
# Production runtime directory with proper permissions
|
||||
run_path = "/var/lib/provisioning/taskservs"
|
||||
|
||||
[clusters]
|
||||
# Production cluster runtime with persistence
|
||||
run_path = "/var/lib/provisioning/clusters"
|
||||
|
||||
[generation]
|
||||
# Production generation directory
|
||||
dir_path = "/var/lib/provisioning/generated"
|
||||
defs_file = "prod-defs.toml"
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION PROVIDER CONFIGURATION
|
||||
# =============================================================================
|
||||
# Production-ready cloud provider settings
|
||||
|
||||
[providers]
|
||||
# Default to AWS for production deployments
|
||||
# Change to your primary production cloud provider
|
||||
default = "aws"
|
||||
|
||||
# AWS Production Configuration
|
||||
[providers.aws]
|
||||
# Use default AWS endpoints for production
|
||||
api_url = ""
|
||||
# Use IAM roles/instance profiles for authentication
|
||||
auth = ""
|
||||
# Use CLI interface for production stability
|
||||
interface = "CLI"
|
||||
|
||||
# UpCloud Production Configuration
|
||||
[providers.upcloud]
|
||||
# Standard UpCloud API endpoint
|
||||
api_url = "https://api.upcloud.com/1.3"
|
||||
# Use API keys stored in environment/SOPS
|
||||
auth = ""
|
||||
# Use CLI interface for production
|
||||
interface = "CLI"
|
||||
|
||||
# Local Provider (disabled in production)
|
||||
[providers.local]
|
||||
# Not typically used in production
|
||||
api_url = ""
|
||||
auth = ""
|
||||
interface = "CLI"
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION ENVIRONMENT SETTINGS
|
||||
# =============================================================================
|
||||
|
||||
# Production environment defaults
|
||||
[environments.prod]
|
||||
debug.enabled = false
|
||||
debug.log_level = "warn"
|
||||
debug.metadata = false
|
||||
debug.check = false
|
||||
debug.remote = false
|
||||
providers.default = "aws"
|
||||
output.format = "yaml"
|
||||
output.file_viewer = "less"
|
||||
|
||||
# Development override (if needed for production debugging)
|
||||
[environments.dev]
|
||||
debug.enabled = true
|
||||
debug.log_level = "info"
|
||||
debug.check = true
|
||||
providers.default = "local"
|
||||
output.format = "json"
|
||||
|
||||
# Testing environment for production validation
|
||||
[environments.test]
|
||||
debug.enabled = false
|
||||
debug.log_level = "info"
|
||||
debug.check = true
|
||||
providers.default = "aws"
|
||||
output.format = "yaml"
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION PERFORMANCE OPTIMIZATION
|
||||
# =============================================================================
|
||||
|
||||
# Performance settings optimized for production workloads
|
||||
[performance]
|
||||
# Higher parallelism for production efficiency
|
||||
parallel_operations = 8
|
||||
# Longer timeouts for production reliability
|
||||
timeout_seconds = 600
|
||||
# Enable caching for better performance
|
||||
cache_enabled = true
|
||||
# Production cache directory
|
||||
cache_dir = "/var/cache/provisioning"
|
||||
# Cache retention for production
|
||||
cache_retention_hours = 24
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION SECURITY CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Security settings for production environment
|
||||
[security]
|
||||
# Always require confirmation for destructive operations
|
||||
require_confirmation = true
|
||||
# Never log sensitive data in production
|
||||
log_sensitive_data = false
|
||||
# Enable strict validation in production
|
||||
strict_validation = true
|
||||
# Production backup settings
|
||||
auto_backup = true
|
||||
backup_dir = "/var/backups/provisioning"
|
||||
# Backup retention policy
|
||||
backup_retention_days = 30
|
||||
# Encrypt backups in production
|
||||
backup_encryption = true
|
||||
# Audit logging for production
|
||||
audit_enabled = true
|
||||
audit_log_path = "/var/log/provisioning/audit.log"
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION MONITORING AND ALERTING
|
||||
# =============================================================================
|
||||
|
||||
# Production monitoring configuration
|
||||
[monitoring]
|
||||
# Enable comprehensive monitoring
|
||||
enabled = true
|
||||
# Production metrics endpoint
|
||||
endpoint = "https://metrics.example.com/provisioning"
|
||||
# Monitoring interval
|
||||
interval = "60s"
|
||||
# Health check configuration
|
||||
health_check_enabled = true
|
||||
health_check_port = 8080
|
||||
# Log aggregation for production
|
||||
log_endpoint = "https://logs.example.com/provisioning"
|
||||
|
||||
# Production alerting
|
||||
[alerting]
|
||||
# Enable production alerting
|
||||
enabled = true
|
||||
# Alert channels
|
||||
email_enabled = true
|
||||
email_recipients = ["ops@example.com", "devops@example.com"]
|
||||
slack_enabled = true
|
||||
slack_webhook = "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK"
|
||||
# PagerDuty integration
|
||||
pagerduty_enabled = true
|
||||
pagerduty_key = "SOPS_ENCRYPTED_KEY"
|
||||
# Alert thresholds
|
||||
error_threshold = 5
|
||||
warning_threshold = 10
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION BACKUP AND DISASTER RECOVERY
|
||||
# =============================================================================
|
||||
|
||||
# Production backup configuration
|
||||
[backup]
|
||||
# Enable automated backups
|
||||
enabled = true
|
||||
# Backup schedule (production frequency)
|
||||
schedule = "0 2 * * *" # Daily at 2 AM
|
||||
# Backup retention policy
|
||||
retention_days = 90
|
||||
# Backup storage location
|
||||
location = "/var/backups/provisioning"
|
||||
# Remote backup storage
|
||||
remote_enabled = true
|
||||
remote_location = "s3://company-backups/provisioning/"
|
||||
# Backup encryption
|
||||
encryption_enabled = true
|
||||
# Backup verification
|
||||
verification_enabled = true
|
||||
|
||||
# Disaster recovery settings
|
||||
[disaster_recovery]
|
||||
# Enable DR procedures
|
||||
enabled = true
|
||||
# DR site configuration
|
||||
dr_site = "us-west-2"
|
||||
# RTO and RPO targets
|
||||
rto_minutes = 60
|
||||
rpo_minutes = 15
|
||||
# DR testing schedule
|
||||
test_schedule = "0 3 1 * *" # Monthly DR testing
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION COMPLIANCE AND GOVERNANCE
|
||||
# =============================================================================
|
||||
|
||||
# Compliance settings for production
|
||||
[compliance]
|
||||
# Enable compliance monitoring
|
||||
enabled = true
|
||||
# Compliance frameworks
|
||||
frameworks = ["SOC2", "PCI-DSS", "GDPR"]
|
||||
# Compliance reporting
|
||||
reporting_enabled = true
|
||||
report_frequency = "monthly"
|
||||
# Data retention policies
|
||||
data_retention_days = 2555 # 7 years
|
||||
# Encryption requirements
|
||||
encryption_at_rest = true
|
||||
encryption_in_transit = true
|
||||
|
||||
# Governance settings
|
||||
[governance]
|
||||
# Change management
|
||||
change_approval_required = true
|
||||
# Configuration drift detection
|
||||
drift_detection_enabled = true
|
||||
drift_check_interval = "24h"
|
||||
# Policy enforcement
|
||||
policy_enforcement_enabled = true
|
||||
# Resource tagging requirements
|
||||
required_tags = ["Environment", "Owner", "Project", "CostCenter"]
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION INTEGRATION SETTINGS
|
||||
# =============================================================================
|
||||
|
||||
# CI/CD integration for production
|
||||
[cicd]
|
||||
# Enable CI/CD integration
|
||||
enabled = true
|
||||
# Pipeline triggers
|
||||
trigger_on_config_change = true
|
||||
# Deployment gates
|
||||
require_approval = true
|
||||
# Automated testing
|
||||
run_tests = true
|
||||
test_timeout = 1800
|
||||
# Rollback capability
|
||||
auto_rollback_enabled = true
|
||||
|
||||
# ITSM integration
|
||||
[itsm]
|
||||
# ServiceNow integration
|
||||
servicenow_enabled = true
|
||||
servicenow_instance = "https://company.service-now.com"
|
||||
# Change request automation
|
||||
auto_create_change_requests = true
|
||||
# Incident management
|
||||
auto_create_incidents = true
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION RESOURCE MANAGEMENT
|
||||
# =============================================================================
|
||||
|
||||
# Resource quotas and limits for production
|
||||
[resources]
|
||||
# CPU limits
|
||||
max_cpu_cores = 32
|
||||
# Memory limits
|
||||
max_memory_gb = 128
|
||||
# Storage limits
|
||||
max_storage_gb = 1000
|
||||
# Network limits
|
||||
max_bandwidth_mbps = 1000
|
||||
# Instance limits
|
||||
max_instances = 100
|
||||
|
||||
# Cost management
|
||||
[cost_management]
|
||||
# Enable cost tracking
|
||||
enabled = true
|
||||
# Budget alerts
|
||||
budget_alerts_enabled = true
|
||||
monthly_budget_limit = 10000
|
||||
# Cost optimization
|
||||
auto_optimize = false
|
||||
optimization_schedule = "0 4 * * 0" # Weekly optimization review
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION OPERATIONAL PROCEDURES
|
||||
# =============================================================================
|
||||
|
||||
# Maintenance windows
|
||||
[maintenance]
|
||||
# Scheduled maintenance
|
||||
enabled = true
|
||||
# Maintenance window schedule
|
||||
schedule = "0 3 * * 0" # Sunday 3 AM
|
||||
# Maintenance duration
|
||||
duration_hours = 4
|
||||
# Notification before maintenance
|
||||
notification_hours = 24
|
||||
|
||||
# Incident response
|
||||
[incident_response]
|
||||
# Enable automated incident response
|
||||
enabled = true
|
||||
# Response team notifications
|
||||
primary_contact = "ops@example.com"
|
||||
escalation_contact = "management@example.com"
|
||||
# Response time targets
|
||||
response_time_minutes = 15
|
||||
resolution_time_hours = 4
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION USAGE GUIDELINES
|
||||
# =============================================================================
|
||||
#
|
||||
# Production Deployment Checklist:
|
||||
# --------------------------------
|
||||
#
|
||||
# 1. Security Review:
|
||||
# □ SOPS keys properly secured
|
||||
# □ IAM roles configured with least privilege
|
||||
# □ Network security groups configured
|
||||
# □ Audit logging enabled
|
||||
#
|
||||
# 2. Performance Validation:
|
||||
# □ Resource quotas set appropriately
|
||||
# □ Monitoring and alerting configured
|
||||
# □ Backup and DR procedures tested
|
||||
# □ Load testing completed
|
||||
#
|
||||
# 3. Compliance Verification:
|
||||
# □ Required tags applied to all resources
|
||||
# □ Data encryption enabled
|
||||
# □ Compliance frameworks configured
|
||||
# □ Change management processes in place
|
||||
#
|
||||
# 4. Operational Readiness:
|
||||
# □ Runbooks created and tested
|
||||
# □ On-call procedures established
|
||||
# □ Incident response tested
|
||||
# □ Documentation updated
|
||||
#
|
||||
# Production Operations Commands:
|
||||
# ------------------------------
|
||||
#
|
||||
# 1. Health Check:
|
||||
# ./core/nulib/provisioning validate config --strict
|
||||
#
|
||||
# 2. Deploy Infrastructure:
|
||||
# ./core/nulib/provisioning server create --infra production
|
||||
#
|
||||
# 3. Monitor Operations:
|
||||
# ./core/nulib/provisioning show servers --infra production --out yaml
|
||||
#
|
||||
# 4. Backup Configuration:
|
||||
# ./core/nulib/provisioning backup create --infra production
|
||||
#
|
||||
# 5. Emergency Procedures:
|
||||
# ./core/nulib/provisioning cluster delete --infra production --emergency
|
||||
#
|
||||
# =============================================================================
|
||||
# PRODUCTION TROUBLESHOOTING
|
||||
# =============================================================================
|
||||
#
|
||||
# Common Production Issues:
|
||||
# ------------------------
|
||||
#
|
||||
# 1. Authentication Failures:
|
||||
# - Check IAM roles and policies
|
||||
# - Verify SOPS key access
|
||||
# - Validate provider credentials
|
||||
#
|
||||
# 2. Performance Issues:
|
||||
# - Review parallel_operations setting
|
||||
# - Check timeout_seconds values
|
||||
# - Monitor resource utilization
|
||||
#
|
||||
# 3. Security Alerts:
|
||||
# - Review audit logs
|
||||
# - Check compliance status
|
||||
# - Validate encryption settings
|
||||
#
|
||||
# 4. Backup Failures:
|
||||
# - Verify backup storage access
|
||||
# - Check retention policies
|
||||
# - Test recovery procedures
|
||||
#
|
||||
# 5. Monitoring Gaps:
|
||||
# - Validate monitoring endpoints
|
||||
# - Check alert configurations
|
||||
# - Test notification channels
|
@ -1,544 +0,0 @@
|
||||
# Testing Environment Configuration Template
|
||||
# Copy this file to config.test.toml for testing-optimized settings
|
||||
#
|
||||
# This template provides settings optimized for testing scenarios:
|
||||
# - Mock providers and safe defaults
|
||||
# - Enhanced validation and checking
|
||||
# - Test data isolation
|
||||
# - CI/CD friendly configurations
|
||||
# - Comprehensive testing utilities
|
||||
|
||||
# =============================================================================
|
||||
# TESTING CORE CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
[core]
|
||||
version = "1.0.0"
|
||||
name = "provisioning-system-test"
|
||||
|
||||
# =============================================================================
|
||||
# TESTING PATHS
|
||||
# =============================================================================
|
||||
# Isolated paths for testing environment
|
||||
|
||||
[paths]
|
||||
# Testing base path - isolated from production
|
||||
# Common testing locations:
|
||||
# base = "/tmp/provisioning-test" # Temporary testing
|
||||
# base = "/opt/provisioning-test" # System testing
|
||||
# base = "/home/ci/provisioning-test" # CI/CD testing
|
||||
# base = "/workspace/provisioning-test" # Container testing
|
||||
base = "/tmp/provisioning-test"
|
||||
|
||||
# Testing-specific path overrides for isolation
|
||||
kloud = "{{paths.base}}/test-infra"
|
||||
providers = "{{paths.base}}/test-providers"
|
||||
taskservs = "{{paths.base}}/test-taskservs"
|
||||
clusters = "{{paths.base}}/test-clusters"
|
||||
resources = "{{paths.base}}/test-resources"
|
||||
templates = "{{paths.base}}/test-templates"
|
||||
tools = "{{paths.base}}/test-tools"
|
||||
core = "{{paths.base}}/test-core"
|
||||
|
||||
[paths.files]
|
||||
# Testing configuration files
|
||||
settings = "{{paths.base}}/kcl/test-settings.k"
|
||||
keys = "{{paths.base}}/test-keys.yaml"
|
||||
requirements = "{{paths.base}}/test-requirements.yaml"
|
||||
notify_icon = "{{paths.base}}/resources/test-icon.png"
|
||||
|
||||
# =============================================================================
|
||||
# TESTING DEBUG CONFIGURATION
|
||||
# =============================================================================
|
||||
# Balanced debugging for testing visibility
|
||||
|
||||
[debug]
|
||||
# Enable debugging for test visibility
|
||||
enabled = true
|
||||
|
||||
# Disable metadata to reduce test noise
|
||||
metadata = false
|
||||
|
||||
# Enable check mode by default for safe testing
|
||||
check = true
|
||||
|
||||
# Disable remote debugging for test isolation
|
||||
remote = false
|
||||
|
||||
# Use info level for balanced test logging
|
||||
log_level = "info"
|
||||
|
||||
# Allow terminal features for interactive testing
|
||||
no_terminal = false
|
||||
|
||||
# =============================================================================
|
||||
# TESTING OUTPUT CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
[output]
|
||||
# Use cat for simple output in CI/CD environments
|
||||
file_viewer = "cat"
|
||||
|
||||
# JSON format for programmatic test validation
|
||||
format = "json"
|
||||
|
||||
# =============================================================================
|
||||
# TESTING SOPS CONFIGURATION
|
||||
# =============================================================================
|
||||
# Simplified SOPS for testing scenarios
|
||||
|
||||
[sops]
|
||||
# Enable SOPS for testing encryption workflows
|
||||
use_sops = true
|
||||
|
||||
# Testing SOPS configuration
|
||||
config_path = "{{paths.base}}/.sops-test.yaml"
|
||||
|
||||
# Test-specific key search paths
|
||||
key_search_paths = [
|
||||
"{{paths.base}}/keys/test-age.txt",
|
||||
"./test-keys/age.txt",
|
||||
"/tmp/test-keys/age.txt",
|
||||
"~/.config/sops/age/test-keys.txt"
|
||||
]
|
||||
|
||||
# =============================================================================
|
||||
# TESTING RUNTIME CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
[taskservs]
|
||||
# Testing runtime directory with cleanup
|
||||
run_path = "{{paths.base}}/run/test-taskservs"
|
||||
|
||||
[clusters]
|
||||
# Testing cluster runtime with isolation
|
||||
run_path = "{{paths.base}}/run/test-clusters"
|
||||
|
||||
[generation]
|
||||
# Testing generation directory with unique naming
|
||||
dir_path = "{{paths.base}}/generated/test"
|
||||
defs_file = "test-defs.toml"
|
||||
|
||||
# =============================================================================
|
||||
# TESTING PROVIDER CONFIGURATION
|
||||
# =============================================================================
|
||||
# Mock and safe provider configurations for testing
|
||||
|
||||
[providers]
|
||||
# Default to local provider for safe testing
|
||||
default = "local"
|
||||
|
||||
# AWS Testing Configuration (mock/safe)
|
||||
[providers.aws]
|
||||
# Use localstack or testing endpoints
|
||||
api_url = "http://localhost:4566"
|
||||
auth = ""
|
||||
interface = "CLI"
|
||||
|
||||
# UpCloud Testing Configuration (safe)
|
||||
[providers.upcloud]
|
||||
# Standard API but with testing credentials
|
||||
api_url = "https://api.upcloud.com/1.3"
|
||||
auth = ""
|
||||
interface = "CLI"
|
||||
|
||||
# Local Provider for Testing
|
||||
[providers.local]
|
||||
# Local testing configuration
|
||||
api_url = ""
|
||||
auth = ""
|
||||
interface = "CLI"
|
||||
|
||||
# =============================================================================
|
||||
# TESTING ENVIRONMENT CONFIGURATIONS
|
||||
# =============================================================================
|
||||
|
||||
# Testing environment defaults
|
||||
[environments.test]
|
||||
debug.enabled = true
|
||||
debug.log_level = "info"
|
||||
debug.check = true
|
||||
debug.metadata = false
|
||||
debug.remote = false
|
||||
providers.default = "local"
|
||||
output.format = "json"
|
||||
output.file_viewer = "cat"
|
||||
|
||||
# CI/CD testing environment
|
||||
[environments.ci]
|
||||
debug.enabled = false
|
||||
debug.log_level = "warn"
|
||||
debug.check = true
|
||||
providers.default = "local"
|
||||
output.format = "json"
|
||||
output.file_viewer = "cat"
|
||||
|
||||
# Integration testing environment
|
||||
[environments.integration]
|
||||
debug.enabled = true
|
||||
debug.log_level = "debug"
|
||||
debug.check = false
|
||||
providers.default = "aws"
|
||||
output.format = "yaml"
|
||||
|
||||
# =============================================================================
|
||||
# TESTING PERFORMANCE CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Performance settings optimized for testing
|
||||
[performance]
|
||||
# Reduced parallelism for predictable test execution
|
||||
parallel_operations = 1
|
||||
# Shorter timeouts for faster test feedback
|
||||
timeout_seconds = 60
|
||||
# Disable caching for test isolation
|
||||
cache_enabled = false
|
||||
# Testing cache directory (if needed)
|
||||
cache_dir = "{{paths.base}}/cache/test"
|
||||
# Short cache retention for testing
|
||||
cache_retention_hours = 1
|
||||
|
||||
# =============================================================================
|
||||
# TESTING SECURITY CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Security settings for testing environment
|
||||
[security]
|
||||
# Disable confirmation for automated testing
|
||||
require_confirmation = false
|
||||
# Allow sensitive data logging for test debugging
|
||||
log_sensitive_data = true
|
||||
# Enable strict validation for test coverage
|
||||
strict_validation = true
|
||||
# Enable testing backups
|
||||
auto_backup = false
|
||||
backup_dir = "{{paths.base}}/backups/test"
|
||||
# Short backup retention for testing
|
||||
backup_retention_days = 1
|
||||
# Disable backup encryption for testing simplicity
|
||||
backup_encryption = false
|
||||
# Enable audit logging for test verification
|
||||
audit_enabled = true
|
||||
audit_log_path = "{{paths.base}}/logs/test-audit.log"
|
||||
|
||||
# =============================================================================
|
||||
# TESTING MONITORING CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Testing monitoring configuration
|
||||
[monitoring]
|
||||
# Enable monitoring for test validation
|
||||
enabled = true
|
||||
# Local testing metrics endpoint
|
||||
endpoint = "http://localhost:9090/metrics"
|
||||
# Frequent monitoring for testing
|
||||
interval = "10s"
|
||||
# Health check for testing
|
||||
health_check_enabled = true
|
||||
health_check_port = 8081
|
||||
# Local log aggregation for testing
|
||||
log_endpoint = "http://localhost:3001"
|
||||
|
||||
# Testing alerting (disabled for noise reduction)
|
||||
[alerting]
|
||||
# Disable production alerting in testing
|
||||
enabled = false
|
||||
email_enabled = false
|
||||
slack_enabled = false
|
||||
pagerduty_enabled = false
|
||||
|
||||
# =============================================================================
|
||||
# TESTING DATA MANAGEMENT
|
||||
# =============================================================================
|
||||
|
||||
# Testing data configuration
|
||||
[test_data]
|
||||
# Enable test data generation
|
||||
enabled = true
|
||||
# Test data templates
|
||||
template_dir = "{{paths.base}}/test-data/templates"
|
||||
# Test data output
|
||||
output_dir = "{{paths.base}}/test-data/generated"
|
||||
# Test data cleanup
|
||||
auto_cleanup = true
|
||||
cleanup_after_hours = 2
|
||||
|
||||
# Testing fixtures
|
||||
[fixtures]
|
||||
# Enable test fixtures
|
||||
enabled = true
|
||||
# Fixture definitions
|
||||
fixture_dir = "{{paths.base}}/fixtures"
|
||||
# Common test scenarios
|
||||
scenarios = [
|
||||
"basic-server",
|
||||
"multi-server",
|
||||
"cluster-setup",
|
||||
"failure-recovery"
|
||||
]
|
||||
|
||||
# =============================================================================
|
||||
# TESTING VALIDATION CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Enhanced validation for testing
|
||||
[validation]
|
||||
# Enable comprehensive validation
|
||||
enabled = true
|
||||
# Validation rules for testing
|
||||
rules = [
|
||||
"syntax-check",
|
||||
"type-validation",
|
||||
"security-scan",
|
||||
"performance-check",
|
||||
"integration-test"
|
||||
]
|
||||
# Validation reporting
|
||||
report_enabled = true
|
||||
report_format = "json"
|
||||
report_dir = "{{paths.base}}/validation-reports"
|
||||
|
||||
# Testing assertions
|
||||
[assertions]
|
||||
# Enable test assertions
|
||||
enabled = true
|
||||
# Assertion timeout
|
||||
timeout_seconds = 30
|
||||
# Retry configuration
|
||||
max_retries = 3
|
||||
retry_delay_seconds = 5
|
||||
|
||||
# =============================================================================
|
||||
# TESTING CI/CD INTEGRATION
|
||||
# =============================================================================
|
||||
|
||||
# CI/CD specific configuration
|
||||
[cicd]
|
||||
# Enable CI/CD mode
|
||||
enabled = true
|
||||
# CI/CD provider detection
|
||||
auto_detect = true
|
||||
# Supported providers
|
||||
providers = ["github", "gitlab", "jenkins", "azure-devops"]
|
||||
# Pipeline configuration
|
||||
pipeline_timeout = 1800
|
||||
parallel_jobs = 2
|
||||
# Artifact management
|
||||
artifacts_enabled = true
|
||||
artifacts_dir = "{{paths.base}}/artifacts"
|
||||
|
||||
# Testing in containers
|
||||
[containers]
|
||||
# Container runtime for testing
|
||||
runtime = "docker"
|
||||
# Testing registry
|
||||
registry = "localhost:5000"
|
||||
# Testing namespace
|
||||
namespace = "test-provisioning"
|
||||
# Container cleanup
|
||||
auto_cleanup = true
|
||||
cleanup_timeout = 300
|
||||
|
||||
# =============================================================================
|
||||
# TESTING MOCK CONFIGURATIONS
|
||||
# =============================================================================
|
||||
|
||||
# Mock services for testing
|
||||
[mocks]
|
||||
# Enable mock services
|
||||
enabled = true
|
||||
# Mock service definitions
|
||||
services = [
|
||||
"aws-localstack",
|
||||
"mock-upcloud",
|
||||
"test-registry",
|
||||
"mock-storage"
|
||||
]
|
||||
# Mock data directory
|
||||
data_dir = "{{paths.base}}/mock-data"
|
||||
|
||||
# Simulation settings
|
||||
[simulation]
|
||||
# Enable simulation mode
|
||||
enabled = true
|
||||
# Simulation scenarios
|
||||
scenarios_dir = "{{paths.base}}/simulations"
|
||||
# Simulation results
|
||||
results_dir = "{{paths.base}}/simulation-results"
|
||||
# Simulation timeout
|
||||
timeout_minutes = 30
|
||||
|
||||
# =============================================================================
|
||||
# TESTING UTILITIES CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Test utilities
|
||||
[test_utilities]
|
||||
# Enable test utilities
|
||||
enabled = true
|
||||
# Test runner configuration
|
||||
runner = "nushell"
|
||||
# Test discovery
|
||||
auto_discover = true
|
||||
test_pattern = "*test*.nu"
|
||||
# Test execution
|
||||
parallel_execution = false
|
||||
fail_fast = true
|
||||
|
||||
# Code coverage
|
||||
[coverage]
|
||||
# Enable code coverage
|
||||
enabled = true
|
||||
# Coverage output
|
||||
output_dir = "{{paths.base}}/coverage"
|
||||
# Coverage format
|
||||
format = "json"
|
||||
# Coverage thresholds
|
||||
minimum_coverage = 80
|
||||
|
||||
# =============================================================================
|
||||
# TESTING CLEANUP CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Automatic cleanup for testing
|
||||
[cleanup]
|
||||
# Enable automatic cleanup
|
||||
enabled = true
|
||||
# Cleanup triggers
|
||||
cleanup_on_exit = true
|
||||
cleanup_on_failure = true
|
||||
# Cleanup scope
|
||||
clean_generated_files = true
|
||||
clean_runtime_data = true
|
||||
clean_cache = true
|
||||
clean_logs = false # Keep logs for debugging
|
||||
# Cleanup schedule
|
||||
schedule = "0 2 * * *" # Daily cleanup at 2 AM
|
||||
|
||||
# Resource cleanup
|
||||
[resource_cleanup]
|
||||
# Enable resource cleanup
|
||||
enabled = true
|
||||
# Resource types to clean
|
||||
resource_types = [
|
||||
"servers",
|
||||
"storage",
|
||||
"networks",
|
||||
"security-groups"
|
||||
]
|
||||
# Cleanup age threshold
|
||||
max_age_hours = 24
|
||||
# Protection tags
|
||||
protected_tags = ["permanent", "do-not-delete"]
|
||||
|
||||
# =============================================================================
|
||||
# TESTING ENVIRONMENT EXAMPLES
|
||||
# =============================================================================
|
||||
#
|
||||
# Common Testing Scenarios:
|
||||
# ------------------------
|
||||
#
|
||||
# 1. Unit Testing:
|
||||
# export PROVISIONING_ENV=test
|
||||
# ./core/nulib/provisioning validate config
|
||||
# ./core/nulib/provisioning test unit
|
||||
#
|
||||
# 2. Integration Testing:
|
||||
# export PROVISIONING_ENV=integration
|
||||
# ./core/nulib/provisioning server create --check
|
||||
# ./core/nulib/provisioning test integration
|
||||
#
|
||||
# 3. End-to-End Testing:
|
||||
# ./core/nulib/provisioning test e2e --scenario basic-server
|
||||
#
|
||||
# 4. Performance Testing:
|
||||
# ./core/nulib/provisioning test performance --load 100
|
||||
#
|
||||
# 5. Security Testing:
|
||||
# ./core/nulib/provisioning test security --scan all
|
||||
#
|
||||
# CI/CD Pipeline Example:
|
||||
# ----------------------
|
||||
#
|
||||
# test-stage:
|
||||
# script:
|
||||
# - export PROVISIONING_ENV=ci
|
||||
# - ./core/nulib/provisioning validate config --strict
|
||||
# - ./core/nulib/provisioning test unit
|
||||
# - ./core/nulib/provisioning test integration --check
|
||||
# - ./core/nulib/provisioning test security
|
||||
# artifacts:
|
||||
# reports:
|
||||
# junit: test-results.xml
|
||||
# paths:
|
||||
# - coverage/
|
||||
# - validation-reports/
|
||||
#
|
||||
# Testing with Docker:
|
||||
# -------------------
|
||||
#
|
||||
# docker run --rm \
|
||||
# -v $(pwd):/workspace \
|
||||
# -e PROVISIONING_ENV=test \
|
||||
# provisioning:test \
|
||||
# ./core/nulib/provisioning test all
|
||||
#
|
||||
# =============================================================================
|
||||
# TESTING TROUBLESHOOTING
|
||||
# =============================================================================
|
||||
#
|
||||
# Common Testing Issues:
|
||||
# ---------------------
|
||||
#
|
||||
# 1. Test Data Isolation:
|
||||
# - Verify paths.base points to test directory
|
||||
# - Check test data cleanup settings
|
||||
# - Ensure proper test fixtures
|
||||
#
|
||||
# 2. Mock Service Issues:
|
||||
# - Verify mock services are running
|
||||
# - Check mock service configurations
|
||||
# - Validate mock data setup
|
||||
#
|
||||
# 3. CI/CD Integration:
|
||||
# - Check environment variable setup
|
||||
# - Verify artifact collection
|
||||
# - Validate pipeline timeout settings
|
||||
#
|
||||
# 4. Performance Test Issues:
|
||||
# - Check timeout configurations
|
||||
# - Verify resource limits
|
||||
# - Monitor test environment capacity
|
||||
#
|
||||
# 5. Security Test Failures:
|
||||
# - Review security validation rules
|
||||
# - Check compliance requirements
|
||||
# - Verify encryption settings
|
||||
#
|
||||
# Testing Best Practices:
|
||||
# ----------------------
|
||||
#
|
||||
# 1. Test Isolation:
|
||||
# - Use separate test directories
|
||||
# - Clean up after each test
|
||||
# - Avoid shared state between tests
|
||||
#
|
||||
# 2. Test Data Management:
|
||||
# - Use fixtures for consistent data
|
||||
# - Generate test data dynamically
|
||||
# - Clean up test data regularly
|
||||
#
|
||||
# 3. Mock Usage:
|
||||
# - Mock external dependencies
|
||||
# - Use realistic mock data
|
||||
# - Test both success and failure scenarios
|
||||
#
|
||||
# 4. CI/CD Integration:
|
||||
# - Run tests in parallel when possible
|
||||
# - Collect comprehensive artifacts
|
||||
# - Set appropriate timeouts
|
||||
#
|
||||
# 5. Security Testing:
|
||||
# - Include security scans in pipeline
|
||||
# - Test encryption/decryption workflows
|
||||
# - Validate access controls
|
@ -1,317 +0,0 @@
|
||||
# User Configuration Template for Provisioning System
|
||||
# Copy this file to ~/.config/provisioning/config.toml to customize your settings
|
||||
#
|
||||
# This file provides user-specific overrides for the provisioning system.
|
||||
# Values defined here take precedence over system defaults but are overridden
|
||||
# by project-specific and infrastructure-specific configurations.
|
||||
#
|
||||
# Configuration Loading Order (lowest to highest precedence):
|
||||
# 1. config.defaults.toml (system defaults)
|
||||
# 2. ~/.config/provisioning/config.toml (this file, user settings)
|
||||
# 3. ./provisioning.toml (project-specific settings)
|
||||
# 4. ./.provisioning.toml (infrastructure-specific settings)
|
||||
|
||||
# =============================================================================
|
||||
# CORE SYSTEM CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
[core]
|
||||
# System version and name - usually no need to override
|
||||
# version = "1.0.0"
|
||||
# name = "provisioning-system"
|
||||
|
||||
# =============================================================================
|
||||
# PATH CONFIGURATION
|
||||
# =============================================================================
|
||||
# Configure base paths for your environment
|
||||
# All other paths are automatically derived from paths.base
|
||||
|
||||
[paths]
|
||||
# REQUIRED: Base directory where provisioning system is installed
|
||||
# This is the most important setting - all other paths derive from this
|
||||
# Examples:
|
||||
# base = "/opt/provisioning" # System-wide installation
|
||||
# base = "/Users/yourname/dev/provisioning" # User development setup
|
||||
# base = "/home/devops/provisioning" # Linux user setup
|
||||
base = "/path/to/your/provisioning"
|
||||
|
||||
# Optional: Override specific path components if needed
|
||||
# Generally you should only set these if you have a custom directory layout
|
||||
# kloud = "{{paths.base}}/my-custom-infra"
|
||||
# providers = "{{paths.base}}/my-providers"
|
||||
# taskservs = "{{paths.base}}/my-taskservs"
|
||||
# clusters = "{{paths.base}}/my-clusters"
|
||||
# resources = "{{paths.base}}/my-resources"
|
||||
# templates = "{{paths.base}}/my-templates"
|
||||
# tools = "{{paths.base}}/my-tools"
|
||||
# core = "{{paths.base}}/my-core"
|
||||
|
||||
# File paths - override only if you've moved these files
|
||||
# [paths.files]
|
||||
# settings = "{{paths.base}}/kcl/my-settings.k"
|
||||
# keys = "{{paths.base}}/my-keys.yaml"
|
||||
# requirements = "{{paths.base}}/my-requirements.yaml"
|
||||
# notify_icon = "{{paths.base}}/resources/my-icon.png"
|
||||
|
||||
# =============================================================================
|
||||
# DEBUG AND LOGGING CONFIGURATION
|
||||
# =============================================================================
|
||||
# Control debugging output and logging behavior
|
||||
|
||||
[debug]
|
||||
# Enable debug mode globally for your user
|
||||
# This shows additional diagnostic information and verbose output
|
||||
enabled = false
|
||||
|
||||
# Show metadata in debug output
|
||||
# Includes internal system information and detailed operation traces
|
||||
metadata = false
|
||||
|
||||
# Enable check mode by default
|
||||
# When true, operations will simulate actions without making changes
|
||||
check = false
|
||||
|
||||
# Enable remote debugging
|
||||
# Shows detailed information about remote server operations
|
||||
remote = false
|
||||
|
||||
# Set default log level for all operations
|
||||
# Valid options: "trace", "debug", "info", "warn", "error"
|
||||
# - trace: Most verbose, shows all internal operations
|
||||
# - debug: Detailed information for troubleshooting
|
||||
# - info: General information about operations (default)
|
||||
# - warn: Warning messages and non-critical issues
|
||||
# - error: Only errors and critical problems
|
||||
log_level = "info"
|
||||
|
||||
# Disable terminal features if needed
|
||||
# Set to true if running in environments without proper terminal support
|
||||
no_terminal = false
|
||||
|
||||
# =============================================================================
|
||||
# OUTPUT CONFIGURATION
|
||||
# =============================================================================
|
||||
# Configure how information is displayed and formatted
|
||||
|
||||
[output]
|
||||
# Default file viewer for configuration files and logs
|
||||
# Common options: "less", "more", "cat", "bat", "code", "vim", "nano"
|
||||
file_viewer = "less"
|
||||
|
||||
# Default output format for data display
|
||||
# Valid options: "json", "yaml", "toml", "text"
|
||||
# - json: Structured JSON output, good for automation
|
||||
# - yaml: Human-readable YAML format
|
||||
# - toml: Configuration-friendly TOML format
|
||||
# - text: Plain text, good for terminals
|
||||
format = "yaml"
|
||||
|
||||
# =============================================================================
|
||||
# SOPS ENCRYPTION CONFIGURATION
|
||||
# =============================================================================
|
||||
# Configure SOPS (Secrets OPerationS) for encryption/decryption of sensitive data
|
||||
|
||||
[sops]
|
||||
# Enable or disable SOPS encryption globally
|
||||
# Set to false if you don't use encrypted configuration files
|
||||
use_sops = true
|
||||
|
||||
# Path to SOPS configuration file
|
||||
# This file defines encryption rules and key providers
|
||||
# config_path = "{{paths.base}}/.sops.yaml"
|
||||
|
||||
# Search paths for Age encryption keys
|
||||
# SOPS will search these locations for your private key files
|
||||
# Add your preferred key locations here
|
||||
key_search_paths = [
|
||||
"{{paths.base}}/keys/age.txt",
|
||||
"~/.config/sops/age/keys.txt",
|
||||
"~/.age/keys.txt",
|
||||
"/etc/sops/age/keys.txt"
|
||||
]
|
||||
|
||||
# =============================================================================
|
||||
# RUNTIME DIRECTORIES
|
||||
# =============================================================================
|
||||
# Configure directories for runtime data and temporary files
|
||||
|
||||
[taskservs]
|
||||
# Directory for task service runtime data
|
||||
# This is where service state, logs, and temporary files are stored
|
||||
# run_path = "{{paths.base}}/run/taskservs"
|
||||
|
||||
[clusters]
|
||||
# Directory for cluster runtime data
|
||||
# Stores cluster state information and generated configurations
|
||||
# run_path = "{{paths.base}}/run/clusters"
|
||||
|
||||
[generation]
|
||||
# Directory for generated configuration files
|
||||
# Generated configurations are stored here before deployment
|
||||
# dir_path = "{{paths.base}}/generated"
|
||||
# defs_file = "defs.toml"
|
||||
|
||||
# =============================================================================
|
||||
# PROVIDER CONFIGURATION
|
||||
# =============================================================================
|
||||
# Configure cloud providers and authentication
|
||||
|
||||
[providers]
|
||||
# Default provider to use when none is specified
|
||||
# Valid options: "aws", "upcloud", "local"
|
||||
# - aws: Amazon Web Services
|
||||
# - upcloud: UpCloud VPS provider
|
||||
# - local: Local development/testing
|
||||
default = "local"
|
||||
|
||||
# AWS Provider Configuration
|
||||
[providers.aws]
|
||||
# API endpoint - leave empty for default AWS endpoints
|
||||
api_url = ""
|
||||
# Authentication method - leave empty to use AWS CLI/SDK defaults
|
||||
auth = ""
|
||||
# Interface type: "API" for direct API calls, "CLI" for AWS CLI
|
||||
interface = "CLI"
|
||||
|
||||
# UpCloud Provider Configuration
|
||||
[providers.upcloud]
|
||||
# API endpoint for UpCloud
|
||||
api_url = "https://api.upcloud.com/1.3"
|
||||
# Authentication - set your API credentials in environment variables
|
||||
auth = ""
|
||||
# Interface type: "API" for direct API calls, "CLI" for UpCloud CLI
|
||||
interface = "CLI"
|
||||
|
||||
# Local Provider Configuration (for development and testing)
|
||||
[providers.local]
|
||||
# No API URL needed for local provider
|
||||
api_url = ""
|
||||
# No authentication needed for local provider
|
||||
auth = ""
|
||||
# Always uses CLI interface for local operations
|
||||
interface = "CLI"
|
||||
|
||||
# =============================================================================
|
||||
# USER-SPECIFIC ENVIRONMENT OVERRIDES
|
||||
# =============================================================================
|
||||
# Override environment-specific settings for your workflow
|
||||
|
||||
# Development Environment Overrides
|
||||
# Uncomment and modify these if you work primarily in development mode
|
||||
# [environments.dev]
|
||||
# debug.enabled = true
|
||||
# debug.log_level = "debug"
|
||||
# debug.metadata = true
|
||||
# providers.default = "local"
|
||||
# output.format = "json"
|
||||
|
||||
# Production Environment Overrides
|
||||
# Uncomment and modify these for production deployments
|
||||
# [environments.prod]
|
||||
# debug.enabled = false
|
||||
# debug.log_level = "warn"
|
||||
# debug.check = false
|
||||
# output.format = "yaml"
|
||||
|
||||
# Testing Environment Overrides
|
||||
# Uncomment and modify these for testing scenarios
|
||||
# [environments.test]
|
||||
# debug.enabled = true
|
||||
# debug.check = true
|
||||
# debug.log_level = "info"
|
||||
# providers.default = "local"
|
||||
|
||||
# =============================================================================
|
||||
# ADVANCED USER CUSTOMIZATIONS
|
||||
# =============================================================================
|
||||
# Advanced settings for power users
|
||||
|
||||
# Custom Notification Settings (optional)
|
||||
# [notifications]
|
||||
# enabled = true
|
||||
# icon_path = "{{paths.base}}/resources/my-custom-icon.png"
|
||||
# sound_enabled = false
|
||||
|
||||
# Performance Tuning (optional)
|
||||
# [performance]
|
||||
# parallel_operations = 4
|
||||
# timeout_seconds = 300
|
||||
# cache_enabled = true
|
||||
|
||||
# Security Settings (optional)
|
||||
# [security]
|
||||
# require_confirmation = true
|
||||
# log_sensitive_data = false
|
||||
# strict_validation = true
|
||||
|
||||
# =============================================================================
|
||||
# USAGE EXAMPLES AND COMMON CONFIGURATIONS
|
||||
# =============================================================================
|
||||
#
|
||||
# Example 1: Developer Setup
|
||||
# -------------------------
|
||||
# [paths]
|
||||
# base = "/Users/alice/dev/provisioning"
|
||||
#
|
||||
# [debug]
|
||||
# enabled = true
|
||||
# log_level = "debug"
|
||||
#
|
||||
# [providers]
|
||||
# default = "local"
|
||||
#
|
||||
# [output]
|
||||
# format = "json"
|
||||
# file_viewer = "code"
|
||||
#
|
||||
# Example 2: Production Operations
|
||||
# -------------------------------
|
||||
# [paths]
|
||||
# base = "/opt/provisioning"
|
||||
#
|
||||
# [debug]
|
||||
# enabled = false
|
||||
# log_level = "warn"
|
||||
#
|
||||
# [providers]
|
||||
# default = "aws"
|
||||
#
|
||||
# [output]
|
||||
# format = "yaml"
|
||||
#
|
||||
# Example 3: Team Lead Setup
|
||||
# -------------------------
|
||||
# [paths]
|
||||
# base = "/home/teamlead/provisioning"
|
||||
#
|
||||
# [debug]
|
||||
# enabled = true
|
||||
# log_level = "info"
|
||||
# metadata = true
|
||||
#
|
||||
# [providers]
|
||||
# default = "upcloud"
|
||||
#
|
||||
# [sops]
|
||||
# key_search_paths = [
|
||||
# "/secure/keys/team-lead.txt",
|
||||
# "~/.config/sops/age/keys.txt"
|
||||
# ]
|
||||
#
|
||||
# =============================================================================
|
||||
# QUICK START CHECKLIST
|
||||
# =============================================================================
|
||||
#
|
||||
# To get started with this configuration:
|
||||
#
|
||||
# 1. Copy this file to ~/.config/provisioning/config.toml
|
||||
# 2. Update paths.base to point to your provisioning installation
|
||||
# 3. Choose your default provider (local, aws, upcloud)
|
||||
# 4. Set debug.enabled = true if you want verbose output
|
||||
# 5. Configure SOPS key paths if using encrypted configurations
|
||||
# 6. Test with: ./core/nulib/provisioning validate config
|
||||
#
|
||||
# For more information:
|
||||
# - Run: ./core/nulib/provisioning help
|
||||
# - See: CLAUDE.md for project documentation
|
||||
# - Visit: Project wiki for detailed guides
|
Loading…
Reference in New Issue
Block a user