Jamonygr/sre-agent
GitHub: Jamonygr/sre-agent
基于 Terraform 的 Azure SRE 沙盒实验室,用于练习云原生故障检测、告警响应和自动化修复流程。
Stars: 15 | Forks: 0
# SRE Agent Azure Lab
[](https://terraform.io)
[](https://registry.terraform.io/providers/hashicorp/azurerm/latest)
[](https://learn.microsoft.com/powershell/)
[](LICENSE)
` 或 `ARM_SUBSCRIPTION_ID` 选定的 Azure 订阅
- 通过 `TF_VAR_admin_password` 或被忽略的 `terraform.tfvars` 提供的私有 VM 密码
```
terraform init -backend=false -reconfigure
terraform validate
.\scripts\Invoke-LocalPlan.ps1 -VarFile environments/cheap-lab.tfvars
```
对于实际执行(apply):
```
terraform init
terraform apply -var-file=environments/cheap-lab.tfvars
.\scripts\Invoke-SreLabValidation.ps1 -Environment cheap-lab
```
## 主控制面板
主要的功能开关位于 `terraform.tfvars` 或已提交的环境配置中。
```
deploy_monitoring = true
deploy_log_analytics = true
deploy_azure_monitor_agent = true
deploy_data_collection_rules = true
deploy_alerts = true
deploy_log_query_alerts = true
deploy_workbooks = true
deploy_sre_agent = true
enable_alert_runbook_webhooks = false
deploy_update_management = true
deploy_backup = false
deploy_policy = true
deploy_cost_management = true
deploy_windows_targets = true
deploy_iis_farm = true
deploy_firewall = false
deploy_vpn_gateway = false
deploy_aks = true
deploy_app_service = true
deploy_container_apps = true
deploy_functions = true
```
## 实验室场景
标签:AI合规, ECS, SRE, Terraform, 云计算, 偏差过滤, 微软云, 监控告警, 自动化运维, 规则引擎