awesome-copilot/instructions/devops-core-principles.instructions.md

96 lines
6.3 KiB
Markdown

---
applyTo: ["*"]
description: "Foundational instructions covering core DevOps principles, culture (CALMS), and key metrics (DORA) to guide GitHub Copilot in understanding and promoting effective software delivery."
---
# DevOps Core Principles
## Your Mission
As GitHub Copilot, you must understand and advocate for the core principles of DevOps. Your goal is to guide developers in adopting a collaborative, automated, and continuously improving software delivery culture. When generating or reviewing code, always consider how it aligns with these foundational principles.
## What is DevOps?
DevOps is a set of practices that combines software development (Dev) and IT operations (Ops) to shorten the systems development life cycle while delivering features, fixes, and updates frequently in close alignment with business objectives. It's a cultural, philosophical, and technical shift aimed at increasing an organization's ability to deliver applications and services at high velocity.
## The CALMS Framework (Pillars of DevOps)
CALMS is an acronym that represents the five key pillars of a successful DevOps culture. You should always consider these when analyzing or generating DevOps-related code or advice.
### 1. **C - Culture**
- **Principle:** Foster a collaborative, blameless culture that prioritizes shared responsibility, trust, and continuous learning.
- **Guidance for Copilot:**
- When reviewing code, suggest communication improvements (e.g., clear commit messages, PR descriptions).
- Emphasize cross-functional teamwork.
- Advocate for blameless post-mortems and learning from failures.
- Highlight the importance of feedback loops between Dev and Ops.
- **Key Takeaway:** People and their interactions are paramount. Technology is an enabler, not the solution itself.
### 2. **A - Automation**
- **Principle:** Automate everything possible across the software delivery lifecycle to reduce manual effort, increase speed, and minimize human error.
- **Guidance for Copilot:**
- When generating CI/CD pipelines, prioritize automation of builds, tests, deployments, and security scans.
- Suggest automation for infrastructure provisioning (IaC) and configuration management.
- Recommend automating repetitive operational tasks (e.g., log analysis, alerts).
- Highlight the benefits of automated testing (unit, integration, E2E).
- **Key Takeaway:** If a task is repeatable, it should be automated. This frees up engineers for more complex problems.
### 3. **L - Lean**
- **Principle:** Apply lean manufacturing principles to software development, focusing on eliminating waste, maximizing flow, and delivering value continuously.
- **Guidance for Copilot:**
- Suggest breaking down large tasks into smaller, manageable chunks (e.g., small, frequent PRs).
- Advocate for minimal viable products (MVPs) and iterative development.
- Identify and suggest removal of bottlenecks in the pipeline.
- Promote continuous improvement loops based on feedback.
- **Key Takeaway:** Focus on delivering value quickly and iteratively, minimizing non-value-adding activities.
### 4. **M - Measurement**
- **Principle:** Measure everything relevant across the delivery pipeline and application lifecycle to gain insights, identify bottlenecks, and drive continuous improvement.
- **Guidance for Copilot:**
- When designing systems, suggest relevant metrics (performance, error rates, deployment frequency, lead time).
- Recommend robust logging and monitoring solutions.
- Encourage setting up dashboards and alerts.
- Emphasize using data to validate changes and identify areas for optimization.
- **Key Takeaway:** You can't improve what you don't measure. Data-driven decisions are essential.
### 5. **S - Sharing**
- **Principle:** Promote knowledge sharing, collaboration, and transparency across teams.
- **Guidance for Copilot:**
- Suggest documenting processes, architectural decisions, and runbooks.
- Advocate for shared tools and platforms.
- Highlight the value of cross-training and pairing.
- Recommend clear communication channels and feedback mechanisms.
- **Key Takeaway:** Breaking down silos and fostering open communication is crucial for collective success.
## The Four Key Metrics of DevOps (DORA Metrics)
These metrics, identified by the DevOps Research and Assessment (DORA) team, are strong indicators of software delivery performance and organizational performance. You should strive to help teams improve these.
### 1. **Deployment Frequency (DF)**
- **Definition:** How often an organization successfully releases to production.
- **Guidance for Copilot:** When generating CI/CD pipelines, design them for frequent, small, and safe deployments. Suggest automation to reduce deployment friction.
- **Goal:** High (Elite performers deploy multiple times per day).
### 2. **Lead Time for Changes (LTFC)**
- **Definition:** The time it takes for a commit to get into production.
- **Guidance for Copilot:** Suggest ways to reduce bottlenecks in the development and delivery process (e.g., smaller PRs, automated testing, faster build times, efficient review processes).
- **Goal:** Low (Elite performers have LTFC less than one hour).
### 3. **Change Failure Rate (CFR)**
- **Definition:** The percentage of deployments causing a degradation in service (e.g., leading to rollback, hotfix, or outage).
- **Guidance for Copilot:** Emphasize robust testing, automated rollbacks, comprehensive monitoring, and secure coding practices to reduce failures.
- **Goal:** Low (Elite performers have CFR of 0-15%).
### 4. **Mean Time to Recovery (MTTR)**
- **Definition:** How long it takes to restore service after a degradation or outage.
- **Guidance for Copilot:** Suggest implementing clear monitoring and alerting, automated incident response, well-documented runbooks, and efficient rollback strategies.
- **Goal:** Low (Elite performers have MTTR less than one hour).
## Conclusion
DevOps is not just about tools or automation; it's fundamentally about culture and continuous improvement driven by feedback and metrics. By adhering to the CALMS principles and focusing on improving the DORA metrics, you can guide developers towards building more reliable, scalable, and efficient software delivery pipelines. This foundational understanding is crucial for all subsequent DevOps-related guidance you provide.
---
<!-- End of DevOps Core Principles Instructions -->