@codigodoleo/wp-kit 3.5.0 → 5.0.0
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.
- package/lib/prompts/index.js +99 -0
- package/modules/docs/index.js +56 -1
- package/modules/docs/templates/README.md.hbs +33 -160
- package/modules/docs/templates/docs/Arquitetura.md.hbs +106 -0
- package/modules/docs/templates/docs/Deploy-Pipeline.md.hbs +85 -0
- package/modules/docs/templates/docs/Desenvolvimento.md.hbs +127 -0
- package/modules/docs/templates/docs/Getting-Started.md.hbs +83 -0
- package/modules/docs/templates/docs/Infraestrutura.md.hbs +65 -0
- package/modules/docs/templates/docs/Monitoramento.md.hbs +57 -0
- package/modules/docs/templates/docs/Sync-the-Production-DB-with-the-Staging-DB.md.hbs +68 -0
- package/modules/docs/templates/docs/Troubleshooting.md.hbs +65 -0
- package/modules/mu-plugin/index.js +143 -17
- package/modules/mu-plugin/prompts.js +7 -0
- package/modules/mu-plugin/templates/acorn/.gitignore.hbs +10 -0
- package/modules/mu-plugin/templates/acorn/README.md.hbs +46 -0
- package/modules/mu-plugin/templates/acorn/app/Providers/CoreServiceProvider.php.hbs +26 -0
- package/modules/mu-plugin/templates/acorn/composer.json.hbs +31 -0
- package/modules/mu-plugin/templates/acorn/config/app.php.hbs +43 -0
- package/modules/mu-plugin/templates/acorn/config/logging.php.hbs +59 -0
- package/modules/mu-plugin/templates/acorn/plugin.php.hbs +95 -0
- package/modules/mu-plugin/templates/acorn/resources/.gitkeep +0 -0
- package/modules/mu-plugin/templates/acorn/storage/framework/cache/.gitkeep +0 -0
- package/modules/mu-plugin/templates/acorn/storage/framework/sessions/.gitkeep +0 -0
- package/modules/mu-plugin/templates/acorn/storage/framework/views/.gitkeep +0 -0
- package/modules/mu-plugin/templates/bedrock-autoloader.php +28 -0
- package/modules/sage/templates/.lando.yml.hbs +4 -1
- package/package.json +1 -1
- package/templates/.lando.yml.hbs +0 -9
- package/modules/docs/templates/docs/Arquitetura.md +0 -420
- package/modules/docs/templates/docs/Deploy-Pipeline.md +0 -127
- package/modules/docs/templates/docs/Desenvolvimento.md +0 -1139
- package/modules/docs/templates/docs/Getting-Started.md +0 -523
- package/modules/docs/templates/docs/Infraestrutura.md +0 -240
- package/modules/docs/templates/docs/Monitoramento.md +0 -340
- package/modules/docs/templates/docs/Sync-the-Production-DB-with-the-Staging-DB.md +0 -7
- package/modules/docs/templates/docs/Troubleshooting.md +0 -3
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
# 🏗️ Infraestrutura
|
|
2
|
-
|
|
3
|
-
Documentação da infraestrutura do Pipefy Website, incluindo componentes, configurações e pontos que necessitam detalhamento pela equipe SRE.
|
|
4
|
-
|
|
5
|
-
## 🌍 **Visão Geral da Infraestrutura**
|
|
6
|
-
|
|
7
|
-
### **Cloud Provider**
|
|
8
|
-
|
|
9
|
-
- **Provedor**: Oracle Cloud Infrastructure (OCI)
|
|
10
|
-
- **Região**: `[SRE_DETAIL: Especificar região e availability zones]`
|
|
11
|
-
- **Recursos principais**: Compute instances, Load Balancer, Block Storage
|
|
12
|
-
|
|
13
|
-
### **Arquitetura de Rede**
|
|
14
|
-
|
|
15
|
-
- **VPC**: `[SRE_DETAIL: CIDR blocks e subnets configuradas]`
|
|
16
|
-
- **Load Balancer**: OCI Load Balancer
|
|
17
|
-
- **CDN**: CloudFlare
|
|
18
|
-
- **DNS**: `[SRE_DETAIL: Configuração DNS e subdominios]`
|
|
19
|
-
|
|
20
|
-
## 🎛️ **Kubernetes Cluster**
|
|
21
|
-
|
|
22
|
-
### **Cluster Configuration**
|
|
23
|
-
|
|
24
|
-
- **Tipo**: `[SRE_DETAIL: Managed ou self-hosted]`
|
|
25
|
-
- **Versão**: `[SRE_DETAIL: Versão atual do K8s]`
|
|
26
|
-
- **Node Groups**: `[SRE_DETAIL: Tipos de instância e scaling policies]`
|
|
27
|
-
- **Networking**: `[SRE_DETAIL: CNI, Network policies, Ingress controller]`
|
|
28
|
-
|
|
29
|
-
### **Namespaces**
|
|
30
|
-
|
|
31
|
-
| Namespace | Ambiente | Finalidade |
|
|
32
|
-
| -------------- | ----------- | ---------------- |
|
|
33
|
-
| `website-dev` | Development | Testes contínuos |
|
|
34
|
-
| `website-stg` | Staging | Homologação |
|
|
35
|
-
| `website-prod` | Production | Site oficial |
|
|
36
|
-
|
|
37
|
-
### **Recursos por Ambiente**
|
|
38
|
-
|
|
39
|
-
| Recurso | Development | Staging | Production |
|
|
40
|
-
| ------------ | ------------------------------- | ------------------------------- | ---------------------------------- |
|
|
41
|
-
| **Replicas** | 1 | 1 | `[SRE_DETAIL: Número de réplicas]` |
|
|
42
|
-
| **CPU** | `[SRE_DETAIL: Requests/Limits]` | `[SRE_DETAIL: Requests/Limits]` | `[SRE_DETAIL: Requests/Limits]` |
|
|
43
|
-
| **Memory** | `[SRE_DETAIL: Requests/Limits]` | `[SRE_DETAIL: Requests/Limits]` | `[SRE_DETAIL: Requests/Limits]` |
|
|
44
|
-
| **Storage** | `[SRE_DETAIL: Tamanho PVC]` | `[SRE_DETAIL: Tamanho PVC]` | `[SRE_DETAIL: Tamanho PVC]` |
|
|
45
|
-
|
|
46
|
-
## 💾 **Persistência de Dados**
|
|
47
|
-
|
|
48
|
-
### **Banco de Dados**
|
|
49
|
-
|
|
50
|
-
- **Tipo**: `[SRE_DETAIL: MySQL managed service ou self-hosted]`
|
|
51
|
-
- **Versão**: `[SRE_DETAIL: Versão do MySQL]`
|
|
52
|
-
- **Configuração**: `[SRE_DETAIL: Instance type, storage, backup policy]`
|
|
53
|
-
- **High Availability**: `[SRE_DETAIL: Multi-AZ, read replicas]`
|
|
54
|
-
- **Backup**: `[SRE_DETAIL: Frequência, retenção, restore procedures]`
|
|
55
|
-
|
|
56
|
-
### **Armazenamento de Arquivos**
|
|
57
|
-
|
|
58
|
-
- **WordPress Uploads**: `[SRE_DETAIL: Object Storage ou PVC]`
|
|
59
|
-
- **Assets Estáticos**: CloudFlare CDN
|
|
60
|
-
- **Logs**: `[SRE_DETAIL: Centralized logging solution]`
|
|
61
|
-
- **Backup de Arquivos**: `[SRE_DETAIL: Backup strategy para uploads]`
|
|
62
|
-
|
|
63
|
-
## 🔐 **Segurança**
|
|
64
|
-
|
|
65
|
-
### **Network Security**
|
|
66
|
-
|
|
67
|
-
- **Firewall**: `[SRE_DETAIL: Regras de firewall OCI]`
|
|
68
|
-
- **WAF**: CloudFlare Web Application Firewall
|
|
69
|
-
- **DDoS Protection**: CloudFlare
|
|
70
|
-
- **VPN Access**: `[SRE_DETAIL: VPN configuration para acesso interno]`
|
|
71
|
-
|
|
72
|
-
### **Authentication & Authorization**
|
|
73
|
-
|
|
74
|
-
- **RBAC**: `[SRE_DETAIL: Kubernetes RBAC policies]`
|
|
75
|
-
- **Service Accounts**: `[SRE_DETAIL: K8s service accounts configurados]`
|
|
76
|
-
- **Secrets Management**: `[SRE_DETAIL: Kubernetes secrets ou external vault]`
|
|
77
|
-
- **Image Security**: `[SRE_DETAIL: Registry scanning, admission controllers]`
|
|
78
|
-
|
|
79
|
-
### **SSL/TLS**
|
|
80
|
-
|
|
81
|
-
- **Certificados**: `[SRE_DETAIL: Let's Encrypt ou certificados próprios]`
|
|
82
|
-
- **Renovação**: `[SRE_DETAIL: Processo automático de renovação]`
|
|
83
|
-
- **Cipher Suites**: `[SRE_DETAIL: Configurações de segurança SSL]`
|
|
84
|
-
|
|
85
|
-
## 📊 **Monitoramento e Observabilidade**
|
|
86
|
-
|
|
87
|
-
### **Monitoring Stack**
|
|
88
|
-
|
|
89
|
-
- **Metrics**: `[SRE_DETAIL: Prometheus, CloudWatch, ou OCI Monitoring]`
|
|
90
|
-
- **Logging**: `[SRE_DETAIL: ELK, Fluentd, ou solução OCI]`
|
|
91
|
-
- **APM**: `[SRE_DETAIL: Application Performance Monitoring solution]`
|
|
92
|
-
- **Dashboards**: `[SRE_DETAIL: Grafana ou OCI Console]`
|
|
93
|
-
|
|
94
|
-
### **Alerting**
|
|
95
|
-
|
|
96
|
-
- **Notification Channels**: `[SRE_DETAIL: Slack, email, PagerDuty]`
|
|
97
|
-
- **Alert Rules**: `[SRE_DETAIL: Métricas críticas e thresholds]`
|
|
98
|
-
- **Escalation**: `[SRE_DETAIL: Escalation policies]`
|
|
99
|
-
- **Runbooks**: `[SRE_DETAIL: Automated remediation procedures]`
|
|
100
|
-
|
|
101
|
-
### **Health Checks**
|
|
102
|
-
|
|
103
|
-
- **Liveness Probes**: `[SRE_DETAIL: Endpoint e configuração]`
|
|
104
|
-
- **Readiness Probes**: `[SRE_DETAIL: Endpoint e configuração]`
|
|
105
|
-
- **External Monitoring**: `[SRE_DETAIL: Uptime monitoring service]`
|
|
106
|
-
|
|
107
|
-
## 🔄 **Backup e Disaster Recovery**
|
|
108
|
-
|
|
109
|
-
### **Backup Strategy**
|
|
110
|
-
|
|
111
|
-
- **Database Backups**: `[SRE_DETAIL: Automated backup schedule]`
|
|
112
|
-
- **File System Backups**: `[SRE_DETAIL: PVC snapshot policy]`
|
|
113
|
-
- **Configuration Backups**: `[SRE_DETAIL: K8s manifests backup]`
|
|
114
|
-
- **Cross-Region Backup**: `[SRE_DETAIL: Geographic redundancy]`
|
|
115
|
-
|
|
116
|
-
### **Disaster Recovery**
|
|
117
|
-
|
|
118
|
-
- **RTO (Recovery Time Objective)**: `[SRE_DETAIL: Target recovery time]`
|
|
119
|
-
- **RPO (Recovery Point Objective)**: `[SRE_DETAIL: Acceptable data loss]`
|
|
120
|
-
- **DR Site**: `[SRE_DETAIL: Secondary region or provider]`
|
|
121
|
-
- **Failover Process**: `[SRE_DETAIL: Automated or manual procedures]`
|
|
122
|
-
|
|
123
|
-
## 🚀 **Performance e Scaling**
|
|
124
|
-
|
|
125
|
-
### **Auto Scaling**
|
|
126
|
-
|
|
127
|
-
- **HPA (Horizontal Pod Autoscaler)**: `[SRE_DETAIL: Métricas e thresholds]`
|
|
128
|
-
- **VPA (Vertical Pod Autoscaler)**: `[SRE_DETAIL: Se habilitado]`
|
|
129
|
-
- **Cluster Autoscaler**: `[SRE_DETAIL: Node scaling policies]`
|
|
130
|
-
- **Load Testing**: `[SRE_DETAIL: Performance benchmarks]`
|
|
131
|
-
|
|
132
|
-
### **CDN Configuration**
|
|
133
|
-
|
|
134
|
-
- **Cache Rules**: `[SRE_DETAIL: CloudFlare cache policies]`
|
|
135
|
-
- **Purge Strategy**: `[SRE_DETAIL: Cache invalidation process]`
|
|
136
|
-
- **Geographic Distribution**: `[SRE_DETAIL: Edge locations]`
|
|
137
|
-
- **Performance Metrics**: `[SRE_DETAIL: CDN analytics e reporting]`
|
|
138
|
-
|
|
139
|
-
## 🔧 **DevOps Tools**
|
|
140
|
-
|
|
141
|
-
### **CI/CD**
|
|
142
|
-
|
|
143
|
-
- **GitLab CI/CD**: Pipeline configuration
|
|
144
|
-
- **Container Registry**: `[SRE_DETAIL: GitLab Registry ou external]`
|
|
145
|
-
- **Image Scanning**: `[SRE_DETAIL: Security scanning tools]`
|
|
146
|
-
- **Deployment Strategy**: `[SRE_DETAIL: Blue/Green, Rolling, Canary]`
|
|
147
|
-
|
|
148
|
-
### **Infrastructure as Code**
|
|
149
|
-
|
|
150
|
-
- **Terraform**: `[SRE_DETAIL: Estado atual da IaC]`
|
|
151
|
-
- **Kubernetes Manifests**: `[SRE_DETAIL: Estrutura dos manifests]`
|
|
152
|
-
- **Helm Charts**: `[SRE_DETAIL: Planejamento para migração]`
|
|
153
|
-
- **GitOps**: `[SRE_DETAIL: ArgoCD ou similar]`
|
|
154
|
-
|
|
155
|
-
## 🌐 **Rede e Conectividade**
|
|
156
|
-
|
|
157
|
-
### **External Connectivity**
|
|
158
|
-
|
|
159
|
-
- **Public IPs**: `[SRE_DETAIL: IP addresses e DNS records]`
|
|
160
|
-
- **Domain Management**: `[SRE_DETAIL: DNS provider e configuração]`
|
|
161
|
-
- **API Gateways**: `[SRE_DETAIL: Rate limiting, authentication]`
|
|
162
|
-
- **Third-party Integrations**: `[SRE_DETAIL: External services connectivity]`
|
|
163
|
-
|
|
164
|
-
### **Internal Networking**
|
|
165
|
-
|
|
166
|
-
- **Service Mesh**: `[SRE_DETAIL: Istio, Linkerd, ou similar]`
|
|
167
|
-
- **Network Policies**: `[SRE_DETAIL: Pod-to-pod communication rules]`
|
|
168
|
-
- **Internal DNS**: `[SRE_DETAIL: CoreDNS configuration]`
|
|
169
|
-
- **Service Discovery**: `[SRE_DETAIL: Internal service communication]`
|
|
170
|
-
|
|
171
|
-
## 💰 **Custos e Otimização**
|
|
172
|
-
|
|
173
|
-
### **Cost Management**
|
|
174
|
-
|
|
175
|
-
- **Resource Allocation**: `[SRE_DETAIL: Current resource usage]`
|
|
176
|
-
- **Cost Monitoring**: `[SRE_DETAIL: Billing alerts e budgets]`
|
|
177
|
-
- **Optimization Opportunities**: `[SRE_DETAIL: Right-sizing recommendations]`
|
|
178
|
-
- **Reserved Instances**: `[SRE_DETAIL: Long-term commitment strategy]`
|
|
179
|
-
|
|
180
|
-
## 🔄 **Migração para Helm (Planejado)**
|
|
181
|
-
|
|
182
|
-
### **Current State**
|
|
183
|
-
|
|
184
|
-
- **Deployment Method**: Kubernetes manifests diretos
|
|
185
|
-
- **Configuration Management**: Kustomize ou similar
|
|
186
|
-
- **Challenges**: `[SRE_DETAIL: Pontos de dor atuais]`
|
|
187
|
-
|
|
188
|
-
### **Target State**
|
|
189
|
-
|
|
190
|
-
- **Helm Version**: 3.x
|
|
191
|
-
- **Chart Structure**: `[SRE_DETAIL: Estrutura planejada]`
|
|
192
|
-
- **Migration Plan**: `[SRE_DETAIL: Cronograma e etapas]`
|
|
193
|
-
- **Benefits Expected**: `[SRE_DETAIL: Melhorias esperadas]`
|
|
194
|
-
|
|
195
|
-
## 📋 **Action Items para SRE**
|
|
196
|
-
|
|
197
|
-
### **🔴 Crítico (Documentação Necessária)**
|
|
198
|
-
|
|
199
|
-
- [ ] Especificar configurações de rede (VPC, subnets, security groups)
|
|
200
|
-
- [ ] Detalhar configuração do banco de dados (versão, backup, HA)
|
|
201
|
-
- [ ] Documentar estratégia de monitoramento e alertas
|
|
202
|
-
- [ ] Definir políticas de backup e disaster recovery
|
|
203
|
-
|
|
204
|
-
### **🟡 Importante (Melhoria)**
|
|
205
|
-
|
|
206
|
-
- [ ] Implementar Infrastructure as Code com Terraform
|
|
207
|
-
- [ ] Configurar monitoring stack completo
|
|
208
|
-
- [ ] Estabelecer políticas de auto-scaling
|
|
209
|
-
- [ ] Planejar migração para Helm
|
|
210
|
-
|
|
211
|
-
### **🟢 Desejável (Futuro)**
|
|
212
|
-
|
|
213
|
-
- [ ] Implementar service mesh
|
|
214
|
-
- [ ] Configurar GitOps com ArgoCD
|
|
215
|
-
- [ ] Otimizar custos de infraestrutura
|
|
216
|
-
- [ ] Implementar chaos engineering
|
|
217
|
-
|
|
218
|
-
## 📞 **Contatos e Responsabilidades**
|
|
219
|
-
|
|
220
|
-
### **Equipes Responsáveis**
|
|
221
|
-
|
|
222
|
-
- **SRE Team**: Infraestrutura, monitoramento, DR
|
|
223
|
-
- **DevOps Team**: CI/CD, deployments, automação
|
|
224
|
-
- **Security Team**: Políticas de segurança, compliance
|
|
225
|
-
- **Development Team**: Application requirements, troubleshooting
|
|
226
|
-
|
|
227
|
-
### **Escalation**
|
|
228
|
-
|
|
229
|
-
- **Incidentes P1**: `[SRE_DETAIL: Procedimento de escalação]`
|
|
230
|
-
- **Mudanças de Infraestrutura**: `[SRE_DETAIL: Change management process]`
|
|
231
|
-
- **Emergency Access**: `[SRE_DETAIL: Break-glass procedures]`
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
📝 **Última atualização**: Junho 2025
|
|
236
|
-
☁️ **Cloud Provider**: Oracle Cloud Infrastructure (OCI)
|
|
237
|
-
🎛️ **Orquestração**: Kubernetes
|
|
238
|
-
🔄 **Estado**: Migração para Helm planejada
|
|
239
|
-
📊 **Documentação SRE**: Detalhamentos técnicos necessários
|
|
240
|
-
🎯 **Próximos passos**: Preenchimento dos `[SRE_DETAIL]` pela equipe especializada
|
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
# 📊 Monitoramento
|
|
2
|
-
|
|
3
|
-
Documentação do sistema de monitoramento e observabilidade do Pipefy Website, incluindo métricas, alertas e pontos que necessitam detalhamento pela equipe SRE.
|
|
4
|
-
|
|
5
|
-
## 🎯 **Visão Geral do Monitoramento**
|
|
6
|
-
|
|
7
|
-
### **Objetivos**
|
|
8
|
-
|
|
9
|
-
- Garantir disponibilidade e performance do site
|
|
10
|
-
- Detectar problemas antes que afetem usuários
|
|
11
|
-
- Fornecer insights para otimização
|
|
12
|
-
- Manter SLAs definidos
|
|
13
|
-
|
|
14
|
-
### **Stack de Observabilidade**
|
|
15
|
-
|
|
16
|
-
- **Metrics**: `[SRE_DETAIL: Prometheus, CloudWatch, OCI Monitoring]`
|
|
17
|
-
- **Logs**: `[SRE_DETAIL: ELK Stack, Fluentd, OCI Logging]`
|
|
18
|
-
- **Traces**: `[SRE_DETAIL: Jaeger, Zipkin, ou APM solution]`
|
|
19
|
-
- **Dashboards**: `[SRE_DETAIL: Grafana, OCI Console, ou custom]`
|
|
20
|
-
|
|
21
|
-
## 📈 **Métricas Principais**
|
|
22
|
-
|
|
23
|
-
### **Application Metrics**
|
|
24
|
-
|
|
25
|
-
| Métrica | Threshold | Alertas | Responsável |
|
|
26
|
-
| ----------------- | ------------------------- | --------------------------- | ----------- |
|
|
27
|
-
| **Response Time** | `[SRE_DETAIL: < Xs]` | `[SRE_DETAIL: Alert rules]` | Dev Team |
|
|
28
|
-
| **Error Rate** | `[SRE_DETAIL: < X%]` | `[SRE_DETAIL: Alert rules]` | Dev Team |
|
|
29
|
-
| **Throughput** | `[SRE_DETAIL: > X req/s]` | `[SRE_DETAIL: Alert rules]` | SRE Team |
|
|
30
|
-
| **Availability** | `[SRE_DETAIL: > XX.X%]` | `[SRE_DETAIL: Alert rules]` | SRE Team |
|
|
31
|
-
|
|
32
|
-
### **Infrastructure Metrics**
|
|
33
|
-
|
|
34
|
-
| Componente | Métricas Monitoradas | Thresholds |
|
|
35
|
-
| ------------------- | ------------------------------- | ----------------------------------- |
|
|
36
|
-
| **Kubernetes Pods** | CPU, Memory, Restarts | `[SRE_DETAIL: Limites específicos]` |
|
|
37
|
-
| **Database** | Connections, Query time, Locks | `[SRE_DETAIL: Limites específicos]` |
|
|
38
|
-
| **Storage** | Disk usage, I/O operations | `[SRE_DETAIL: Limites específicos]` |
|
|
39
|
-
| **Network** | Bandwidth, Latency, Packet loss | `[SRE_DETAIL: Limites específicos]` |
|
|
40
|
-
|
|
41
|
-
### **Business Metrics**
|
|
42
|
-
|
|
43
|
-
- **Page Views**: `[SRE_DETAIL: Tracking method e baseline]`
|
|
44
|
-
- **User Sessions**: `[SRE_DETAIL: Analytics integration]`
|
|
45
|
-
- **Conversion Rate**: `[SRE_DETAIL: Goals e funnels]`
|
|
46
|
-
- **Search Performance**: `[SRE_DETAIL: Internal search metrics]`
|
|
47
|
-
|
|
48
|
-
## 🚨 **Sistema de Alertas**
|
|
49
|
-
|
|
50
|
-
### **Níveis de Severidade**
|
|
51
|
-
|
|
52
|
-
| Nível | Descrição | Resposta Esperada | Escalação |
|
|
53
|
-
| ----------------- | -------------------- | ------------------- | -------------------------------- |
|
|
54
|
-
| **P1 - Critical** | Site down, data loss | Imediata (< 15 min) | `[SRE_DETAIL: On-call rotation]` |
|
|
55
|
-
| **P2 - High** | Performance degraded | < 1 hora | `[SRE_DETAIL: Team lead]` |
|
|
56
|
-
| **P3 - Medium** | Minor issues | < 4 horas | `[SRE_DETAIL: Dev team]` |
|
|
57
|
-
| **P4 - Low** | Warnings, capacity | Next business day | `[SRE_DETAIL: Planning]` |
|
|
58
|
-
|
|
59
|
-
### **Canais de Notificação**
|
|
60
|
-
|
|
61
|
-
- **Slack**: `[SRE_DETAIL: Channels configurados (#alerts, #devops)]`
|
|
62
|
-
- **Email**: `[SRE_DETAIL: Distribution lists]`
|
|
63
|
-
- **PagerDuty**: `[SRE_DETAIL: On-call schedule]`
|
|
64
|
-
- **SMS**: `[SRE_DETAIL: Critical alerts only]`
|
|
65
|
-
|
|
66
|
-
### **Alert Rules**
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
Site Down (P1):
|
|
70
|
-
- HTTP 5xx > 50% por 2 minutos
|
|
71
|
-
- [SRE_DETAIL: Specific conditions and thresholds]
|
|
72
|
-
|
|
73
|
-
High Response Time (P2):
|
|
74
|
-
- Response time > Xs por 5 minutos
|
|
75
|
-
- [SRE_DETAIL: Specific conditions and thresholds]
|
|
76
|
-
|
|
77
|
-
Database Issues (P1/P2):
|
|
78
|
-
- Connection errors > X%
|
|
79
|
-
- [SRE_DETAIL: Specific conditions and thresholds]
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## 📋 **Dashboards**
|
|
83
|
-
|
|
84
|
-
### **Executive Dashboard**
|
|
85
|
-
|
|
86
|
-
- **Uptime**: Overall availability
|
|
87
|
-
- **Performance**: Average response time
|
|
88
|
-
- **User Impact**: Active users, page views
|
|
89
|
-
- **Business KPIs**: `[SRE_DETAIL: Specific business metrics]`
|
|
90
|
-
|
|
91
|
-
### **Operations Dashboard**
|
|
92
|
-
|
|
93
|
-
- **Infrastructure Health**: Pods, nodes, storage
|
|
94
|
-
- **Application Performance**: Response times, errors
|
|
95
|
-
- **Security Events**: `[SRE_DETAIL: Security monitoring metrics]`
|
|
96
|
-
- **Deployment Status**: `[SRE_DETAIL: CI/CD pipeline metrics]`
|
|
97
|
-
|
|
98
|
-
### **Development Dashboard**
|
|
99
|
-
|
|
100
|
-
- **Error Rates**: By endpoint, feature
|
|
101
|
-
- **Performance Trends**: Historical data
|
|
102
|
-
- **User Experience**: `[SRE_DETAIL: Frontend performance metrics]`
|
|
103
|
-
- **API Usage**: `[SRE_DETAIL: API endpoint metrics]`
|
|
104
|
-
|
|
105
|
-
## 🔍 **Health Checks**
|
|
106
|
-
|
|
107
|
-
### **Application Health Checks**
|
|
108
|
-
|
|
109
|
-
| Endpoint | Frequency | Timeout | Expected Response |
|
|
110
|
-
| ------------------------------- | ------------------ | ------------------ | ------------------------ |
|
|
111
|
-
| `/wp-json/wp/v2/` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Xs]` | HTTP 200 |
|
|
112
|
-
| `/wp-admin/admin-ajax.php` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Xs]` | HTTP 200 |
|
|
113
|
-
| `[SRE_DETAIL: Custom endpoint]` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Expected]` |
|
|
114
|
-
|
|
115
|
-
### **External Dependencies**
|
|
116
|
-
|
|
117
|
-
- **Database**: `[SRE_DETAIL: Connection check frequency]`
|
|
118
|
-
- **CDN (CloudFlare)**: `[SRE_DETAIL: Edge health monitoring]`
|
|
119
|
-
- **Third-party APIs**: `[SRE_DETAIL: External service monitoring]`
|
|
120
|
-
- **Object Storage**: `[SRE_DETAIL: Storage accessibility check]`
|
|
121
|
-
|
|
122
|
-
### **Kubernetes Health Checks**
|
|
123
|
-
|
|
124
|
-
```yaml
|
|
125
|
-
livenessProbe:
|
|
126
|
-
# [SRE_DETAIL: Configuração específica]
|
|
127
|
-
|
|
128
|
-
readinessProbe:
|
|
129
|
-
# [SRE_DETAIL: Configuração específica]
|
|
130
|
-
|
|
131
|
-
startupProbe:
|
|
132
|
-
# [SRE_DETAIL: Configuração específica]
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## 📊 **SLIs e SLOs**
|
|
136
|
-
|
|
137
|
-
### **Service Level Indicators (SLIs)**
|
|
138
|
-
|
|
139
|
-
| SLI | Medição | Fonte de Dados |
|
|
140
|
-
| ---------------- | ------------------------------------ | ----------------------------------- |
|
|
141
|
-
| **Availability** | Successful requests / Total requests | `[SRE_DETAIL: Load balancer logs]` |
|
|
142
|
-
| **Latency** | Response time < Xms | `[SRE_DETAIL: Application metrics]` |
|
|
143
|
-
| **Error Rate** | Error responses / Total responses | `[SRE_DETAIL: Application logs]` |
|
|
144
|
-
| **Throughput** | Requests per second | `[SRE_DETAIL: Ingress metrics]` |
|
|
145
|
-
|
|
146
|
-
### **Service Level Objectives (SLOs)**
|
|
147
|
-
|
|
148
|
-
| SLO | Target | Measurement Window | Error Budget |
|
|
149
|
-
| ----------------- | ------------------------ | ------------------ | ------------------------- |
|
|
150
|
-
| **Availability** | `[SRE_DETAIL: 99.X%]` | 30 days | `[SRE_DETAIL: X hours]` |
|
|
151
|
-
| **Response Time** | `[SRE_DETAIL: XX% < Xs]` | 24 hours | `[SRE_DETAIL: X% budget]` |
|
|
152
|
-
| **Error Rate** | `[SRE_DETAIL: < X%]` | 24 hours | `[SRE_DETAIL: X% budget]` |
|
|
153
|
-
|
|
154
|
-
### **Error Budget Policy**
|
|
155
|
-
|
|
156
|
-
- **Budget Remaining > 50%**: `[SRE_DETAIL: Normal operations]`
|
|
157
|
-
- **Budget Remaining 10-50%**: `[SRE_DETAIL: Increased monitoring]`
|
|
158
|
-
- **Budget Remaining < 10%**: `[SRE_DETAIL: Feature freeze policy]`
|
|
159
|
-
|
|
160
|
-
## 🔐 **Security Monitoring**
|
|
161
|
-
|
|
162
|
-
### **Security Events**
|
|
163
|
-
|
|
164
|
-
- **Failed Login Attempts**: `[SRE_DETAIL: Threshold e response]`
|
|
165
|
-
- **Unusual Traffic Patterns**: `[SRE_DETAIL: DDoS detection]`
|
|
166
|
-
- **File System Changes**: `[SRE_DETAIL: File integrity monitoring]`
|
|
167
|
-
- **Privilege Escalation**: `[SRE_DETAIL: RBAC violations]`
|
|
168
|
-
|
|
169
|
-
### **Compliance Monitoring**
|
|
170
|
-
|
|
171
|
-
- **Access Logs**: `[SRE_DETAIL: Retention policy]`
|
|
172
|
-
- **Data Protection**: `[SRE_DETAIL: GDPR compliance metrics]`
|
|
173
|
-
- **Security Patches**: `[SRE_DETAIL: Vulnerability scanning]`
|
|
174
|
-
- **Certificate Expiration**: `[SRE_DETAIL: SSL monitoring]`
|
|
175
|
-
|
|
176
|
-
## 📝 **Logging Strategy**
|
|
177
|
-
|
|
178
|
-
### **Log Types**
|
|
179
|
-
|
|
180
|
-
| Log Type | Retention | Format | Storage |
|
|
181
|
-
| -------------------- | ---------------------- | -------------------------- | ------------------------ |
|
|
182
|
-
| **Application Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: JSON/Plain]` | `[SRE_DETAIL: Location]` |
|
|
183
|
-
| **Access Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: Format]` | `[SRE_DETAIL: Location]` |
|
|
184
|
-
| **Error Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: Format]` | `[SRE_DETAIL: Location]` |
|
|
185
|
-
| **Security Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: Format]` | `[SRE_DETAIL: Location]` |
|
|
186
|
-
|
|
187
|
-
### **Log Aggregation**
|
|
188
|
-
|
|
189
|
-
- **Collection**: `[SRE_DETAIL: Fluentd, Filebeat, ou similar]`
|
|
190
|
-
- **Processing**: `[SRE_DETAIL: Logstash, ou stream processing]`
|
|
191
|
-
- **Storage**: `[SRE_DETAIL: Elasticsearch, OCI Logging]`
|
|
192
|
-
- **Visualization**: `[SRE_DETAIL: Kibana, Grafana]`
|
|
193
|
-
|
|
194
|
-
### **Log Analysis**
|
|
195
|
-
|
|
196
|
-
- **Error Pattern Detection**: `[SRE_DETAIL: Automated analysis]`
|
|
197
|
-
- **Performance Insights**: `[SRE_DETAIL: Slow query detection]`
|
|
198
|
-
- **Security Analysis**: `[SRE_DETAIL: Threat detection]`
|
|
199
|
-
- **Trend Analysis**: `[SRE_DETAIL: Historical patterns]`
|
|
200
|
-
|
|
201
|
-
## 🔄 **Incident Response**
|
|
202
|
-
|
|
203
|
-
### **Runbooks**
|
|
204
|
-
|
|
205
|
-
| Cenário | Runbook | Owner | Automation Level |
|
|
206
|
-
| --------------------- | --------------------------------- | ------------- | --------------------------- |
|
|
207
|
-
| **Site Down** | `[SRE_DETAIL: Link para runbook]` | SRE Team | `[SRE_DETAIL: Manual/Auto]` |
|
|
208
|
-
| **High CPU** | `[SRE_DETAIL: Link para runbook]` | Dev Team | `[SRE_DETAIL: Manual/Auto]` |
|
|
209
|
-
| **Database Issues** | `[SRE_DETAIL: Link para runbook]` | DBA Team | `[SRE_DETAIL: Manual/Auto]` |
|
|
210
|
-
| **Security Incident** | `[SRE_DETAIL: Link para runbook]` | Security Team | `[SRE_DETAIL: Manual/Auto]` |
|
|
211
|
-
|
|
212
|
-
### **Auto-Remediation**
|
|
213
|
-
|
|
214
|
-
- **Pod Restart**: `[SRE_DETAIL: Conditions for automatic restart]`
|
|
215
|
-
- **Scale Up**: `[SRE_DETAIL: HPA triggers]`
|
|
216
|
-
- **Cache Clear**: `[SRE_DETAIL: Performance degradation triggers]`
|
|
217
|
-
- **Circuit Breaker**: `[SRE_DETAIL: Dependency failure handling]`
|
|
218
|
-
|
|
219
|
-
### **Escalation Matrix**
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
Level 1: On-call Engineer (0-15 min)
|
|
223
|
-
Level 2: Team Lead (15-30 min)
|
|
224
|
-
Level 3: Manager (30-60 min)
|
|
225
|
-
Level 4: Director (60+ min)
|
|
226
|
-
|
|
227
|
-
[SRE_DETAIL: Specific contact information and triggers]
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
## 📱 **Synthetic Monitoring**
|
|
231
|
-
|
|
232
|
-
### **Uptime Monitoring**
|
|
233
|
-
|
|
234
|
-
- **External Providers**: `[SRE_DETAIL: Pingdom, StatusCake, etc.]`
|
|
235
|
-
- **Check Frequency**: `[SRE_DETAIL: Interval]`
|
|
236
|
-
- **Global Locations**: `[SRE_DETAIL: Geographic distribution]`
|
|
237
|
-
- **Alert Thresholds**: `[SRE_DETAIL: Failure conditions]`
|
|
238
|
-
|
|
239
|
-
### **User Journey Monitoring**
|
|
240
|
-
|
|
241
|
-
- **Critical Paths**: `[SRE_DETAIL: Key user flows to monitor]`
|
|
242
|
-
- **Performance Budgets**: `[SRE_DETAIL: Load time thresholds]`
|
|
243
|
-
- **Browser Testing**: `[SRE_DETAIL: Cross-browser compatibility]`
|
|
244
|
-
- **Mobile Monitoring**: `[SRE_DETAIL: Mobile-specific checks]`
|
|
245
|
-
|
|
246
|
-
## 🎯 **Performance Monitoring**
|
|
247
|
-
|
|
248
|
-
### **Frontend Performance**
|
|
249
|
-
|
|
250
|
-
- **Core Web Vitals**: `[SRE_DETAIL: LCP, FID, CLS thresholds]`
|
|
251
|
-
- **Page Load Times**: `[SRE_DETAIL: Measurement tools]`
|
|
252
|
-
- **JavaScript Errors**: `[SRE_DETAIL: Error tracking solution]`
|
|
253
|
-
- **User Experience**: `[SRE_DETAIL: Real User Monitoring]`
|
|
254
|
-
|
|
255
|
-
### **Backend Performance**
|
|
256
|
-
|
|
257
|
-
- **API Response Times**: `[SRE_DETAIL: Endpoint-specific SLOs]`
|
|
258
|
-
- **Database Performance**: `[SRE_DETAIL: Query optimization metrics]`
|
|
259
|
-
- **Cache Hit Rates**: `[SRE_DETAIL: CDN and application cache]`
|
|
260
|
-
- **Resource Utilization**: `[SRE_DETAIL: CPU, memory, storage trends]`
|
|
261
|
-
|
|
262
|
-
## 📊 **Capacity Planning**
|
|
263
|
-
|
|
264
|
-
### **Growth Metrics**
|
|
265
|
-
|
|
266
|
-
- **Traffic Trends**: `[SRE_DETAIL: Historical growth patterns]`
|
|
267
|
-
- **Resource Usage**: `[SRE_DETAIL: Infrastructure scaling needs]`
|
|
268
|
-
- **Storage Growth**: `[SRE_DETAIL: Data retention and archival]`
|
|
269
|
-
- **Cost Optimization**: `[SRE_DETAIL: Resource right-sizing]`
|
|
270
|
-
|
|
271
|
-
### **Forecasting**
|
|
272
|
-
|
|
273
|
-
- **Predictive Analysis**: `[SRE_DETAIL: Tools and methodologies]`
|
|
274
|
-
- **Seasonal Patterns**: `[SRE_DETAIL: Traffic seasonality]`
|
|
275
|
-
- **Scaling Triggers**: `[SRE_DETAIL: Proactive scaling thresholds]`
|
|
276
|
-
- **Budget Planning**: `[SRE_DETAIL: Infrastructure cost projections]`
|
|
277
|
-
|
|
278
|
-
## 📋 **Action Items para SRE**
|
|
279
|
-
|
|
280
|
-
### **🔴 Crítico (Implementação Necessária)**
|
|
281
|
-
|
|
282
|
-
- [ ] Definir e implementar SLOs específicos para o site
|
|
283
|
-
- [ ] Configurar alertas críticos com thresholds apropriados
|
|
284
|
-
- [ ] Estabelecer on-call rotation e escalation procedures
|
|
285
|
-
- [ ] Implementar health checks abrangentes
|
|
286
|
-
|
|
287
|
-
### **🟡 Importante (Melhoria)**
|
|
288
|
-
|
|
289
|
-
- [ ] Configurar dashboards operacionais e executivos
|
|
290
|
-
- [ ] Implementar synthetic monitoring externo
|
|
291
|
-
- [ ] Estabelecer log aggregation e analysis
|
|
292
|
-
- [ ] Criar runbooks para cenários comuns
|
|
293
|
-
|
|
294
|
-
### **🟢 Desejável (Otimização)**
|
|
295
|
-
|
|
296
|
-
- [ ] Implementar auto-remediation para problemas comuns
|
|
297
|
-
- [ ] Configurar capacity planning automatizado
|
|
298
|
-
- [ ] Implementar advanced APM solution
|
|
299
|
-
- [ ] Estabelecer chaos engineering practices
|
|
300
|
-
|
|
301
|
-
## 📞 **Responsabilidades e Contatos**
|
|
302
|
-
|
|
303
|
-
### **Monitoring Ownership**
|
|
304
|
-
|
|
305
|
-
- **SRE Team**: Infrastructure metrics, alerting, SLOs
|
|
306
|
-
- **Development Team**: Application metrics, error tracking
|
|
307
|
-
- **Security Team**: Security monitoring, compliance
|
|
308
|
-
- **Business Team**: Business metrics, user experience
|
|
309
|
-
|
|
310
|
-
### **Tools and Access**
|
|
311
|
-
|
|
312
|
-
- **Monitoring Tools**: `[SRE_DETAIL: Access management]`
|
|
313
|
-
- **Alert Management**: `[SRE_DETAIL: Who can modify alerts]`
|
|
314
|
-
- **Dashboard Creation**: `[SRE_DETAIL: Self-service capabilities]`
|
|
315
|
-
- **Incident Management**: `[SRE_DETAIL: Incident commander rotation]`
|
|
316
|
-
|
|
317
|
-
## 🔄 **Continuous Improvement**
|
|
318
|
-
|
|
319
|
-
### **Monitoring Review Process**
|
|
320
|
-
|
|
321
|
-
- **Monthly SLO Review**: `[SRE_DETAIL: Meeting cadence]`
|
|
322
|
-
- **Alert Tuning**: `[SRE_DETAIL: Noise reduction process]`
|
|
323
|
-
- **Dashboard Optimization**: `[SRE_DETAIL: User feedback integration]`
|
|
324
|
-
- **Tool Evaluation**: `[SRE_DETAIL: Technology refresh cycle]`
|
|
325
|
-
|
|
326
|
-
### **Metrics Evolution**
|
|
327
|
-
|
|
328
|
-
- **New Metrics**: `[SRE_DETAIL: Request and approval process]`
|
|
329
|
-
- **Deprecated Metrics**: `[SRE_DETAIL: Sunset process]`
|
|
330
|
-
- **Business Alignment**: `[SRE_DETAIL: KPI alignment reviews]`
|
|
331
|
-
- **Industry Benchmarks**: `[SRE_DETAIL: External comparison]`
|
|
332
|
-
|
|
333
|
-
---
|
|
334
|
-
|
|
335
|
-
📝 **Última atualização**: Junho 2025
|
|
336
|
-
📊 **Stack**: `[SRE_DETAIL: Current monitoring stack]`
|
|
337
|
-
🚨 **Alerting**: `[SRE_DETAIL: Primary alerting system]`
|
|
338
|
-
📈 **SLOs**: A serem definidos pela equipe SRE
|
|
339
|
-
🔄 **Estado**: Necessita implementação detalhada
|
|
340
|
-
🎯 **Próximos passos**: Preenchimento dos `[SRE_DETAIL]` e implementação das action items
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
1. Inside GitLab:
|
|
2
|
-
1. Go to [CI/CD -> Schedules](https://git.pipefy.net/wordpress/pipefy-website/-/pipeline_schedules).
|
|
3
|
-
2. Press the play button on the `Download Prod Database` scheduled pipeline.
|
|
4
|
-
1. It'll create a database backup and store it in the S3 bucket.
|
|
5
|
-
3. After finishing the job above, press the play button on the `Replicate Production DB into Staging DB` scheduled pipeline.
|
|
6
|
-
1. That last job uses the database backup inside the S3 bucket
|
|
7
|
-
4. Done! Staging environment's updated now.
|