opencode-skills-collection 4.0.67 → 4.0.69
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/bundled-skills/.antigravity-install-manifest.json +281 -1
- package/bundled-skills/access-review/SKILL.md +394 -0
- package/bundled-skills/access-review/references/details.md +121 -0
- package/bundled-skills/agent-evals/SKILL.md +420 -0
- package/bundled-skills/agent-observability/SKILL.md +346 -0
- package/bundled-skills/agent-observability/references/details.md +786 -0
- package/bundled-skills/ai-agent-security/SKILL.md +393 -0
- package/bundled-skills/ai-agent-security/references/details.md +912 -0
- package/bundled-skills/ai-coding-agent-guardrails/SKILL.md +442 -0
- package/bundled-skills/ai-coding-agent-guardrails/references/details.md +753 -0
- package/bundled-skills/ai-inference-service-mesh/SKILL.md +449 -0
- package/bundled-skills/ai-pipeline-orchestration/SKILL.md +287 -0
- package/bundled-skills/ai-red-teaming/SKILL.md +409 -0
- package/bundled-skills/ai-security-hardening/SKILL.md +343 -0
- package/bundled-skills/ai-sre-incident-response/SKILL.md +336 -0
- package/bundled-skills/alerting-oncall/SKILL.md +458 -0
- package/bundled-skills/alerting-oncall/references/details.md +84 -0
- package/bundled-skills/anti-slop-design/SKILL.md +393 -0
- package/bundled-skills/antigravity-maintainer-batch-release/SKILL.md +1 -0
- package/bundled-skills/apk-redteam-pipeline/SKILL.md +446 -0
- package/bundled-skills/argocd-gitops/SKILL.md +469 -0
- package/bundled-skills/arm-templates/SKILL.md +438 -0
- package/bundled-skills/arm-templates/references/details.md +64 -0
- package/bundled-skills/artifact-yylo/SKILL.md +122 -0
- package/bundled-skills/asset-inventory/SKILL.md +412 -0
- package/bundled-skills/asset-inventory/references/details.md +127 -0
- package/bundled-skills/audit-logging/SKILL.md +476 -0
- package/bundled-skills/aws-cloudtrail/SKILL.md +486 -0
- package/bundled-skills/aws-cost-optimization/SKILL.md +331 -0
- package/bundled-skills/aws-ec2/SKILL.md +426 -0
- package/bundled-skills/aws-ecs-fargate/SKILL.md +388 -0
- package/bundled-skills/aws-iam/SKILL.md +463 -0
- package/bundled-skills/aws-lambda/SKILL.md +428 -0
- package/bundled-skills/aws-rds/SKILL.md +380 -0
- package/bundled-skills/aws-s3/SKILL.md +434 -0
- package/bundled-skills/aws-secrets-manager/SKILL.md +486 -0
- package/bundled-skills/aws-vpc/SKILL.md +436 -0
- package/bundled-skills/azure-ai-document-intelligence-ts/SKILL.md +1 -1
- package/bundled-skills/azure-aks/SKILL.md +423 -0
- package/bundled-skills/azure-devops/SKILL.md +457 -0
- package/bundled-skills/azure-functions-devsec/SKILL.md +436 -0
- package/bundled-skills/azure-keyvault/SKILL.md +455 -0
- package/bundled-skills/azure-keyvault/references/details.md +83 -0
- package/bundled-skills/azure-monitor-audit/SKILL.md +379 -0
- package/bundled-skills/azure-networking/SKILL.md +448 -0
- package/bundled-skills/azure-networking/references/details.md +135 -0
- package/bundled-skills/azure-sql/SKILL.md +413 -0
- package/bundled-skills/azure-sql/references/details.md +113 -0
- package/bundled-skills/azure-vms/SKILL.md +402 -0
- package/bundled-skills/azure-vms/references/details.md +134 -0
- package/bundled-skills/backup-recovery/SKILL.md +388 -0
- package/bundled-skills/bb-methodology/SKILL.md +451 -0
- package/bundled-skills/bb-methodology/references/details.md +120 -0
- package/bundled-skills/block-storage/SKILL.md +371 -0
- package/bundled-skills/blue-green-deploy/SKILL.md +453 -0
- package/bundled-skills/blue-green-deploy/references/details.md +90 -0
- package/bundled-skills/bug-bounty/SKILL.md +447 -0
- package/bundled-skills/bug-bounty/references/details.md +1316 -0
- package/bundled-skills/bugcrowd-reporting/SKILL.md +351 -0
- package/bundled-skills/business-continuity/SKILL.md +463 -0
- package/bundled-skills/career-ops/SKILL.md +186 -0
- package/bundled-skills/cdn-setup/SKILL.md +374 -0
- package/bundled-skills/change-management/SKILL.md +438 -0
- package/bundled-skills/change-management/references/details.md +105 -0
- package/bundled-skills/circleci/SKILL.md +475 -0
- package/bundled-skills/cis-benchmarks/SKILL.md +150 -0
- package/bundled-skills/cloudflare-pages/SKILL.md +318 -0
- package/bundled-skills/cloudflare-r2/SKILL.md +353 -0
- package/bundled-skills/cloudflare-workers/SKILL.md +415 -0
- package/bundled-skills/cloudflare-zero-trust/SKILL.md +361 -0
- package/bundled-skills/cloudformation/SKILL.md +461 -0
- package/bundled-skills/constraint-driven-development/SKILL.md +335 -0
- package/bundled-skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/bundled-skills/container-hardening/SKILL.md +126 -0
- package/bundled-skills/container-registries/SKILL.md +435 -0
- package/bundled-skills/container-scanning/SKILL.md +416 -0
- package/bundled-skills/convex-backend/SKILL.md +338 -0
- package/bundled-skills/dast-scanning/SKILL.md +437 -0
- package/bundled-skills/database-backups/SKILL.md +425 -0
- package/bundled-skills/datadog/SKILL.md +487 -0
- package/bundled-skills/dependency-scanning/SKILL.md +457 -0
- package/bundled-skills/devcontainers-nix/SKILL.md +416 -0
- package/bundled-skills/disaster-recovery/SKILL.md +374 -0
- package/bundled-skills/disaster-recovery/references/details.md +219 -0
- package/bundled-skills/dns-management/SKILL.md +375 -0
- package/bundled-skills/docker-compose/SKILL.md +482 -0
- package/bundled-skills/docker-management/SKILL.md +426 -0
- package/bundled-skills/ebpf-observability/SKILL.md +436 -0
- package/bundled-skills/ebpf-observability/references/details.md +542 -0
- package/bundled-skills/elk-stack/SKILL.md +487 -0
- package/bundled-skills/enterprise-vpn-attack/SKILL.md +395 -0
- package/bundled-skills/evidence-hygiene/SKILL.md +404 -0
- package/bundled-skills/feature-flags/SKILL.md +426 -0
- package/bundled-skills/feature-flags/references/details.md +86 -0
- package/bundled-skills/fedramp-compliance/SKILL.md +453 -0
- package/bundled-skills/firebase-app-platform/SKILL.md +381 -0
- package/bundled-skills/firewall-config/SKILL.md +479 -0
- package/bundled-skills/gcp-audit-logs/SKILL.md +452 -0
- package/bundled-skills/gcp-audit-logs/references/details.md +56 -0
- package/bundled-skills/gcp-cloud-functions/SKILL.md +284 -0
- package/bundled-skills/gcp-cloud-sql/SKILL.md +277 -0
- package/bundled-skills/gcp-compute/SKILL.md +319 -0
- package/bundled-skills/gcp-gke/SKILL.md +307 -0
- package/bundled-skills/gcp-networking/SKILL.md +293 -0
- package/bundled-skills/gcp-secret-manager/SKILL.md +421 -0
- package/bundled-skills/gcp-secret-manager/references/details.md +131 -0
- package/bundled-skills/gdpr-compliance/SKILL.md +451 -0
- package/bundled-skills/gdpr-compliance/references/details.md +145 -0
- package/bundled-skills/geo-audit/SKILL.md +368 -0
- package/bundled-skills/geo-brand-mentions/SKILL.md +68 -0
- package/bundled-skills/geo-brand-mentions/references/details.md +471 -0
- package/bundled-skills/geo-citability/SKILL.md +350 -0
- package/bundled-skills/geo-compare/SKILL.md +340 -0
- package/bundled-skills/geo-content/SKILL.md +383 -0
- package/bundled-skills/geo-crawlers/SKILL.md +408 -0
- package/bundled-skills/geo-llmstxt/SKILL.md +464 -0
- package/bundled-skills/geo-platform-optimizer/SKILL.md +314 -0
- package/bundled-skills/geo-proposal/SKILL.md +378 -0
- package/bundled-skills/geo-prospect/SKILL.md +225 -0
- package/bundled-skills/geo-report/SKILL.md +436 -0
- package/bundled-skills/geo-report-pdf/SKILL.md +157 -0
- package/bundled-skills/geo-schema/SKILL.md +408 -0
- package/bundled-skills/geo-technical/SKILL.md +78 -0
- package/bundled-skills/geo-technical/references/details.md +543 -0
- package/bundled-skills/git-workflow/SKILL.md +460 -0
- package/bundled-skills/github-actions/SKILL.md +368 -0
- package/bundled-skills/gitlab-ci/SKILL.md +340 -0
- package/bundled-skills/google-no-code/SKILL.md +136 -0
- package/bundled-skills/gpu-kubernetes-operations/SKILL.md +468 -0
- package/bundled-skills/gpu-server-management/SKILL.md +236 -0
- package/bundled-skills/hashicorp-vault/SKILL.md +408 -0
- package/bundled-skills/helm-charts/SKILL.md +469 -0
- package/bundled-skills/hipaa-compliance/SKILL.md +451 -0
- package/bundled-skills/hunt-aspnet/SKILL.md +321 -0
- package/bundled-skills/hunt-ato/SKILL.md +184 -0
- package/bundled-skills/hunt-auth-bypass/SKILL.md +426 -0
- package/bundled-skills/hunt-auth-bypass/references/details.md +80 -0
- package/bundled-skills/hunt-brute-force/SKILL.md +341 -0
- package/bundled-skills/hunt-business-logic/SKILL.md +281 -0
- package/bundled-skills/hunt-cache-poison/SKILL.md +382 -0
- package/bundled-skills/hunt-captcha-bypass/SKILL.md +136 -0
- package/bundled-skills/hunt-cicd/SKILL.md +311 -0
- package/bundled-skills/hunt-clickjacking/SKILL.md +110 -0
- package/bundled-skills/hunt-cors/SKILL.md +335 -0
- package/bundled-skills/hunt-dom/SKILL.md +323 -0
- package/bundled-skills/hunt-exceptional-conditions/SKILL.md +111 -0
- package/bundled-skills/hunt-file-upload/SKILL.md +202 -0
- package/bundled-skills/hunt-fintech-graphql/SKILL.md +289 -0
- package/bundled-skills/hunt-forgot-password/SKILL.md +114 -0
- package/bundled-skills/hunt-grpc/SKILL.md +317 -0
- package/bundled-skills/hunt-host-header/SKILL.md +309 -0
- package/bundled-skills/hunt-html-injection/SKILL.md +106 -0
- package/bundled-skills/hunt-http-smuggling/SKILL.md +129 -0
- package/bundled-skills/hunt-http-smuggling/references/phase2h-smuggling-cachepoison.md +177 -0
- package/bundled-skills/hunt-idor/SKILL.md +434 -0
- package/bundled-skills/hunt-jwt-crypto/SKILL.md +221 -0
- package/bundled-skills/hunt-k8s/SKILL.md +337 -0
- package/bundled-skills/hunt-laravel/SKILL.md +255 -0
- package/bundled-skills/hunt-ldap/SKILL.md +351 -0
- package/bundled-skills/hunt-lfi/SKILL.md +311 -0
- package/bundled-skills/hunt-llm-ai/SKILL.md +289 -0
- package/bundled-skills/hunt-mfa-bypass/SKILL.md +177 -0
- package/bundled-skills/hunt-misc/SKILL.md +378 -0
- package/bundled-skills/hunt-nextjs/SKILL.md +299 -0
- package/bundled-skills/hunt-nodejs/SKILL.md +263 -0
- package/bundled-skills/hunt-nosqli/SKILL.md +210 -0
- package/bundled-skills/hunt-ntlm-info/SKILL.md +314 -0
- package/bundled-skills/hunt-oauth/SKILL.md +459 -0
- package/bundled-skills/hunt-open-redirect/SKILL.md +223 -0
- package/bundled-skills/hunt-race-condition/SKILL.md +381 -0
- package/bundled-skills/hunt-race-condition/references/details.md +159 -0
- package/bundled-skills/hunt-rag-vector/SKILL.md +212 -0
- package/bundled-skills/hunt-rce/SKILL.md +444 -0
- package/bundled-skills/hunt-rce/references/details.md +110 -0
- package/bundled-skills/hunt-saml/SKILL.md +156 -0
- package/bundled-skills/hunt-session/SKILL.md +342 -0
- package/bundled-skills/hunt-shadow-api/SKILL.md +198 -0
- package/bundled-skills/hunt-source-leak/SKILL.md +345 -0
- package/bundled-skills/hunt-spa-api/SKILL.md +163 -0
- package/bundled-skills/hunt-springboot/SKILL.md +285 -0
- package/bundled-skills/hunt-sqli/SKILL.md +466 -0
- package/bundled-skills/hunt-ssrf/SKILL.md +396 -0
- package/bundled-skills/hunt-ssrf/references/details.md +179 -0
- package/bundled-skills/hunt-ssti/SKILL.md +163 -0
- package/bundled-skills/hunt-subdomain/SKILL.md +379 -0
- package/bundled-skills/hunt-tls-network/SKILL.md +399 -0
- package/bundled-skills/hunt-xxe/SKILL.md +466 -0
- package/bundled-skills/i-have-adhd/SKILL.md +170 -0
- package/bundled-skills/idea-evaluator/SKILL.md +75 -0
- package/bundled-skills/idea-evaluator/idea-evaluator-con/SKILL.md +64 -0
- package/bundled-skills/idea-evaluator/idea-evaluator-pro/SKILL.md +64 -0
- package/bundled-skills/identity-access-management/SKILL.md +382 -0
- package/bundled-skills/identity-access-management/references/details.md +524 -0
- package/bundled-skills/incident-management/SKILL.md +484 -0
- package/bundled-skills/incident-response/SKILL.md +448 -0
- package/bundled-skills/incident-response/references/details.md +113 -0
- package/bundled-skills/interview-me/SKILL.md +248 -0
- package/bundled-skills/iso27001-compliance/SKILL.md +460 -0
- package/bundled-skills/jenkins/SKILL.md +462 -0
- package/bundled-skills/jev-use/SKILL.md +158 -0
- package/bundled-skills/kubernetes-hardening/SKILL.md +154 -0
- package/bundled-skills/kubernetes-ops/SKILL.md +449 -0
- package/bundled-skills/kubernetes-ops/references/details.md +108 -0
- package/bundled-skills/kustomize/SKILL.md +478 -0
- package/bundled-skills/ledger-tasks-yylo/SKILL.md +219 -0
- package/bundled-skills/linux-administration/SKILL.md +367 -0
- package/bundled-skills/linux-hardening/SKILL.md +154 -0
- package/bundled-skills/llm-app-security/SKILL.md +389 -0
- package/bundled-skills/llm-app-security/references/details.md +674 -0
- package/bundled-skills/llm-caching/SKILL.md +334 -0
- package/bundled-skills/llm-cost-optimization/SKILL.md +311 -0
- package/bundled-skills/llm-fine-tuning/SKILL.md +329 -0
- package/bundled-skills/llm-gateway/SKILL.md +282 -0
- package/bundled-skills/llm-inference-scaling/SKILL.md +286 -0
- package/bundled-skills/llmops-platform-engineering/SKILL.md +472 -0
- package/bundled-skills/load-balancing/SKILL.md +403 -0
- package/bundled-skills/loki-logging/SKILL.md +479 -0
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
- package/bundled-skills/m365-entra-attack/SKILL.md +423 -0
- package/bundled-skills/mac-mini-llm-lab/SKILL.md +350 -0
- package/bundled-skills/mcp-server-security/SKILL.md +356 -0
- package/bundled-skills/mcp-server-security/references/details.md +745 -0
- package/bundled-skills/mdm-device-management/SKILL.md +404 -0
- package/bundled-skills/mdm-device-management/references/details.md +410 -0
- package/bundled-skills/meme-coin-audit/SKILL.md +402 -0
- package/bundled-skills/mid-engagement-ir-detection/SKILL.md +377 -0
- package/bundled-skills/model-registry-governance/SKILL.md +452 -0
- package/bundled-skills/model-serving-kubernetes/SKILL.md +339 -0
- package/bundled-skills/model-supply-chain-security/SKILL.md +427 -0
- package/bundled-skills/mongodb/SKILL.md +436 -0
- package/bundled-skills/multi-tenant-llm-hosting/SKILL.md +435 -0
- package/bundled-skills/multi-tenant-llm-hosting/references/details.md +211 -0
- package/bundled-skills/mysql/SKILL.md +390 -0
- package/bundled-skills/new-relic/SKILL.md +472 -0
- package/bundled-skills/nfs-storage/SKILL.md +356 -0
- package/bundled-skills/object-storage/SKILL.md +378 -0
- package/bundled-skills/offensive-osint/SKILL.md +443 -0
- package/bundled-skills/okta-attack/SKILL.md +436 -0
- package/bundled-skills/ollama-stack/SKILL.md +379 -0
- package/bundled-skills/openclaw-deployment-hardening/SKILL.md +135 -0
- package/bundled-skills/openclaw-local-mac-mini/SKILL.md +426 -0
- package/bundled-skills/openclaw-local-mac-mini/references/details.md +221 -0
- package/bundled-skills/openclaw-security-hardening/SKILL.md +135 -0
- package/bundled-skills/openshift/SKILL.md +485 -0
- package/bundled-skills/opentelemetry/SKILL.md +438 -0
- package/bundled-skills/opentelemetry/references/details.md +78 -0
- package/bundled-skills/opentofu-migration/SKILL.md +349 -0
- package/bundled-skills/osint-methodology/SKILL.md +460 -0
- package/bundled-skills/osint-methodology/references/details.md +1350 -0
- package/bundled-skills/pci-dss-compliance/SKILL.md +446 -0
- package/bundled-skills/penetration-testing/SKILL.md +152 -0
- package/bundled-skills/performance-tuning/SKILL.md +381 -0
- package/bundled-skills/plan-ledger-tasks-yylo/SKILL.md +52 -0
- package/bundled-skills/planetscale/SKILL.md +297 -0
- package/bundled-skills/platform-engineering/SKILL.md +348 -0
- package/bundled-skills/platform-engineering/references/details.md +944 -0
- package/bundled-skills/podman/SKILL.md +405 -0
- package/bundled-skills/policy-as-code/SKILL.md +434 -0
- package/bundled-skills/policy-as-code/references/details.md +204 -0
- package/bundled-skills/postgresql-devsec/SKILL.md +378 -0
- package/bundled-skills/prometheus-grafana/SKILL.md +469 -0
- package/bundled-skills/prompt-injection-defense/SKILL.md +483 -0
- package/bundled-skills/rag-infrastructure/SKILL.md +269 -0
- package/bundled-skills/rag-observability-evals/SKILL.md +444 -0
- package/bundled-skills/rag-observability-evals/references/details.md +92 -0
- package/bundled-skills/ralph-loop-yylo/SKILL.md +55 -0
- package/bundled-skills/ralph-loop-yylo/references/first_check.md +18 -0
- package/bundled-skills/ralph-loop-yylo/references/implement.md +60 -0
- package/bundled-skills/recon-scope-triage/SKILL.md +128 -0
- package/bundled-skills/redis/SKILL.md +421 -0
- package/bundled-skills/redteam-report-template/SKILL.md +370 -0
- package/bundled-skills/report-writing/SKILL.md +426 -0
- package/bundled-skills/report-writing/references/details.md +187 -0
- package/bundled-skills/resumable-implementation-contracts/SKILL.md +254 -0
- package/bundled-skills/reverse-proxy/SKILL.md +420 -0
- package/bundled-skills/runbook-creation/SKILL.md +438 -0
- package/bundled-skills/runbook-creation/references/details.md +71 -0
- package/bundled-skills/saas-security-posture/SKILL.md +415 -0
- package/bundled-skills/sast-scanning/SKILL.md +444 -0
- package/bundled-skills/sbom-supply-chain/SKILL.md +433 -0
- package/bundled-skills/security-arsenal/SKILL.md +446 -0
- package/bundled-skills/security-arsenal/references/details.md +540 -0
- package/bundled-skills/security-automation/SKILL.md +146 -0
- package/bundled-skills/semantic-versioning/SKILL.md +434 -0
- package/bundled-skills/semantic-versioning/references/details.md +83 -0
- package/bundled-skills/service-mesh/SKILL.md +422 -0
- package/bundled-skills/soc2-compliance/SKILL.md +409 -0
- package/bundled-skills/sops-encryption/SKILL.md +124 -0
- package/bundled-skills/sre-dashboards/SKILL.md +143 -0
- package/bundled-skills/ssh-configuration/SKILL.md +324 -0
- package/bundled-skills/ssl-tls-management/SKILL.md +428 -0
- package/bundled-skills/ssl-tls-management/references/details.md +99 -0
- package/bundled-skills/startup-it-troubleshooting/SKILL.md +415 -0
- package/bundled-skills/supply-chain-attack-recon/SKILL.md +453 -0
- package/bundled-skills/supply-chain-attack-recon/references/details.md +258 -0
- package/bundled-skills/systemd-services/SKILL.md +379 -0
- package/bundled-skills/terraform-aws/SKILL.md +125 -0
- package/bundled-skills/terraform-azure/SKILL.md +415 -0
- package/bundled-skills/terraform-azure/references/details.md +231 -0
- package/bundled-skills/terraform-gcp/SKILL.md +369 -0
- package/bundled-skills/threat-modeling/SKILL.md +487 -0
- package/bundled-skills/understand-project-yylo/SKILL.md +62 -0
- package/bundled-skills/user-management/SKILL.md +383 -0
- package/bundled-skills/using-agent-skills/SKILL.md +220 -0
- package/bundled-skills/vector-database-ops/SKILL.md +300 -0
- package/bundled-skills/vendor-management/SKILL.md +439 -0
- package/bundled-skills/vendor-management/references/details.md +109 -0
- package/bundled-skills/vercel-deployments/SKILL.md +296 -0
- package/bundled-skills/vllm-server/SKILL.md +236 -0
- package/bundled-skills/vmware-vcenter-attack/SKILL.md +412 -0
- package/bundled-skills/vpn-setup/SKILL.md +452 -0
- package/bundled-skills/vulnerability-scanning/SKILL.md +448 -0
- package/bundled-skills/waf-setup/SKILL.md +354 -0
- package/bundled-skills/waf-setup/references/details.md +211 -0
- package/bundled-skills/weather-model-data-fetching/SKILL.md +277 -0
- package/bundled-skills/weather-observation-fetching/SKILL.md +246 -0
- package/bundled-skills/web2-recon/SKILL.md +440 -0
- package/bundled-skills/web2-recon/references/details.md +319 -0
- package/bundled-skills/web3-audit/SKILL.md +445 -0
- package/bundled-skills/web3-audit/references/details.md +224 -0
- package/bundled-skills/wiki-yylo/SKILL.md +114 -0
- package/bundled-skills/windows-hardening/SKILL.md +454 -0
- package/bundled-skills/windows-hardening/references/details.md +204 -0
- package/bundled-skills/windows-server/SKILL.md +318 -0
- package/bundled-skills/workflow-yylo/SKILL.md +107 -0
- package/bundled-skills/zero-trust/SKILL.md +461 -0
- package/package.json +1 -1
- package/skills_index.json +6924 -0
|
@@ -0,0 +1,944 @@
|
|
|
1
|
+
# Details (moved from SKILL.md)
|
|
2
|
+
|
|
3
|
+
> Extended reference content for `platform-engineering`, kept under `references/` so the entrypoint stays within the audit budget.
|
|
4
|
+
|
|
5
|
+
## 4. Golden Paths
|
|
6
|
+
|
|
7
|
+
Golden paths are opinionated, well-supported paths through your tech stack that teams can follow to ship quickly.
|
|
8
|
+
|
|
9
|
+
### Backstage Software Template
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
# template-nodejs-service.yaml
|
|
13
|
+
apiVersion: scaffolder.backstage.io/v1beta3
|
|
14
|
+
kind: Template
|
|
15
|
+
metadata:
|
|
16
|
+
name: nodejs-service
|
|
17
|
+
title: Node.js Microservice
|
|
18
|
+
description: Create a production-ready Node.js service with CI/CD, monitoring, and Kubernetes manifests.
|
|
19
|
+
tags:
|
|
20
|
+
- recommended
|
|
21
|
+
- nodejs
|
|
22
|
+
spec:
|
|
23
|
+
owner: platform-team
|
|
24
|
+
type: service
|
|
25
|
+
parameters:
|
|
26
|
+
- title: Service Details
|
|
27
|
+
required:
|
|
28
|
+
- name
|
|
29
|
+
- owner
|
|
30
|
+
- system
|
|
31
|
+
properties:
|
|
32
|
+
name:
|
|
33
|
+
title: Service Name
|
|
34
|
+
type: string
|
|
35
|
+
pattern: "^[a-z0-9-]+$"
|
|
36
|
+
ui:autofocus: true
|
|
37
|
+
description:
|
|
38
|
+
title: Description
|
|
39
|
+
type: string
|
|
40
|
+
owner:
|
|
41
|
+
title: Owner Team
|
|
42
|
+
type: string
|
|
43
|
+
ui:field: OwnerPicker
|
|
44
|
+
ui:options:
|
|
45
|
+
catalogFilter:
|
|
46
|
+
kind: Group
|
|
47
|
+
system:
|
|
48
|
+
title: System
|
|
49
|
+
type: string
|
|
50
|
+
ui:field: EntityPicker
|
|
51
|
+
ui:options:
|
|
52
|
+
catalogFilter:
|
|
53
|
+
kind: System
|
|
54
|
+
- title: Infrastructure
|
|
55
|
+
properties:
|
|
56
|
+
database:
|
|
57
|
+
title: Database
|
|
58
|
+
type: string
|
|
59
|
+
enum: ["none", "postgres", "mysql"]
|
|
60
|
+
default: "none"
|
|
61
|
+
cacheLayer:
|
|
62
|
+
title: Cache
|
|
63
|
+
type: string
|
|
64
|
+
enum: ["none", "redis"]
|
|
65
|
+
default: "none"
|
|
66
|
+
environment:
|
|
67
|
+
title: Target Environment
|
|
68
|
+
type: string
|
|
69
|
+
enum: ["dev", "staging", "prod"]
|
|
70
|
+
default: "dev"
|
|
71
|
+
steps:
|
|
72
|
+
- id: fetch-template
|
|
73
|
+
name: Fetch Skeleton
|
|
74
|
+
action: fetch:template
|
|
75
|
+
input:
|
|
76
|
+
url: ./skeleton
|
|
77
|
+
values:
|
|
78
|
+
name: ${{ parameters.name }}
|
|
79
|
+
owner: ${{ parameters.owner }}
|
|
80
|
+
system: ${{ parameters.system }}
|
|
81
|
+
description: ${{ parameters.description }}
|
|
82
|
+
database: ${{ parameters.database }}
|
|
83
|
+
cacheLayer: ${{ parameters.cacheLayer }}
|
|
84
|
+
- id: publish
|
|
85
|
+
name: Publish to GitHub
|
|
86
|
+
action: publish:github
|
|
87
|
+
input:
|
|
88
|
+
allowedHosts: ["github.com"]
|
|
89
|
+
repoUrl: github.com?owner=myorg&repo=${{ parameters.name }}
|
|
90
|
+
repoVisibility: internal
|
|
91
|
+
defaultBranch: main
|
|
92
|
+
protectDefaultBranch: true
|
|
93
|
+
requireCodeOwnerReviews: true
|
|
94
|
+
- id: create-argocd-app
|
|
95
|
+
name: Register with ArgoCD
|
|
96
|
+
action: argocd:create-resources
|
|
97
|
+
input:
|
|
98
|
+
appName: ${{ parameters.name }}
|
|
99
|
+
argoInstance: main
|
|
100
|
+
namespace: ${{ parameters.name }}
|
|
101
|
+
repoUrl: https://github.com/myorg/${{ parameters.name }}
|
|
102
|
+
path: deploy/k8s
|
|
103
|
+
- id: register
|
|
104
|
+
name: Register in Catalog
|
|
105
|
+
action: catalog:register
|
|
106
|
+
input:
|
|
107
|
+
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
|
|
108
|
+
catalogInfoPath: /catalog-info.yaml
|
|
109
|
+
output:
|
|
110
|
+
links:
|
|
111
|
+
- title: Repository
|
|
112
|
+
url: ${{ steps.publish.output.remoteUrl }}
|
|
113
|
+
- title: Open in Backstage
|
|
114
|
+
icon: catalog
|
|
115
|
+
entityRef: ${{ steps.register.output.entityRef }}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Cookiecutter Template Structure
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
golden-path-nodejs/
|
|
122
|
+
cookiecutter.json
|
|
123
|
+
{{cookiecutter.service_name}}/
|
|
124
|
+
Dockerfile
|
|
125
|
+
package.json
|
|
126
|
+
tsconfig.json
|
|
127
|
+
src/
|
|
128
|
+
index.ts
|
|
129
|
+
health.ts
|
|
130
|
+
deploy/
|
|
131
|
+
k8s/
|
|
132
|
+
deployment.yaml
|
|
133
|
+
service.yaml
|
|
134
|
+
ingress.yaml
|
|
135
|
+
.github/
|
|
136
|
+
workflows/
|
|
137
|
+
ci.yaml
|
|
138
|
+
deploy.yaml
|
|
139
|
+
catalog-info.yaml
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
// cookiecutter.json
|
|
144
|
+
{
|
|
145
|
+
"service_name": "my-service",
|
|
146
|
+
"description": "A new microservice",
|
|
147
|
+
"owner_team": "platform",
|
|
148
|
+
"port": "3000",
|
|
149
|
+
"database": ["none", "postgres", "mysql"],
|
|
150
|
+
"node_version": "18"
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
## 5. Service Catalog
|
|
158
|
+
|
|
159
|
+
### catalog-info.yaml for a Microservice
|
|
160
|
+
|
|
161
|
+
```yaml
|
|
162
|
+
# catalog-info.yaml
|
|
163
|
+
apiVersion: backstage.io/v1alpha1
|
|
164
|
+
kind: Component
|
|
165
|
+
metadata:
|
|
166
|
+
name: orders-service
|
|
167
|
+
description: Handles order creation, fulfillment, and tracking.
|
|
168
|
+
annotations:
|
|
169
|
+
backstage.io/techdocs-ref: dir:.
|
|
170
|
+
github.com/project-slug: myorg/orders-service
|
|
171
|
+
backstage.io/kubernetes-id: orders-service
|
|
172
|
+
backstage.io/kubernetes-namespace: team-commerce
|
|
173
|
+
argocd/app-name: orders-service
|
|
174
|
+
pagerduty.com/integration-key: ${PAGERDUTY_KEY}
|
|
175
|
+
grafana/dashboard-selector: "app=orders-service"
|
|
176
|
+
tags:
|
|
177
|
+
- nodejs
|
|
178
|
+
- grpc
|
|
179
|
+
links:
|
|
180
|
+
- url: https://grafana.internal/d/orders-service
|
|
181
|
+
title: Grafana Dashboard
|
|
182
|
+
icon: dashboard
|
|
183
|
+
- url: https://runbooks.internal/orders-service
|
|
184
|
+
title: Runbook
|
|
185
|
+
icon: docs
|
|
186
|
+
spec:
|
|
187
|
+
type: service
|
|
188
|
+
lifecycle: production
|
|
189
|
+
owner: team-commerce
|
|
190
|
+
system: commerce-platform
|
|
191
|
+
providesApis:
|
|
192
|
+
- orders-api
|
|
193
|
+
consumesApis:
|
|
194
|
+
- inventory-api
|
|
195
|
+
- payments-api
|
|
196
|
+
dependsOn:
|
|
197
|
+
- resource:orders-db
|
|
198
|
+
- resource:orders-cache
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### API Entity
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
# orders-api.yaml
|
|
205
|
+
apiVersion: backstage.io/v1alpha1
|
|
206
|
+
kind: API
|
|
207
|
+
metadata:
|
|
208
|
+
name: orders-api
|
|
209
|
+
description: Order management API
|
|
210
|
+
annotations:
|
|
211
|
+
backstage.io/techdocs-ref: dir:.
|
|
212
|
+
spec:
|
|
213
|
+
type: openapi
|
|
214
|
+
lifecycle: production
|
|
215
|
+
owner: team-commerce
|
|
216
|
+
system: commerce-platform
|
|
217
|
+
definition:
|
|
218
|
+
$text: ./api/openapi.yaml
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### TechDocs Configuration
|
|
222
|
+
|
|
223
|
+
```yaml
|
|
224
|
+
# mkdocs.yml (in the service repo root)
|
|
225
|
+
site_name: Orders Service
|
|
226
|
+
site_description: Technical documentation for the Orders Service
|
|
227
|
+
nav:
|
|
228
|
+
- Home: index.md
|
|
229
|
+
- Architecture: architecture.md
|
|
230
|
+
- API Reference: api-reference.md
|
|
231
|
+
- Runbook: runbook.md
|
|
232
|
+
- ADRs:
|
|
233
|
+
- adr/001-choose-grpc.md
|
|
234
|
+
- adr/002-event-sourcing.md
|
|
235
|
+
|
|
236
|
+
plugins:
|
|
237
|
+
- techdocs-core
|
|
238
|
+
|
|
239
|
+
markdown_extensions:
|
|
240
|
+
- admonition
|
|
241
|
+
- pymdownx.details
|
|
242
|
+
- pymdownx.superfences:
|
|
243
|
+
custom_fences:
|
|
244
|
+
- name: mermaid
|
|
245
|
+
class: mermaid
|
|
246
|
+
format: !!python/name:pymdownx.superfences.fence_code_format
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Enable TechDocs in `app-config.yaml`:
|
|
250
|
+
|
|
251
|
+
```yaml
|
|
252
|
+
techdocs:
|
|
253
|
+
builder: external
|
|
254
|
+
generator:
|
|
255
|
+
runIn: docker
|
|
256
|
+
publisher:
|
|
257
|
+
type: awsS3
|
|
258
|
+
awsS3:
|
|
259
|
+
bucketName: myorg-techdocs
|
|
260
|
+
region: us-east-1
|
|
261
|
+
credentials:
|
|
262
|
+
roleArn: arn:aws:iam::123456789012:role/techdocs-publisher
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
## 6. Developer Portal -- Backstage Plugins
|
|
269
|
+
|
|
270
|
+
### Kubernetes Plugin
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# Install Kubernetes plugin
|
|
274
|
+
yarn --cwd packages/app add @backstage/plugin-kubernetes
|
|
275
|
+
yarn --cwd packages/backend add @backstage/plugin-kubernetes-backend
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Backend configuration in `app-config.yaml`:
|
|
279
|
+
|
|
280
|
+
```yaml
|
|
281
|
+
kubernetes:
|
|
282
|
+
serviceLocatorMethod:
|
|
283
|
+
type: multiTenant
|
|
284
|
+
clusterLocatorMethods:
|
|
285
|
+
- type: config
|
|
286
|
+
clusters:
|
|
287
|
+
- url: https://k8s-dev.internal:6443
|
|
288
|
+
name: dev-cluster
|
|
289
|
+
authProvider: serviceAccount
|
|
290
|
+
serviceAccountToken: ${K8S_DEV_TOKEN}
|
|
291
|
+
skipTLSVerify: false
|
|
292
|
+
caData: ${K8S_DEV_CA_DATA}
|
|
293
|
+
- url: https://k8s-prod.internal:6443
|
|
294
|
+
name: prod-cluster
|
|
295
|
+
authProvider: serviceAccount
|
|
296
|
+
serviceAccountToken: ${K8S_PROD_TOKEN}
|
|
297
|
+
skipTLSVerify: false
|
|
298
|
+
caData: ${K8S_PROD_CA_DATA}
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### CI/CD Plugin (GitHub Actions)
|
|
302
|
+
|
|
303
|
+
```yaml
|
|
304
|
+
# app-config.yaml addition
|
|
305
|
+
proxy:
|
|
306
|
+
endpoints:
|
|
307
|
+
/github-actions:
|
|
308
|
+
target: https://api.github.com
|
|
309
|
+
headers:
|
|
310
|
+
Authorization: Bearer ${GITHUB_TOKEN}
|
|
311
|
+
Accept: application/vnd.github+json
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Monitoring Plugin (Grafana)
|
|
315
|
+
|
|
316
|
+
```yaml
|
|
317
|
+
# app-config.yaml addition
|
|
318
|
+
grafana:
|
|
319
|
+
domain: https://grafana.internal
|
|
320
|
+
unifiedAlerting: true
|
|
321
|
+
proxy:
|
|
322
|
+
endpoints:
|
|
323
|
+
/grafana/api:
|
|
324
|
+
target: https://grafana.internal
|
|
325
|
+
headers:
|
|
326
|
+
Authorization: Bearer ${GRAFANA_API_TOKEN}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
## 7. Score Specification
|
|
333
|
+
|
|
334
|
+
[Score](https://score.dev) provides a platform-agnostic workload specification so developers describe what they need, and the platform decides how to provision it.
|
|
335
|
+
|
|
336
|
+
### score.yaml
|
|
337
|
+
|
|
338
|
+
```yaml
|
|
339
|
+
# score.yaml
|
|
340
|
+
apiVersion: score.dev/v1b1
|
|
341
|
+
metadata:
|
|
342
|
+
name: orders-service
|
|
343
|
+
tags:
|
|
344
|
+
team: commerce
|
|
345
|
+
tier: critical
|
|
346
|
+
|
|
347
|
+
containers:
|
|
348
|
+
main:
|
|
349
|
+
image: .
|
|
350
|
+
variables:
|
|
351
|
+
PORT: "3000"
|
|
352
|
+
DB_HOST: ${resources.db.host}
|
|
353
|
+
DB_PORT: ${resources.db.port}
|
|
354
|
+
DB_NAME: ${resources.db.name}
|
|
355
|
+
DB_USER: ${resources.db.username}
|
|
356
|
+
DB_PASSWORD: ${resources.db.password}
|
|
357
|
+
CACHE_HOST: ${resources.cache.host}
|
|
358
|
+
CACHE_PORT: ${resources.cache.port}
|
|
359
|
+
ports:
|
|
360
|
+
http:
|
|
361
|
+
port: 3000
|
|
362
|
+
protocol: TCP
|
|
363
|
+
readinessProbe:
|
|
364
|
+
httpGet:
|
|
365
|
+
path: /healthz
|
|
366
|
+
port: 3000
|
|
367
|
+
livenessProbe:
|
|
368
|
+
httpGet:
|
|
369
|
+
path: /healthz
|
|
370
|
+
port: 3000
|
|
371
|
+
resources:
|
|
372
|
+
limits:
|
|
373
|
+
cpu: "500m"
|
|
374
|
+
memory: "512Mi"
|
|
375
|
+
requests:
|
|
376
|
+
cpu: "100m"
|
|
377
|
+
memory: "128Mi"
|
|
378
|
+
|
|
379
|
+
resources:
|
|
380
|
+
db:
|
|
381
|
+
type: postgres
|
|
382
|
+
properties:
|
|
383
|
+
host:
|
|
384
|
+
port:
|
|
385
|
+
name:
|
|
386
|
+
default: orders
|
|
387
|
+
username:
|
|
388
|
+
password:
|
|
389
|
+
cache:
|
|
390
|
+
type: redis
|
|
391
|
+
properties:
|
|
392
|
+
host:
|
|
393
|
+
port:
|
|
394
|
+
dns:
|
|
395
|
+
type: dns
|
|
396
|
+
properties:
|
|
397
|
+
host:
|
|
398
|
+
sqs:
|
|
399
|
+
type: aws-sqs
|
|
400
|
+
properties:
|
|
401
|
+
queue_url:
|
|
402
|
+
arn:
|
|
403
|
+
|
|
404
|
+
service:
|
|
405
|
+
ports:
|
|
406
|
+
http:
|
|
407
|
+
port: 80
|
|
408
|
+
targetPort: 3000
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### Generating Platform-Specific Manifests
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
# Install score-compose for local development
|
|
415
|
+
brew install score-spec/tap/score-compose
|
|
416
|
+
|
|
417
|
+
# Generate docker-compose from score.yaml
|
|
418
|
+
score-compose init
|
|
419
|
+
score-compose generate score.yaml
|
|
420
|
+
|
|
421
|
+
# Install score-k8s for Kubernetes targets
|
|
422
|
+
brew install score-spec/tap/score-k8s
|
|
423
|
+
|
|
424
|
+
# Generate Kubernetes manifests from score.yaml
|
|
425
|
+
score-k8s init
|
|
426
|
+
score-k8s generate score.yaml
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
## 8. Self-Service Workflows
|
|
433
|
+
|
|
434
|
+
### Terraform Module Exposed via Platform API
|
|
435
|
+
|
|
436
|
+
```hcl
|
|
437
|
+
# modules/environment/main.tf
|
|
438
|
+
variable "team_name" {
|
|
439
|
+
type = string
|
|
440
|
+
description = "Name of the requesting team"
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
variable "environment" {
|
|
444
|
+
type = string
|
|
445
|
+
description = "Environment tier"
|
|
446
|
+
validation {
|
|
447
|
+
condition = contains(["dev", "staging", "prod"], var.environment)
|
|
448
|
+
error_message = "Environment must be dev, staging, or prod."
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
variable "services" {
|
|
453
|
+
type = list(object({
|
|
454
|
+
name = string
|
|
455
|
+
port = number
|
|
456
|
+
replicas = number
|
|
457
|
+
}))
|
|
458
|
+
description = "List of services to deploy"
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
module "namespace" {
|
|
462
|
+
source = "../k8s-namespace"
|
|
463
|
+
name = "${var.team_name}-${var.environment}"
|
|
464
|
+
labels = {
|
|
465
|
+
"platform.myorg.io/team" = var.team_name
|
|
466
|
+
"platform.myorg.io/environment" = var.environment
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
module "network_policy" {
|
|
471
|
+
source = "../network-policy"
|
|
472
|
+
namespace = module.namespace.name
|
|
473
|
+
allow_ingress_from = [
|
|
474
|
+
"istio-system",
|
|
475
|
+
"monitoring"
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
module "resource_quota" {
|
|
480
|
+
source = "../resource-quota"
|
|
481
|
+
namespace = module.namespace.name
|
|
482
|
+
cpu_limit = var.environment == "prod" ? "16" : "4"
|
|
483
|
+
mem_limit = var.environment == "prod" ? "32Gi" : "8Gi"
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
module "database" {
|
|
487
|
+
for_each = { for s in var.services : s.name => s if lookup(s, "database", false) }
|
|
488
|
+
source = "../rds-instance"
|
|
489
|
+
name = "${var.team_name}-${each.key}"
|
|
490
|
+
engine = "postgres"
|
|
491
|
+
environment = var.environment
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
output "namespace" {
|
|
495
|
+
value = module.namespace.name
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
output "kubeconfig_command" {
|
|
499
|
+
value = "kubectl config set-context ${var.team_name}-${var.environment} --namespace=${module.namespace.name}"
|
|
500
|
+
}
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
### Environment Request CRD (Kubernetes Operator Pattern)
|
|
504
|
+
|
|
505
|
+
```yaml
|
|
506
|
+
# environment-request.yaml
|
|
507
|
+
apiVersion: platform.myorg.io/v1alpha1
|
|
508
|
+
kind: EnvironmentRequest
|
|
509
|
+
metadata:
|
|
510
|
+
name: commerce-staging
|
|
511
|
+
namespace: platform-system
|
|
512
|
+
spec:
|
|
513
|
+
team: commerce
|
|
514
|
+
environment: staging
|
|
515
|
+
ttl: 72h # auto-cleanup for non-prod
|
|
516
|
+
services:
|
|
517
|
+
- name: orders-service
|
|
518
|
+
port: 3000
|
|
519
|
+
replicas: 2
|
|
520
|
+
database: true
|
|
521
|
+
- name: inventory-service
|
|
522
|
+
port: 3001
|
|
523
|
+
replicas: 2
|
|
524
|
+
database: true
|
|
525
|
+
- name: frontend
|
|
526
|
+
port: 8080
|
|
527
|
+
replicas: 1
|
|
528
|
+
database: false
|
|
529
|
+
notifications:
|
|
530
|
+
slack: "#team-commerce-platform"
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
### Backstage Self-Service Action (Custom Plugin)
|
|
534
|
+
|
|
535
|
+
```typescript
|
|
536
|
+
// plugins/platform-actions/src/actions/provision-environment.ts
|
|
537
|
+
import { createTemplateAction } from '@backstage/plugin-scaffolder-node';
|
|
538
|
+
import { Config } from '@backstage/config';
|
|
539
|
+
|
|
540
|
+
export const provisionEnvironmentAction = (config: Config) => {
|
|
541
|
+
return createTemplateAction<{
|
|
542
|
+
team: string;
|
|
543
|
+
environment: string;
|
|
544
|
+
services: Array<{ name: string; port: number; replicas: number }>;
|
|
545
|
+
}>({
|
|
546
|
+
id: 'platform:provision-environment',
|
|
547
|
+
description: 'Provisions a complete environment for a team',
|
|
548
|
+
schema: {
|
|
549
|
+
input: {
|
|
550
|
+
type: 'object',
|
|
551
|
+
required: ['team', 'environment'],
|
|
552
|
+
properties: {
|
|
553
|
+
team: { type: 'string', title: 'Team Name' },
|
|
554
|
+
environment: {
|
|
555
|
+
type: 'string',
|
|
556
|
+
title: 'Environment',
|
|
557
|
+
enum: ['dev', 'staging', 'prod'],
|
|
558
|
+
},
|
|
559
|
+
services: {
|
|
560
|
+
type: 'array',
|
|
561
|
+
title: 'Services',
|
|
562
|
+
items: {
|
|
563
|
+
type: 'object',
|
|
564
|
+
properties: {
|
|
565
|
+
name: { type: 'string' },
|
|
566
|
+
port: { type: 'number' },
|
|
567
|
+
replicas: { type: 'number' },
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
},
|
|
574
|
+
async handler(ctx) {
|
|
575
|
+
const { team, environment, services } = ctx.input;
|
|
576
|
+
const platformApiUrl = config.getString('platform.apiUrl');
|
|
577
|
+
|
|
578
|
+
ctx.logger.info(`Provisioning ${environment} for team ${team}`);
|
|
579
|
+
|
|
580
|
+
const response = await fetch(`${platformApiUrl}/environments`, {
|
|
581
|
+
method: 'POST',
|
|
582
|
+
headers: { 'Content-Type': 'application/json' },
|
|
583
|
+
body: JSON.stringify({ team, environment, services }),
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
if (!response.ok) {
|
|
587
|
+
throw new Error(`Provisioning failed: ${response.statusText}`);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
const result = await response.json();
|
|
591
|
+
ctx.logger.info(`Environment ready: ${result.namespace}`);
|
|
592
|
+
ctx.output('namespace', result.namespace);
|
|
593
|
+
ctx.output('dashboardUrl', result.dashboardUrl);
|
|
594
|
+
},
|
|
595
|
+
});
|
|
596
|
+
};
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
---
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
## 9. Platform Metrics
|
|
603
|
+
|
|
604
|
+
### DORA Metrics Collection (Prometheus)
|
|
605
|
+
|
|
606
|
+
```yaml
|
|
607
|
+
# prometheus-rules-dora.yaml
|
|
608
|
+
apiVersion: monitoring.coreos.com/v1
|
|
609
|
+
kind: PrometheusRule
|
|
610
|
+
metadata:
|
|
611
|
+
name: dora-metrics
|
|
612
|
+
namespace: monitoring
|
|
613
|
+
spec:
|
|
614
|
+
groups:
|
|
615
|
+
- name: dora.deployment_frequency
|
|
616
|
+
interval: 1h
|
|
617
|
+
rules:
|
|
618
|
+
- record: dora:deployment_frequency:rate1d
|
|
619
|
+
expr: |
|
|
620
|
+
sum by (team, service) (
|
|
621
|
+
increase(argocd_app_sync_total{phase="Succeeded"}[1d])
|
|
622
|
+
)
|
|
623
|
+
- record: dora:deployment_frequency:rate7d
|
|
624
|
+
expr: |
|
|
625
|
+
sum by (team, service) (
|
|
626
|
+
increase(argocd_app_sync_total{phase="Succeeded"}[7d])
|
|
627
|
+
) / 7
|
|
628
|
+
|
|
629
|
+
- name: dora.lead_time
|
|
630
|
+
interval: 1h
|
|
631
|
+
rules:
|
|
632
|
+
- record: dora:lead_time_seconds:avg
|
|
633
|
+
expr: |
|
|
634
|
+
avg by (team, service) (
|
|
635
|
+
github_workflow_duration_seconds{workflow="deploy", status="success"}
|
|
636
|
+
)
|
|
637
|
+
|
|
638
|
+
- name: dora.change_failure_rate
|
|
639
|
+
interval: 1h
|
|
640
|
+
rules:
|
|
641
|
+
- record: dora:change_failure_rate:ratio
|
|
642
|
+
expr: |
|
|
643
|
+
sum by (team, service) (
|
|
644
|
+
increase(argocd_app_sync_total{phase="Failed"}[7d])
|
|
645
|
+
)
|
|
646
|
+
/
|
|
647
|
+
sum by (team, service) (
|
|
648
|
+
increase(argocd_app_sync_total[7d])
|
|
649
|
+
)
|
|
650
|
+
|
|
651
|
+
- name: dora.mttr
|
|
652
|
+
interval: 1h
|
|
653
|
+
rules:
|
|
654
|
+
- record: dora:mttr_seconds:avg
|
|
655
|
+
expr: |
|
|
656
|
+
avg by (team, service) (
|
|
657
|
+
pagerduty_incident_resolve_duration_seconds
|
|
658
|
+
)
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
### Grafana Dashboard (JSON Model Snippet)
|
|
662
|
+
|
|
663
|
+
```json
|
|
664
|
+
{
|
|
665
|
+
"dashboard": {
|
|
666
|
+
"title": "Platform Engineering -- DORA & Adoption",
|
|
667
|
+
"panels": [
|
|
668
|
+
{
|
|
669
|
+
"title": "Deployment Frequency (daily avg, 7d)",
|
|
670
|
+
"type": "stat",
|
|
671
|
+
"targets": [
|
|
672
|
+
{ "expr": "dora:deployment_frequency:rate7d", "legendFormat": "{{team}}/{{service}}" }
|
|
673
|
+
]
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"title": "Lead Time for Changes",
|
|
677
|
+
"type": "gauge",
|
|
678
|
+
"targets": [
|
|
679
|
+
{ "expr": "dora:lead_time_seconds:avg / 3600", "legendFormat": "{{team}} (hours)" }
|
|
680
|
+
]
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"title": "Change Failure Rate",
|
|
684
|
+
"type": "gauge",
|
|
685
|
+
"targets": [
|
|
686
|
+
{ "expr": "dora:change_failure_rate:ratio * 100", "legendFormat": "{{team}} %" }
|
|
687
|
+
],
|
|
688
|
+
"fieldConfig": {
|
|
689
|
+
"defaults": {
|
|
690
|
+
"thresholds": {
|
|
691
|
+
"steps": [
|
|
692
|
+
{ "color": "green", "value": 0 },
|
|
693
|
+
{ "color": "yellow", "value": 15 },
|
|
694
|
+
{ "color": "red", "value": 30 }
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"title": "Platform Adoption -- Scaffolded Repos",
|
|
702
|
+
"type": "timeseries",
|
|
703
|
+
"targets": [
|
|
704
|
+
{ "expr": "sum(backstage_scaffolder_task_count_total{status='completed'})", "legendFormat": "Total scaffolded" }
|
|
705
|
+
]
|
|
706
|
+
}
|
|
707
|
+
]
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
### Developer Experience Survey (Automated Collection)
|
|
713
|
+
|
|
714
|
+
```yaml
|
|
715
|
+
# cronjob-devex-survey.yaml
|
|
716
|
+
apiVersion: batch/v1
|
|
717
|
+
kind: CronJob
|
|
718
|
+
metadata:
|
|
719
|
+
name: devex-survey-reminder
|
|
720
|
+
namespace: platform-system
|
|
721
|
+
spec:
|
|
722
|
+
schedule: "0 10 1 */3 *" # quarterly, 1st of month at 10am
|
|
723
|
+
jobTemplate:
|
|
724
|
+
spec:
|
|
725
|
+
template:
|
|
726
|
+
spec:
|
|
727
|
+
containers:
|
|
728
|
+
- name: survey-bot
|
|
729
|
+
image: myorg/platform-bot:latest
|
|
730
|
+
env:
|
|
731
|
+
- name: SLACK_WEBHOOK
|
|
732
|
+
valueFrom:
|
|
733
|
+
secretKeyRef:
|
|
734
|
+
name: platform-bot-secrets
|
|
735
|
+
key: slack-webhook
|
|
736
|
+
- name: SURVEY_URL
|
|
737
|
+
value: "https://forms.internal/devex-q1"
|
|
738
|
+
command:
|
|
739
|
+
- /bin/sh
|
|
740
|
+
- -c
|
|
741
|
+
- |
|
|
742
|
+
curl -X POST "$SLACK_WEBHOOK" \
|
|
743
|
+
-H 'Content-Type: application/json' \
|
|
744
|
+
-d "{
|
|
745
|
+
\"text\": \"Hey team! It's time for our quarterly Developer Experience survey. Your feedback directly shapes platform priorities. Please take 5 minutes: ${SURVEY_URL}\"
|
|
746
|
+
}"
|
|
747
|
+
restartPolicy: OnFailure
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
---
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
## 10. Governance -- Policy Enforcement
|
|
754
|
+
|
|
755
|
+
### OPA/Gatekeeper Constraint Templates
|
|
756
|
+
|
|
757
|
+
```yaml
|
|
758
|
+
# constraint-template-approved-base-images.yaml
|
|
759
|
+
apiVersion: templates.gatekeeper.sh/v1
|
|
760
|
+
kind: ConstraintTemplate
|
|
761
|
+
metadata:
|
|
762
|
+
name: k8sapprovedbaseimages
|
|
763
|
+
spec:
|
|
764
|
+
crd:
|
|
765
|
+
spec:
|
|
766
|
+
names:
|
|
767
|
+
kind: K8sApprovedBaseImages
|
|
768
|
+
validation:
|
|
769
|
+
openAPIV3Schema:
|
|
770
|
+
type: object
|
|
771
|
+
properties:
|
|
772
|
+
allowedRegistries:
|
|
773
|
+
type: array
|
|
774
|
+
items:
|
|
775
|
+
type: string
|
|
776
|
+
targets:
|
|
777
|
+
- target: admission.k8s.gatekeeper.sh
|
|
778
|
+
rego: |
|
|
779
|
+
package k8sapprovedbaseimages
|
|
780
|
+
|
|
781
|
+
violation[{"msg": msg}] {
|
|
782
|
+
container := input.review.object.spec.containers[_]
|
|
783
|
+
not startswith_any(container.image, input.parameters.allowedRegistries)
|
|
784
|
+
msg := sprintf(
|
|
785
|
+
"Container '%s' uses image '%s' which is not from an approved registry. Allowed: %v",
|
|
786
|
+
[container.name, container.image, input.parameters.allowedRegistries]
|
|
787
|
+
)
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
startswith_any(str, prefixes) {
|
|
791
|
+
prefix := prefixes[_]
|
|
792
|
+
startswith(str, prefix)
|
|
793
|
+
}
|
|
794
|
+
---
|
|
795
|
+
apiVersion: constraints.gatekeeper.sh/v1beta1
|
|
796
|
+
kind: K8sApprovedBaseImages
|
|
797
|
+
metadata:
|
|
798
|
+
name: approved-registries
|
|
799
|
+
spec:
|
|
800
|
+
match:
|
|
801
|
+
kinds:
|
|
802
|
+
- apiGroups: [""]
|
|
803
|
+
kinds: ["Pod"]
|
|
804
|
+
namespaceSelector:
|
|
805
|
+
matchExpressions:
|
|
806
|
+
- key: platform.myorg.io/environment
|
|
807
|
+
operator: Exists
|
|
808
|
+
parameters:
|
|
809
|
+
allowedRegistries:
|
|
810
|
+
- "myorg.azurecr.io/"
|
|
811
|
+
- "gcr.io/myorg-"
|
|
812
|
+
- "public.ecr.aws/myorg/"
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
### Kyverno Policies
|
|
816
|
+
|
|
817
|
+
```yaml
|
|
818
|
+
# kyverno-require-labels.yaml
|
|
819
|
+
apiVersion: kyverno.io/v1
|
|
820
|
+
kind: ClusterPolicy
|
|
821
|
+
metadata:
|
|
822
|
+
name: require-platform-labels
|
|
823
|
+
annotations:
|
|
824
|
+
policies.kyverno.io/title: Require Platform Labels
|
|
825
|
+
policies.kyverno.io/description: >-
|
|
826
|
+
All workloads must include standard platform labels for
|
|
827
|
+
cost attribution, ownership tracking, and incident routing.
|
|
828
|
+
spec:
|
|
829
|
+
validationFailureAction: Enforce
|
|
830
|
+
background: true
|
|
831
|
+
rules:
|
|
832
|
+
- name: check-required-labels
|
|
833
|
+
match:
|
|
834
|
+
any:
|
|
835
|
+
- resources:
|
|
836
|
+
kinds:
|
|
837
|
+
- Deployment
|
|
838
|
+
- StatefulSet
|
|
839
|
+
- DaemonSet
|
|
840
|
+
validate:
|
|
841
|
+
message: >-
|
|
842
|
+
All workloads must have the labels: platform.myorg.io/team,
|
|
843
|
+
platform.myorg.io/environment, platform.myorg.io/cost-center.
|
|
844
|
+
Found labels: {{request.object.metadata.labels}}
|
|
845
|
+
pattern:
|
|
846
|
+
metadata:
|
|
847
|
+
labels:
|
|
848
|
+
platform.myorg.io/team: "?*"
|
|
849
|
+
platform.myorg.io/environment: "?*"
|
|
850
|
+
platform.myorg.io/cost-center: "?*"
|
|
851
|
+
- name: inject-default-security-context
|
|
852
|
+
match:
|
|
853
|
+
any:
|
|
854
|
+
- resources:
|
|
855
|
+
kinds:
|
|
856
|
+
- Pod
|
|
857
|
+
mutate:
|
|
858
|
+
patchStrategicMerge:
|
|
859
|
+
spec:
|
|
860
|
+
securityContext:
|
|
861
|
+
runAsNonRoot: true
|
|
862
|
+
seccompProfile:
|
|
863
|
+
type: RuntimeDefault
|
|
864
|
+
containers:
|
|
865
|
+
- (name): "*"
|
|
866
|
+
securityContext:
|
|
867
|
+
allowPrivilegeEscalation: false
|
|
868
|
+
readOnlyRootFilesystem: true
|
|
869
|
+
capabilities:
|
|
870
|
+
drop:
|
|
871
|
+
- ALL
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
### Platform-Level Network Policies
|
|
875
|
+
|
|
876
|
+
```yaml
|
|
877
|
+
# network-policy-platform-defaults.yaml
|
|
878
|
+
apiVersion: networking.k8s.io/v1
|
|
879
|
+
kind: NetworkPolicy
|
|
880
|
+
metadata:
|
|
881
|
+
name: platform-default-deny
|
|
882
|
+
namespace: "{{namespace}}"
|
|
883
|
+
spec:
|
|
884
|
+
podSelector: {}
|
|
885
|
+
policyTypes:
|
|
886
|
+
- Ingress
|
|
887
|
+
- Egress
|
|
888
|
+
ingress:
|
|
889
|
+
- from:
|
|
890
|
+
- namespaceSelector:
|
|
891
|
+
matchLabels:
|
|
892
|
+
platform.myorg.io/system: ingress-gateway
|
|
893
|
+
- namespaceSelector:
|
|
894
|
+
matchLabels:
|
|
895
|
+
platform.myorg.io/system: monitoring
|
|
896
|
+
podSelector:
|
|
897
|
+
matchLabels:
|
|
898
|
+
app: prometheus
|
|
899
|
+
egress:
|
|
900
|
+
- to:
|
|
901
|
+
- namespaceSelector: {}
|
|
902
|
+
podSelector:
|
|
903
|
+
matchLabels:
|
|
904
|
+
k8s-app: kube-dns
|
|
905
|
+
ports:
|
|
906
|
+
- protocol: UDP
|
|
907
|
+
port: 53
|
|
908
|
+
- protocol: TCP
|
|
909
|
+
port: 53
|
|
910
|
+
- to:
|
|
911
|
+
- namespaceSelector:
|
|
912
|
+
matchLabels:
|
|
913
|
+
name: "{{namespace}}"
|
|
914
|
+
- to:
|
|
915
|
+
- ipBlock:
|
|
916
|
+
cidr: 0.0.0.0/0
|
|
917
|
+
except:
|
|
918
|
+
- 10.0.0.0/8
|
|
919
|
+
- 172.16.0.0/12
|
|
920
|
+
- 192.168.0.0/16
|
|
921
|
+
ports:
|
|
922
|
+
- protocol: TCP
|
|
923
|
+
port: 443
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
---
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
## Summary
|
|
930
|
+
|
|
931
|
+
A well-built internal developer platform combines these layers:
|
|
932
|
+
|
|
933
|
+
| Layer | Tools | Purpose |
|
|
934
|
+
|---|---|---|
|
|
935
|
+
| Portal | Backstage | Single pane of glass for developers |
|
|
936
|
+
| Catalog | catalog-info.yaml, APIs | Discoverability and ownership |
|
|
937
|
+
| Golden Paths | Software Templates, Cookiecutter | Fast, standardized project scaffolding |
|
|
938
|
+
| Self-Service Infra | Crossplane, Terraform | Declarative cloud resource provisioning |
|
|
939
|
+
| Workload Spec | Score | Platform-agnostic app definitions |
|
|
940
|
+
| Governance | OPA, Kyverno, Network Policies | Automated policy enforcement |
|
|
941
|
+
| Metrics | DORA, DevEx surveys | Measure platform value and adoption |
|
|
942
|
+
|
|
943
|
+
The platform team ships the platform as a product. Developers are the customers. Measure success by adoption, not by mandate.
|
|
944
|
+
|