|
| 1 | +#!/usr/bin/env python3 |
| 2 | +""" |
| 3 | +DevOps-OS: Process-First Ideology |
| 4 | +
|
| 5 | +cloudenginelabs.io is a process-first SDLC automation company. |
| 6 | +This module educates users on what "Process First" means, how it maps |
| 7 | +to DevOps-OS tooling, and provides beginner tips for further learning. |
| 8 | +""" |
| 9 | + |
| 10 | +import argparse |
| 11 | +import sys |
| 12 | + |
| 13 | + |
| 14 | +# --------------------------------------------------------------------------- |
| 15 | +# Content |
| 16 | +# --------------------------------------------------------------------------- |
| 17 | + |
| 18 | +PROCESS_FIRST_SUMMARY = """\ |
| 19 | +╔══════════════════════════════════════════════════════════════════════════════╗ |
| 20 | +║ 🔄 PROCESS-FIRST | cloudenginelabs.io ║ |
| 21 | +╚══════════════════════════════════════════════════════════════════════════════╝ |
| 22 | +
|
| 23 | + "Tools are only as good as the processes that govern them." |
| 24 | + — Saravanan Gnanagur, Founder, CloudEngineLabs |
| 25 | +
|
| 26 | +""" |
| 27 | + |
| 28 | +WHAT_IS_PROCESS_FIRST = """\ |
| 29 | +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
| 30 | + WHAT IS PROCESS-FIRST? |
| 31 | +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
| 32 | +
|
| 33 | + Process-First is an engineering philosophy that places well-defined, |
| 34 | + repeatable SDLC (Software Development Life Cycle) processes at the |
| 35 | + centre of every engineering decision — before selecting tools, platforms, |
| 36 | + or frameworks. |
| 37 | +
|
| 38 | + Core principles: |
| 39 | +
|
| 40 | + 1. DEFINE before you BUILD |
| 41 | + Document the "why" and "what" of every workflow before writing a |
| 42 | + single line of pipeline code. |
| 43 | +
|
| 44 | + 2. STANDARDISE before you SCALE |
| 45 | + Create golden-path templates (CI/CD, GitOps, SRE) that every team |
| 46 | + can adopt without reinventing the wheel. |
| 47 | +
|
| 48 | + 3. AUTOMATE what is REPEATABLE |
| 49 | + If a process is done more than twice, automate it. Automation |
| 50 | + should encode the process, not bypass it. |
| 51 | +
|
| 52 | + 4. OBSERVE and ITERATE |
| 53 | + Every automated process must produce measurable outcomes (SLOs, |
| 54 | + SLAs, error budgets) so teams can improve continuously. |
| 55 | +
|
| 56 | + 5. CULTURE over TOOLING |
| 57 | + Processes exist to create shared understanding and accountability. |
| 58 | + The right culture makes any toolchain succeed; the wrong culture |
| 59 | + makes the best toolchain fail. |
| 60 | +
|
| 61 | +""" |
| 62 | + |
| 63 | +MAPPING_TO_TOOLING = """\ |
| 64 | +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
| 65 | + HOW PROCESS-FIRST MAPS TO DEVOPS-OS TOOLING |
| 66 | +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
| 67 | +
|
| 68 | + ┌─────────────────────────────┬──────────────────────────────────────────┐ |
| 69 | + │ Process-First Principle │ DevOps-OS Tooling │ |
| 70 | + ├─────────────────────────────┼──────────────────────────────────────────┤ |
| 71 | + │ Define before you build │ `devopsos scaffold cicd/gha/gitlab` │ |
| 72 | + │ │ Interactive wizards capture intent │ |
| 73 | + │ │ before generating any config file. │ |
| 74 | + ├─────────────────────────────┼──────────────────────────────────────────┤ |
| 75 | + │ Standardise before scale │ Golden-path scaffold templates for │ |
| 76 | + │ │ GitHub Actions, GitLab CI, Jenkins, │ |
| 77 | + │ │ ArgoCD, and Flux ensure every team │ |
| 78 | + │ │ starts from a reviewed baseline. │ |
| 79 | + ├─────────────────────────────┼──────────────────────────────────────────┤ |
| 80 | + │ Automate the repeatable │ `devopsos scaffold argocd` encodes │ |
| 81 | + │ │ the GitOps sync process as code; │ |
| 82 | + │ │ `devopsos scaffold devcontainer` │ |
| 83 | + │ │ encodes the dev-environment setup. │ |
| 84 | + ├─────────────────────────────┼──────────────────────────────────────────┤ |
| 85 | + │ Observe and iterate │ `devopsos scaffold sre` generates │ |
| 86 | + │ │ Prometheus rules, Grafana dashboards, │ |
| 87 | + │ │ and SLO manifests to close the │ |
| 88 | + │ │ measure-improve feedback loop. │ |
| 89 | + ├─────────────────────────────┼──────────────────────────────────────────┤ |
| 90 | + │ Culture over tooling │ MCP server skills let AI assistants │ |
| 91 | + │ │ (Claude, ChatGPT) coach engineers on │ |
| 92 | + │ │ DevOps best practices — not just │ |
| 93 | + │ │ generate config files. │ |
| 94 | + └─────────────────────────────┴──────────────────────────────────────────┘ |
| 95 | +
|
| 96 | +""" |
| 97 | + |
| 98 | +BEGINNER_TIPS = """\ |
| 99 | +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
| 100 | + TIPS FOR DEVOPS BEGINNERS — LEARN MORE WITH AI TOOLS |
| 101 | +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
| 102 | +
|
| 103 | + Use AI tools like Claude, ChatGPT, or Gemini to deepen your understanding |
| 104 | + of process-first DevOps. Here are prompts you can try right now: |
| 105 | +
|
| 106 | + 📌 Understanding the ideology |
| 107 | + "Explain the process-first approach to SDLC automation and why |
| 108 | + defining processes before choosing tools leads to better outcomes." |
| 109 | +
|
| 110 | + 📌 CI/CD pipelines |
| 111 | + "What are the key stages of a production-grade CI/CD pipeline? Give |
| 112 | + me a process checklist before I start writing any pipeline code." |
| 113 | +
|
| 114 | + 📌 GitOps and ArgoCD |
| 115 | + "Walk me through the GitOps process: from code commit to production |
| 116 | + deployment using ArgoCD. What processes must exist before ArgoCD |
| 117 | + adds value?" |
| 118 | +
|
| 119 | + 📌 SRE fundamentals |
| 120 | + "What is the SRE process for setting SLOs and error budgets? |
| 121 | + How do I translate business requirements into Prometheus alert rules?" |
| 122 | +
|
| 123 | + 📌 Dev Containers |
| 124 | + "What developer-environment standardisation process should a team |
| 125 | + follow before adopting Dev Containers?" |
| 126 | +
|
| 127 | + 📌 Further reading (ask your AI assistant for summaries of) |
| 128 | + • The DevOps Handbook — Gene Kim et al. |
| 129 | + • Site Reliability Engineering — Google SRE book (sre.google/books) |
| 130 | + • Accelerate — Nicole Forsgren et al. |
| 131 | + • LinkedIn posts by Saravanan Gnanagur on process-first DevOps |
| 132 | + (search: "Saravanan Gnanagur process first" on LinkedIn) |
| 133 | +
|
| 134 | + 💡 Pro tip — Use DevOps-OS with AI: |
| 135 | + Install the DevOps-OS MCP server, connect it to Claude or ChatGPT, |
| 136 | + and ask: |
| 137 | + "Using the DevOps-OS tools, scaffold a process-first CI/CD setup |
| 138 | + for a Python microservice with GitOps delivery and SRE observability." |
| 139 | +
|
| 140 | +""" |
| 141 | + |
| 142 | +USAGE_FOOTER = """\ |
| 143 | +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
| 144 | + HOW TO USE THIS COMMAND |
| 145 | +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ |
| 146 | +
|
| 147 | + python -m cli.devopsos process-first # full overview (this output) |
| 148 | + python -m cli.devopsos process-first --section what # 5 core principles only |
| 149 | + python -m cli.devopsos process-first --section mapping # devopsos scaffold command map |
| 150 | + python -m cli.devopsos process-first --section tips # AI prompts for beginners |
| 151 | + python -m cli.devopsos process-first --help # full option reference |
| 152 | +
|
| 153 | + You can also run the standalone module: |
| 154 | +
|
| 155 | + python -m cli.process_first [--section what|mapping|tips|all] |
| 156 | +
|
| 157 | + 📖 Full docs: docs/PROCESS-FIRST.md |
| 158 | +
|
| 159 | +""" |
| 160 | + |
| 161 | +FULL_TEXT = ( |
| 162 | + PROCESS_FIRST_SUMMARY |
| 163 | + + WHAT_IS_PROCESS_FIRST |
| 164 | + + MAPPING_TO_TOOLING |
| 165 | + + BEGINNER_TIPS |
| 166 | +) |
| 167 | + |
| 168 | + |
| 169 | +# --------------------------------------------------------------------------- |
| 170 | +# Section helpers (used by --section flag) |
| 171 | +# --------------------------------------------------------------------------- |
| 172 | + |
| 173 | +SECTIONS = { |
| 174 | + "what": PROCESS_FIRST_SUMMARY + WHAT_IS_PROCESS_FIRST, |
| 175 | + "mapping": PROCESS_FIRST_SUMMARY + MAPPING_TO_TOOLING, |
| 176 | + "tips": PROCESS_FIRST_SUMMARY + BEGINNER_TIPS, |
| 177 | + "all": FULL_TEXT + USAGE_FOOTER, |
| 178 | +} |
| 179 | + |
| 180 | + |
| 181 | +# --------------------------------------------------------------------------- |
| 182 | +# Display logic |
| 183 | +# --------------------------------------------------------------------------- |
| 184 | + |
| 185 | +def display(section: str = "all") -> None: |
| 186 | + """Print the requested section to stdout.""" |
| 187 | + if section not in SECTIONS: |
| 188 | + raise ValueError(f"Unknown section '{section}'. Choose from: {', '.join(SECTIONS)}") |
| 189 | + print(SECTIONS[section]) |
| 190 | + |
| 191 | + |
| 192 | +# --------------------------------------------------------------------------- |
| 193 | +# Argument parsing |
| 194 | +# --------------------------------------------------------------------------- |
| 195 | + |
| 196 | +def parse_arguments(argv=None): |
| 197 | + parser = argparse.ArgumentParser( |
| 198 | + description="Learn about the Process-First SDLC philosophy and how it maps to DevOps-OS tooling.", |
| 199 | + ) |
| 200 | + parser.add_argument( |
| 201 | + "--section", |
| 202 | + choices=list(SECTIONS.keys()), |
| 203 | + default="all", |
| 204 | + help=( |
| 205 | + "Which section to display: " |
| 206 | + "'what' (ideology overview), " |
| 207 | + "'mapping' (tooling map), " |
| 208 | + "'tips' (beginner AI prompts), " |
| 209 | + "or 'all' (default)." |
| 210 | + ), |
| 211 | + ) |
| 212 | + return parser.parse_args(argv) |
| 213 | + |
| 214 | + |
| 215 | +# --------------------------------------------------------------------------- |
| 216 | +# Entry point |
| 217 | +# --------------------------------------------------------------------------- |
| 218 | + |
| 219 | +def main(argv=None): |
| 220 | + args = parse_arguments(argv) |
| 221 | + display(args.section) |
| 222 | + |
| 223 | + |
| 224 | +if __name__ == "__main__": |
| 225 | + main() |
0 commit comments