runbooks 0.7.9__py3-none-any.whl → 0.9.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- runbooks/__init__.py +1 -1
- runbooks/cfat/README.md +12 -1
- runbooks/cfat/__init__.py +1 -1
- runbooks/cfat/assessment/compliance.py +4 -1
- runbooks/cfat/assessment/runner.py +42 -34
- runbooks/cfat/models.py +1 -1
- runbooks/cloudops/__init__.py +123 -0
- runbooks/cloudops/base.py +385 -0
- runbooks/cloudops/cost_optimizer.py +811 -0
- runbooks/cloudops/infrastructure_optimizer.py +29 -0
- runbooks/cloudops/interfaces.py +828 -0
- runbooks/cloudops/lifecycle_manager.py +29 -0
- runbooks/cloudops/mcp_cost_validation.py +678 -0
- runbooks/cloudops/models.py +251 -0
- runbooks/cloudops/monitoring_automation.py +29 -0
- runbooks/cloudops/notebook_framework.py +676 -0
- runbooks/cloudops/security_enforcer.py +449 -0
- runbooks/common/__init__.py +152 -0
- runbooks/common/accuracy_validator.py +1039 -0
- runbooks/common/context_logger.py +440 -0
- runbooks/common/cross_module_integration.py +594 -0
- runbooks/common/enhanced_exception_handler.py +1108 -0
- runbooks/common/enterprise_audit_integration.py +634 -0
- runbooks/common/mcp_cost_explorer_integration.py +900 -0
- runbooks/common/mcp_integration.py +548 -0
- runbooks/common/performance_monitor.py +387 -0
- runbooks/common/profile_utils.py +216 -0
- runbooks/common/rich_utils.py +172 -1
- runbooks/feedback/user_feedback_collector.py +440 -0
- runbooks/finops/README.md +377 -458
- runbooks/finops/__init__.py +4 -21
- runbooks/finops/account_resolver.py +279 -0
- runbooks/finops/accuracy_cross_validator.py +638 -0
- runbooks/finops/aws_client.py +721 -36
- runbooks/finops/budget_integration.py +313 -0
- runbooks/finops/cli.py +59 -5
- runbooks/finops/cost_optimizer.py +1340 -0
- runbooks/finops/cost_processor.py +211 -37
- runbooks/finops/dashboard_router.py +900 -0
- runbooks/finops/dashboard_runner.py +990 -232
- runbooks/finops/embedded_mcp_validator.py +288 -0
- runbooks/finops/enhanced_dashboard_runner.py +8 -7
- runbooks/finops/enhanced_progress.py +327 -0
- runbooks/finops/enhanced_trend_visualization.py +423 -0
- runbooks/finops/finops_dashboard.py +184 -1829
- runbooks/finops/helpers.py +509 -196
- runbooks/finops/iam_guidance.py +400 -0
- runbooks/finops/markdown_exporter.py +466 -0
- runbooks/finops/multi_dashboard.py +1502 -0
- runbooks/finops/optimizer.py +15 -15
- runbooks/finops/profile_processor.py +2 -2
- runbooks/finops/runbooks.inventory.organizations_discovery.log +0 -0
- runbooks/finops/runbooks.security.report_generator.log +0 -0
- runbooks/finops/runbooks.security.run_script.log +0 -0
- runbooks/finops/runbooks.security.security_export.log +0 -0
- runbooks/finops/schemas.py +589 -0
- runbooks/finops/service_mapping.py +195 -0
- runbooks/finops/single_dashboard.py +710 -0
- runbooks/finops/tests/test_reference_images_validation.py +1 -1
- runbooks/inventory/README.md +12 -1
- runbooks/inventory/core/collector.py +157 -29
- runbooks/inventory/list_ec2_instances.py +9 -6
- runbooks/inventory/list_ssm_parameters.py +10 -10
- runbooks/inventory/organizations_discovery.py +210 -164
- runbooks/inventory/rich_inventory_display.py +74 -107
- runbooks/inventory/run_on_multi_accounts.py +13 -13
- runbooks/inventory/runbooks.inventory.organizations_discovery.log +0 -0
- runbooks/inventory/runbooks.security.security_export.log +0 -0
- runbooks/main.py +1371 -240
- runbooks/metrics/dora_metrics_engine.py +711 -17
- runbooks/monitoring/performance_monitor.py +433 -0
- runbooks/operate/README.md +394 -0
- runbooks/operate/base.py +215 -47
- runbooks/operate/ec2_operations.py +435 -5
- runbooks/operate/iam_operations.py +598 -3
- runbooks/operate/privatelink_operations.py +1 -1
- runbooks/operate/rds_operations.py +508 -0
- runbooks/operate/s3_operations.py +508 -0
- runbooks/operate/vpc_endpoints.py +1 -1
- runbooks/remediation/README.md +489 -13
- runbooks/remediation/base.py +5 -3
- runbooks/remediation/commons.py +8 -4
- runbooks/security/ENTERPRISE_SECURITY_FRAMEWORK.md +506 -0
- runbooks/security/README.md +12 -1
- runbooks/security/__init__.py +265 -33
- runbooks/security/cloudops_automation_security_validator.py +1164 -0
- runbooks/security/compliance_automation.py +12 -10
- runbooks/security/compliance_automation_engine.py +1021 -0
- runbooks/security/enterprise_security_framework.py +930 -0
- runbooks/security/enterprise_security_policies.json +293 -0
- runbooks/security/executive_security_dashboard.py +1247 -0
- runbooks/security/integration_test_enterprise_security.py +879 -0
- runbooks/security/module_security_integrator.py +641 -0
- runbooks/security/multi_account_security_controls.py +2254 -0
- runbooks/security/real_time_security_monitor.py +1196 -0
- runbooks/security/report_generator.py +1 -1
- runbooks/security/run_script.py +4 -8
- runbooks/security/security_baseline_tester.py +39 -52
- runbooks/security/security_export.py +99 -120
- runbooks/sre/README.md +472 -0
- runbooks/sre/__init__.py +33 -0
- runbooks/sre/mcp_reliability_engine.py +1049 -0
- runbooks/sre/performance_optimization_engine.py +1032 -0
- runbooks/sre/production_monitoring_framework.py +584 -0
- runbooks/sre/reliability_monitoring_framework.py +1011 -0
- runbooks/validation/__init__.py +2 -2
- runbooks/validation/benchmark.py +154 -149
- runbooks/validation/cli.py +159 -147
- runbooks/validation/mcp_validator.py +291 -248
- runbooks/vpc/README.md +478 -0
- runbooks/vpc/__init__.py +2 -2
- runbooks/vpc/manager_interface.py +366 -351
- runbooks/vpc/networking_wrapper.py +68 -36
- runbooks/vpc/rich_formatters.py +22 -8
- runbooks-0.9.1.dist-info/METADATA +308 -0
- {runbooks-0.7.9.dist-info → runbooks-0.9.1.dist-info}/RECORD +120 -59
- {runbooks-0.7.9.dist-info → runbooks-0.9.1.dist-info}/entry_points.txt +1 -1
- runbooks/finops/cross_validation.py +0 -375
- runbooks-0.7.9.dist-info/METADATA +0 -636
- {runbooks-0.7.9.dist-info → runbooks-0.9.1.dist-info}/WHEEL +0 -0
- {runbooks-0.7.9.dist-info → runbooks-0.9.1.dist-info}/licenses/LICENSE +0 -0
- {runbooks-0.7.9.dist-info → runbooks-0.9.1.dist-info}/top_level.txt +0 -0
runbooks/__init__.py
CHANGED
@@ -67,7 +67,7 @@ try:
|
|
67
67
|
__version__ = _pkg_version("runbooks")
|
68
68
|
except Exception:
|
69
69
|
# Fallback if metadata is unavailable during editable installs
|
70
|
-
__version__ = "0.
|
70
|
+
__version__ = "1.0.0"
|
71
71
|
|
72
72
|
# Core module exports
|
73
73
|
from runbooks.config import RunbooksConfig, load_config, save_config
|
runbooks/cfat/README.md
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
-
# Cloud Foundations Assessment Tool (
|
1
|
+
# AWS Cloud Foundations Assessment Tool (CLI)
|
2
|
+
|
3
|
+
The AWS Cloud Foundations Assessment Tool (CFAT) is an enterprise-grade command-line tool for automated discovery and assessment of AWS environments and multi-account architectures. Built with the Rich library for beautiful terminal output, it provides comprehensive evaluation against Cloud Foundations best practices with advanced enterprise features.
|
4
|
+
|
5
|
+
## 📈 *cfat-runbooks*.md Enterprise Rollout
|
6
|
+
|
7
|
+
Following proven **99/100 manager score** success patterns established in FinOps:
|
8
|
+
|
9
|
+
### **Rollout Strategy**: Progressive *-runbooks*.md standardization
|
10
|
+
- **Phase 1**: CFAT rollout with *cfat-runbooks*.md framework ✅
|
11
|
+
- **Integration**: Multi-format reporting with project management export
|
12
|
+
- **Enterprise Features**: SOC2, PCI-DSS, HIPAA alignment support
|
2
13
|
|
3
14
|
**CFAT** is an enterprise-grade, open-source solution designed to provide automated discovery and assessment of AWS environments and multi-account architectures. **Fully integrated with the CloudOps Runbooks CLI**, CFAT offers comprehensive evaluation against Cloud Foundations best practices with advanced enterprise features.
|
4
15
|
|
runbooks/cfat/__init__.py
CHANGED
@@ -33,7 +33,7 @@ Example:
|
|
33
33
|
# Rich console output for better formatting
|
34
34
|
from rich.console import Console
|
35
35
|
console = Console()
|
36
|
-
|
36
|
+
|
37
37
|
console.print(f"[green]Compliance Score: {report.summary.compliance_score}/100[/green]")
|
38
38
|
console.print(f"[red]Critical Issues: {report.summary.critical_issues}[/red]")
|
39
39
|
```
|
@@ -12,6 +12,8 @@ from typing import Any, Dict, List, Optional
|
|
12
12
|
import boto3
|
13
13
|
from rich.console import Console
|
14
14
|
|
15
|
+
from runbooks.common.profile_utils import create_management_session
|
16
|
+
|
15
17
|
# Initialize Rich console for enhanced CLI output
|
16
18
|
console = Console()
|
17
19
|
|
@@ -44,7 +46,8 @@ class ComplianceAssessor:
|
|
44
46
|
"""Initialize enhanced compliance assessor with automation capabilities."""
|
45
47
|
self.profile = profile
|
46
48
|
self.automation_mode = automation_mode
|
47
|
-
|
49
|
+
# Use management profile for CFAT assessments requiring cross-account access
|
50
|
+
self.session = create_management_session(profile=profile)
|
48
51
|
self.checks = []
|
49
52
|
self.frameworks = ["well_architected", "soc2", "pci_dss", "hipaa", "cis_aws"]
|
50
53
|
self.remediation_scripts = {}
|
@@ -23,10 +23,10 @@ from typing import Dict, List, Optional, Set
|
|
23
23
|
|
24
24
|
from loguru import logger
|
25
25
|
from rich.console import Console
|
26
|
+
from rich.live import Live
|
26
27
|
from rich.panel import Panel
|
27
|
-
from rich.progress import Progress, SpinnerColumn, TextColumn, TimeElapsedColumn
|
28
|
+
from rich.progress import BarColumn, Progress, SpinnerColumn, TextColumn, TimeElapsedColumn
|
28
29
|
from rich.table import Table
|
29
|
-
from rich.live import Live
|
30
30
|
|
31
31
|
from runbooks import __version__
|
32
32
|
from runbooks.base import CloudFoundationsBase, ProgressTracker
|
@@ -43,9 +43,9 @@ from runbooks.config import RunbooksConfig
|
|
43
43
|
# Enterprise 4-Profile Architecture - Proven FinOps Patterns
|
44
44
|
ENTERPRISE_PROFILES = {
|
45
45
|
"BILLING_PROFILE": "ams-admin-Billing-ReadOnlyAccess-909135376185",
|
46
|
-
"MANAGEMENT_PROFILE": "ams-admin-ReadOnlyAccess-909135376185",
|
46
|
+
"MANAGEMENT_PROFILE": "ams-admin-ReadOnlyAccess-909135376185",
|
47
47
|
"CENTRALISED_OPS_PROFILE": "ams-centralised-ops-ReadOnlyAccess-335083429030",
|
48
|
-
"SINGLE_ACCOUNT_PROFILE": "ams-shared-services-non-prod-ReadOnlyAccess-499201730520"
|
48
|
+
"SINGLE_ACCOUNT_PROFILE": "ams-shared-services-non-prod-ReadOnlyAccess-499201730520",
|
49
49
|
}
|
50
50
|
|
51
51
|
# Rich console instance for consistent formatting
|
@@ -120,20 +120,22 @@ class CloudFoundationsAssessment(CloudFoundationsBase):
|
|
120
120
|
super().__init__(actual_profile, region, config)
|
121
121
|
else:
|
122
122
|
super().__init__(profile, region, config)
|
123
|
-
|
123
|
+
|
124
124
|
self.assessment_config = AssessmentConfig()
|
125
125
|
self._available_checks = self._discover_checks()
|
126
126
|
self._performance_target = 30.0 # <30s target for cfat assessments
|
127
127
|
self._assessment_start_time = None
|
128
|
-
|
129
|
-
console.print(
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
128
|
+
|
129
|
+
console.print(
|
130
|
+
Panel(
|
131
|
+
f"[green]✅ Cloud Foundations Assessment initialized[/green]\n"
|
132
|
+
f"[white]Profile: {self.profile or 'default'}[/white]\n"
|
133
|
+
f"[white]Region: {self.region}[/white]\n"
|
134
|
+
f"[white]Available checks: {len(self._available_checks)}[/white]",
|
135
|
+
title="🔍 CFAT Assessment Engine",
|
136
|
+
border_style="blue",
|
137
|
+
)
|
138
|
+
)
|
137
139
|
|
138
140
|
def _discover_checks(self) -> Dict[str, type]:
|
139
141
|
"""Discover available assessment checks."""
|
@@ -189,11 +191,13 @@ class CloudFoundationsAssessment(CloudFoundationsBase):
|
|
189
191
|
"""
|
190
192
|
# Performance benchmark start
|
191
193
|
self._assessment_start_time = time.time()
|
192
|
-
console.print(
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
194
|
+
console.print(
|
195
|
+
Panel(
|
196
|
+
"[cyan]🚀 Starting Cloud Foundations assessment...[/cyan]",
|
197
|
+
title="🔍 CFAT Assessment",
|
198
|
+
border_style="cyan",
|
199
|
+
)
|
200
|
+
)
|
197
201
|
|
198
202
|
try:
|
199
203
|
# Get account information
|
@@ -212,7 +216,7 @@ class CloudFoundationsAssessment(CloudFoundationsBase):
|
|
212
216
|
elapsed_time = time.time() - self._assessment_start_time
|
213
217
|
self._display_performance_results(elapsed_time, len(checks_to_run))
|
214
218
|
|
215
|
-
# Generate summary
|
219
|
+
# Generate summary
|
216
220
|
summary = self._generate_summary(results, elapsed_time)
|
217
221
|
|
218
222
|
# Create report
|
@@ -429,68 +433,72 @@ class CloudFoundationsAssessment(CloudFoundationsBase):
|
|
429
433
|
def _execute_checks_enhanced(self, checks: List[str]) -> List[AssessmentResult]:
|
430
434
|
"""Execute checks with Rich CLI progress display."""
|
431
435
|
results = []
|
432
|
-
|
436
|
+
|
433
437
|
with Progress(
|
434
438
|
SpinnerColumn(),
|
435
439
|
TextColumn("[progress.description]{task.description}"),
|
436
440
|
BarColumn(),
|
437
441
|
TextColumn("[progress.percentage]{task.percentage:>3.0f}%"),
|
438
442
|
TimeElapsedColumn(),
|
439
|
-
console=console
|
443
|
+
console=console,
|
440
444
|
) as progress:
|
441
445
|
task = progress.add_task(f"[cyan]Executing assessments...", total=len(checks))
|
442
446
|
|
443
447
|
for check_name in checks:
|
444
448
|
progress.update(task, description=f"[cyan]Running check: {check_name}")
|
445
|
-
|
449
|
+
|
446
450
|
try:
|
447
451
|
result = self._execute_single_check(check_name)
|
448
452
|
results.append(result)
|
449
|
-
|
453
|
+
|
450
454
|
# Status indicator
|
451
455
|
if result.status == CheckStatus.PASS:
|
452
456
|
status_emoji = "✅"
|
453
457
|
status_color = "green"
|
454
458
|
elif result.status == CheckStatus.FAIL:
|
455
459
|
status_emoji = "❌"
|
456
|
-
status_color = "red"
|
460
|
+
status_color = "red"
|
457
461
|
elif result.status == CheckStatus.SKIP:
|
458
462
|
status_emoji = "⏭️"
|
459
463
|
status_color = "yellow"
|
460
464
|
else:
|
461
465
|
status_emoji = "⚠️"
|
462
466
|
status_color = "orange"
|
463
|
-
|
467
|
+
|
464
468
|
progress.update(task, description=f"[{status_color}]{status_emoji} {check_name}[/{status_color}]")
|
465
|
-
|
469
|
+
|
466
470
|
except Exception as e:
|
467
471
|
result = self._create_error_result(check_name, str(e))
|
468
472
|
results.append(result)
|
469
473
|
progress.update(task, description=f"[red]⚠️ Error in {check_name}[/red]")
|
470
|
-
|
474
|
+
|
471
475
|
progress.advance(task)
|
472
|
-
|
476
|
+
|
473
477
|
return results
|
474
478
|
|
475
479
|
def _display_performance_results(self, elapsed_time: float, check_count: int) -> None:
|
476
480
|
"""Display assessment performance results with Rich CLI."""
|
477
481
|
# Performance validation against target
|
478
482
|
if elapsed_time <= self._performance_target:
|
479
|
-
console.print(
|
483
|
+
console.print(
|
484
|
+
f"[green]⚡ Assessment completed in {elapsed_time:.2f}s (target: {self._performance_target}s) ✅[/green]"
|
485
|
+
)
|
480
486
|
else:
|
481
|
-
console.print(
|
482
|
-
|
487
|
+
console.print(
|
488
|
+
f"[yellow]⚠️ Assessment completed in {elapsed_time:.2f}s (exceeded target: {self._performance_target}s)[/yellow]"
|
489
|
+
)
|
490
|
+
|
483
491
|
# Performance metrics table
|
484
492
|
metrics_table = Table(title="📊 Performance Metrics")
|
485
493
|
metrics_table.add_column("Metric", style="cyan")
|
486
494
|
metrics_table.add_column("Value", style="magenta")
|
487
495
|
metrics_table.add_column("Target", style="green")
|
488
|
-
|
496
|
+
|
489
497
|
avg_check_time = elapsed_time / check_count if check_count > 0 else 0
|
490
498
|
metrics_table.add_row("Total Time", f"{elapsed_time:.2f}s", f"<{self._performance_target}s")
|
491
499
|
metrics_table.add_row("Check Count", str(check_count), "N/A")
|
492
500
|
metrics_table.add_row("Avg per Check", f"{avg_check_time:.2f}s", "<1s")
|
493
|
-
|
501
|
+
|
494
502
|
console.print(metrics_table)
|
495
503
|
|
496
504
|
def run(self):
|
runbooks/cfat/models.py
CHANGED
@@ -243,7 +243,7 @@ class AssessmentSummary(BaseModel):
|
|
243
243
|
# Rich console output for better formatting
|
244
244
|
from rich.console import Console
|
245
245
|
console = Console()
|
246
|
-
|
246
|
+
|
247
247
|
console.print(f"[green]Pass rate: {summary.pass_rate:.1f}%[/green]")
|
248
248
|
console.print(f"[blue]Compliance score: {summary.compliance_score}[/blue]")
|
249
249
|
```
|
@@ -0,0 +1,123 @@
|
|
1
|
+
"""
|
2
|
+
CloudOps Automation API Wrapper
|
3
|
+
Enterprise-grade business scenario automation
|
4
|
+
|
5
|
+
Transforms CloudOps-Automation notebooks into unified business-focused APIs
|
6
|
+
with Rich CLI integration and type-safe business models.
|
7
|
+
|
8
|
+
Strategic Context:
|
9
|
+
- Source: 61 CloudOps-Automation notebooks in /README/CloudOps-Automation/AWS/
|
10
|
+
- Target: Business scenarios for CloudOps/SRE/FinOps stakeholders
|
11
|
+
- Integration: Multi-account strategies with Landing Zone support
|
12
|
+
|
13
|
+
NEW: Business Interface Layer for Notebook Usage
|
14
|
+
- Simple synchronous functions wrapping complex async operations
|
15
|
+
- Business-friendly parameters (cost thresholds, risk levels, savings targets)
|
16
|
+
- Executive-ready results with export capabilities
|
17
|
+
- Professional Rich CLI integration
|
18
|
+
"""
|
19
|
+
|
20
|
+
# Core async API classes (for advanced users)
|
21
|
+
from .cost_optimizer import CostOptimizer
|
22
|
+
from .security_enforcer import SecurityEnforcer
|
23
|
+
from .lifecycle_manager import ResourceLifecycleManager
|
24
|
+
from .infrastructure_optimizer import InfrastructureOptimizer
|
25
|
+
from .monitoring_automation import MonitoringAutomation
|
26
|
+
|
27
|
+
# Business Interface Layer (recommended for notebook usage)
|
28
|
+
from .interfaces import (
|
29
|
+
BusinessResultSummary,
|
30
|
+
emergency_cost_response,
|
31
|
+
optimize_unused_resources,
|
32
|
+
governance_campaign,
|
33
|
+
security_incident_response,
|
34
|
+
optimize_infrastructure
|
35
|
+
)
|
36
|
+
|
37
|
+
# Enterprise Notebook Framework (NEW in v0.9.1)
|
38
|
+
from .notebook_framework import (
|
39
|
+
NotebookFramework,
|
40
|
+
NotebookMode,
|
41
|
+
AuthenticationStatus,
|
42
|
+
ScenarioMetadata
|
43
|
+
)
|
44
|
+
|
45
|
+
# Type-safe models
|
46
|
+
from .models import (
|
47
|
+
CloudOpsExecutionResult,
|
48
|
+
CostOptimizationResult,
|
49
|
+
SecurityEnforcementResult,
|
50
|
+
BusinessScenario,
|
51
|
+
ResourceImpact
|
52
|
+
)
|
53
|
+
|
54
|
+
__version__ = "0.9.1"
|
55
|
+
__author__ = "CloudOps Enterprise Team"
|
56
|
+
|
57
|
+
__all__ = [
|
58
|
+
# RECOMMENDED: Business Interface Functions (simple notebook usage)
|
59
|
+
"BusinessResultSummary",
|
60
|
+
"emergency_cost_response",
|
61
|
+
"optimize_unused_resources",
|
62
|
+
"governance_campaign",
|
63
|
+
"security_incident_response",
|
64
|
+
"optimize_infrastructure",
|
65
|
+
|
66
|
+
# ENTERPRISE NOTEBOOK FRAMEWORK (v0.9.1)
|
67
|
+
"NotebookFramework",
|
68
|
+
"NotebookMode",
|
69
|
+
"AuthenticationStatus",
|
70
|
+
"ScenarioMetadata",
|
71
|
+
|
72
|
+
# ADVANCED: Core API Classes (async operations)
|
73
|
+
"CostOptimizer",
|
74
|
+
"SecurityEnforcer",
|
75
|
+
"ResourceLifecycleManager",
|
76
|
+
"InfrastructureOptimizer",
|
77
|
+
"MonitoringAutomation",
|
78
|
+
|
79
|
+
# Type-Safe Models
|
80
|
+
"CloudOpsExecutionResult",
|
81
|
+
"CostOptimizationResult",
|
82
|
+
"SecurityEnforcementResult",
|
83
|
+
"BusinessScenario",
|
84
|
+
"ResourceImpact"
|
85
|
+
]
|
86
|
+
|
87
|
+
# Enterprise Usage Examples - Business Interface Layer
|
88
|
+
BUSINESS_SCENARIO_EXAMPLES = {
|
89
|
+
"notebook_consolidation": {
|
90
|
+
"description": "Enterprise notebook framework for consolidated scenarios (NEW in v0.9.1)",
|
91
|
+
"simple_example": "from runbooks.cloudops import NotebookFramework, NotebookMode; framework = NotebookFramework(profile='default', mode=NotebookMode.EXECUTIVE)",
|
92
|
+
"advanced_example": "See notebooks/cloudops/consolidated-cost-optimization.ipynb for comprehensive example"
|
93
|
+
},
|
94
|
+
"cost_emergency": {
|
95
|
+
"description": "Emergency cost optimization for $10K+ monthly spikes",
|
96
|
+
"simple_example": "from runbooks.cloudops import emergency_cost_response; result = emergency_cost_response(profile='billing', cost_spike_threshold=25000)",
|
97
|
+
"advanced_example": "from runbooks.cloudops import CostOptimizer; optimizer = CostOptimizer(); optimizer.optimize_nat_gateways()"
|
98
|
+
},
|
99
|
+
"unused_resources": {
|
100
|
+
"description": "Find unused AWS resources for immediate cost savings",
|
101
|
+
"simple_example": "from runbooks.cloudops import optimize_unused_resources; result = optimize_unused_resources(profile='operations', minimum_cost_threshold=50)",
|
102
|
+
"advanced_example": "from runbooks.cloudops import CostOptimizer; optimizer = CostOptimizer(); optimizer.optimize_idle_ec2_instances()"
|
103
|
+
},
|
104
|
+
"security_incident": {
|
105
|
+
"description": "Automated security compliance remediation",
|
106
|
+
"simple_example": "from runbooks.cloudops import security_incident_response; result = security_incident_response(profile='security', incident_type='s3_encryption')",
|
107
|
+
"advanced_example": "from runbooks.cloudops import SecurityEnforcer; enforcer = SecurityEnforcer(); enforcer.enforce_s3_encryption()"
|
108
|
+
},
|
109
|
+
"governance_campaign": {
|
110
|
+
"description": "Multi-account governance and cleanup operations",
|
111
|
+
"simple_example": "from runbooks.cloudops import governance_campaign; result = governance_campaign(management_profile='org-management', scope='organization')",
|
112
|
+
"advanced_example": "from runbooks.cloudops import ResourceLifecycleManager; manager = ResourceLifecycleManager(); manager.enforce_tagging_standards()"
|
113
|
+
},
|
114
|
+
"infrastructure_optimization": {
|
115
|
+
"description": "Infrastructure optimization and performance recovery",
|
116
|
+
"simple_example": "from runbooks.cloudops import optimize_infrastructure; result = optimize_infrastructure(profile='operations', cost_reduction_target=25)",
|
117
|
+
"advanced_example": "from runbooks.cloudops import InfrastructureOptimizer; optimizer = InfrastructureOptimizer(); optimizer.optimize_load_balancers()"
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
def get_business_scenarios():
|
122
|
+
"""Get available business scenarios with examples."""
|
123
|
+
return BUSINESS_SCENARIO_EXAMPLES
|