Skip to content

Commit 38052b7

Browse files
Copilotchefgs
andcommitted
Add dedicated Containerization and Kubernetes wizard groups, add podman support
Co-authored-by: chefgs <7605658+chefgs@users.noreply.github.com>
1 parent f3ec150 commit 38052b7

4 files changed

Lines changed: 107 additions & 42 deletions

File tree

cli/devopsos.py

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def init(
3838
# ── Canonical tool lists ──────────────────────────────────────────────
3939
ALL_LANGUAGES = ["python", "java", "node", "ruby", "csharp", "php", "rust",
4040
"typescript", "kotlin", "c", "cpp", "javascript", "go"]
41-
ALL_CICD = ["docker", "terraform", "kubectl", "helm", "github_actions", "jenkins"]
41+
ALL_CICD = ["docker", "podman", "terraform", "kubectl", "helm", "github_actions", "jenkins"]
4242
ALL_KUBERNETES = ["k9s", "kustomize", "argocd_cli", "lens", "kubeseal",
4343
"flux", "kind", "minikube", "openshift_cli"]
4444
ALL_BUILD_TOOLS = ["gradle", "maven", "ant", "make", "cmake"]
@@ -58,29 +58,30 @@ def init(
5858
"choices": ALL_LANGUAGES,
5959
"description": "Programming languages for your project",
6060
},
61+
"Containerization [CONTAINER stage]": {
62+
"choices": ["docker", "podman"],
63+
"description": "Container runtimes to build, ship, and run application images",
64+
},
6165
"Build Tools [BUILD stage]": {
62-
"choices": ["docker", "gradle", "maven", "ant", "make", "cmake", "nexus"],
66+
"choices": ["gradle", "maven", "ant", "make", "cmake", "nexus"],
6367
"description": "Tools to compile, package, and store build artifacts",
6468
},
6569
"Test & Quality [TEST stage]": {
6670
"choices": ["sonarqube", "checkstyle", "pmd", "eslint", "pylint"],
6771
"description": "Static analysis and quality gates to enforce standards early",
6872
},
69-
"IaC & Infrastructure [IaC stage]": {
70-
"choices": ["terraform", "kubectl", "helm", "kustomize"],
71-
"description": "Infrastructure as Code tools for reproducible environments",
73+
"Kubernetes [KUBERNETES stage]": {
74+
"choices": ["kubectl", "helm", "kustomize", "k9s", "argocd_cli",
75+
"flux", "kind", "minikube", "lens", "kubeseal", "openshift_cli"],
76+
"description": "Kubernetes CLI tools, GitOps engines, and local cluster runtimes",
7277
},
73-
"Deploy & GitOps [DEPLOY stage]": {
74-
"choices": ["github_actions", "jenkins", "argocd_cli", "flux"],
75-
"description": "CI/CD pipelines and GitOps delivery tools",
78+
"CI/CD & Deploy [DEPLOY stage]": {
79+
"choices": ["github_actions", "jenkins", "terraform"],
80+
"description": "CI/CD pipelines, IaC provisioning, and deployment automation",
7681
},
7782
"SRE & Monitoring [SRE/MONITORING stage]": {
78-
"choices": ["prometheus", "grafana", "elk", "k9s"],
79-
"description": "Observability stack: metrics, dashboards, and logs",
80-
},
81-
"Security & Kubernetes Dev [SECURITY stage]": {
82-
"choices": ["kubeseal", "lens", "kind", "minikube", "openshift_cli"],
83-
"description": "Secret management, security scanning, and local K8s dev tools",
83+
"choices": ["prometheus", "grafana", "elk"],
84+
"description": "Observability stack: metrics, dashboards, and centralised logs",
8485
},
8586
}
8687

@@ -110,34 +111,35 @@ def init(
110111
# output for backward compatibility.
111112
def _sel(group): return selected_by_group.get(group, [])
112113

114+
container_sel = _sel("Containerization [CONTAINER stage]")
113115
build_sel = _sel("Build Tools [BUILD stage]")
114116
test_sel = _sel("Test & Quality [TEST stage]")
115-
iac_sel = _sel("IaC & Infrastructure [IaC stage]")
116-
deploy_sel = _sel("Deploy & GitOps [DEPLOY stage]")
117+
k8s_sel = _sel("Kubernetes [KUBERNETES stage]")
118+
deploy_sel = _sel("CI/CD & Deploy [DEPLOY stage]")
117119
sre_sel = _sel("SRE & Monitoring [SRE/MONITORING stage]")
118-
security_sel = _sel("Security & Kubernetes Dev [SECURITY stage]")
119120
lang_sel = _sel("Languages")
120121

121122
config = {
122123
"languages": {opt: opt in lang_sel for opt in ALL_LANGUAGES},
123124
"cicd": {
124-
"docker": "docker" in build_sel,
125-
"terraform": "terraform" in iac_sel,
126-
"kubectl": "kubectl" in iac_sel,
127-
"helm": "helm" in iac_sel,
125+
"docker": "docker" in container_sel,
126+
"podman": "podman" in container_sel,
127+
"terraform": "terraform" in deploy_sel,
128+
"kubectl": "kubectl" in k8s_sel,
129+
"helm": "helm" in k8s_sel,
128130
"github_actions": "github_actions" in deploy_sel,
129131
"jenkins": "jenkins" in deploy_sel,
130132
},
131133
"kubernetes": {
132-
"k9s": "k9s" in sre_sel,
133-
"kustomize": "kustomize" in iac_sel,
134-
"argocd_cli": "argocd_cli" in deploy_sel,
135-
"lens": "lens" in security_sel,
136-
"kubeseal": "kubeseal" in security_sel,
137-
"flux": "flux" in deploy_sel,
138-
"kind": "kind" in security_sel,
139-
"minikube": "minikube" in security_sel,
140-
"openshift_cli": "openshift_cli" in security_sel,
134+
"k9s": "k9s" in k8s_sel,
135+
"kustomize": "kustomize" in k8s_sel,
136+
"argocd_cli": "argocd_cli" in k8s_sel,
137+
"lens": "lens" in k8s_sel,
138+
"kubeseal": "kubeseal" in k8s_sel,
139+
"flux": "flux" in k8s_sel,
140+
"kind": "kind" in k8s_sel,
141+
"minikube": "minikube" in k8s_sel,
142+
"openshift_cli": "openshift_cli" in k8s_sel,
141143
},
142144
"build_tools": {opt: opt in build_sel for opt in ALL_BUILD_TOOLS},
143145
"code_analysis": {opt: opt in test_sel for opt in ALL_CODE_ANALYSIS},
@@ -180,9 +182,10 @@ def _sel(group): return selected_by_group.get(group, [])
180182
}
181183
for lang, arg in lang_map.items():
182184
build_args[arg] = str(config["languages"].get(lang, False)).lower()
183-
# CICD
185+
# CICD (includes container runtimes docker/podman)
184186
cicd_map = {
185-
"docker": "INSTALL_DOCKER", "terraform": "INSTALL_TERRAFORM",
187+
"docker": "INSTALL_DOCKER", "podman": "INSTALL_PODMAN",
188+
"terraform": "INSTALL_TERRAFORM",
186189
"kubectl": "INSTALL_KUBECTL", "helm": "INSTALL_HELM",
187190
"github_actions": "INSTALL_GITHUB_ACTIONS", "jenkins": "INSTALL_JENKINS"
188191
}

cli/process_first.py

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@
107107
│ │ ArgoCD, and Flux ensure every team │
108108
│ │ starts from a reviewed baseline. │
109109
├─────────────────────────────┼──────────────────────────────────────────┤
110+
│ Standardise the container │ `devopsos scaffold devcontainer` │
111+
│ runtime & Kubernetes env │ encodes Docker/Podman runtime choice │
112+
│ │ and all Kubernetes CLI tools (kubectl, │
113+
│ │ helm, kustomize, argocd_cli, flux, │
114+
│ │ k9s, kind, minikube, kubeseal …) into a │
115+
│ │ reproducible devcontainer.json so every │
116+
│ │ engineer starts from the same baseline. │
117+
├─────────────────────────────┼──────────────────────────────────────────┤
110118
│ Automate the repeatable │ `devopsos scaffold argocd` encodes │
111119
│ │ the GitOps sync process as code; │
112120
│ │ `devopsos scaffold devcontainer` │
@@ -180,12 +188,42 @@
180188
🔨 BUILD
181189
────────
182190
• Define build standards and conventions before choosing tools
183-
(Docker, Gradle, Maven, Make).
184-
• Standardise base images and dependency management across all teams.
185-
• Enforce reproducible builds with version-pinned dependencies.
191+
(Gradle, Maven, Make).
192+
• Standardise dependency management and enforce version-pinned builds.
193+
• Enforce reproducible builds across all teams and environments.
186194
• Use an artifact repository (Nexus) to cache, version, and audit
187195
build outputs.
188196
197+
🐳 CONTAINERIZATION
198+
────────────────────
199+
• Choose and document your container runtime (Docker or Podman) before
200+
writing the first Dockerfile — consistency prevents environment drift.
201+
• Standardise base images across all services: use a pinned, minimal
202+
base image (e.g. distroless or Alpine) and update it on a schedule.
203+
• Define a container image naming and tagging convention (e.g.
204+
<registry>/<org>/<service>:<gitsha>) before the first build.
205+
• Scan every image for vulnerabilities during the CI build stage —
206+
never push an unscanned image to a shared registry.
207+
• Use multi-stage Dockerfiles to keep production images small and
208+
free of build-time dependencies.
209+
• Configure your dev environment with `devopsos scaffold devcontainer`
210+
to standardise the container runtime for every team member.
211+
212+
☸️ KUBERNETES
213+
──────────────
214+
• Define Kubernetes cluster topology and namespace strategy before
215+
deploying any workload.
216+
• Use a local cluster (kind or minikube) for development so that
217+
every engineer can reproduce production-like conditions locally.
218+
• Manage all manifests through version-controlled Kustomize overlays
219+
or Helm charts — no kubectl apply from a developer laptop in production.
220+
• Use GitOps (ArgoCD or Flux) as the single path to deploy and update
221+
workloads; direct kubectl changes to production are prohibited.
222+
• Manage Kubernetes secrets with Sealed Secrets (Kubeseal) so that
223+
encrypted secrets can be safely stored in Git.
224+
• Use k9s or Lens for day-two operations and cluster observability
225+
rather than ad-hoc kubectl commands.
226+
189227
🧪 TEST & QUALITY
190228
─────────────────
191229
• Define quality gates and acceptance criteria before writing tests.

cli/scaffold_devcontainer.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"rust", "typescript", "kotlin", "c", "cpp", "javascript", "go",
2727
]
2828
ALL_CICD = [
29-
"docker", "terraform", "kubectl", "helm", "github_actions", "jenkins",
29+
"docker", "podman", "terraform", "kubectl", "helm", "github_actions", "jenkins",
3030
]
3131
ALL_KUBERNETES = [
3232
"k9s", "kustomize", "argocd_cli", "lens", "kubeseal", "flux",
@@ -47,7 +47,8 @@
4747
"go": "INSTALL_GO",
4848
}
4949
CICD_ARG_MAP = {
50-
"docker": "INSTALL_DOCKER", "terraform": "INSTALL_TERRAFORM",
50+
"docker": "INSTALL_DOCKER", "podman": "INSTALL_PODMAN",
51+
"terraform": "INSTALL_TERRAFORM",
5152
"kubectl": "INSTALL_KUBECTL", "helm": "INSTALL_HELM",
5253
"github_actions": "INSTALL_GITHUB_ACTIONS", "jenkins": "INSTALL_JENKINS",
5354
}
@@ -272,8 +273,8 @@ def generate_devcontainer_json(env_config):
272273
extensions += ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "ms-vscode.vscode-typescript-next"]
273274
if langs.get("go"):
274275
extensions.append("golang.go")
275-
if cicd.get("docker"):
276-
extensions.append("ms-azuretools.vscode-docker")
276+
if cicd.get("docker") or cicd.get("podman"):
277+
extensions.append("ms-azuretools.vscode-docker") # Docker extension also works with Podman
277278
if cicd.get("terraform"):
278279
extensions.append("hashicorp.terraform")
279280
if cicd.get("kubectl") or cicd.get("helm"):

docs/PROCESS-FIRST.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ immediately usable configuration artefact:
6363
|-------------------------|-------------------|-------------------|
6464
| **Define before you Build** | `devopsos scaffold cicd` / `gha` / `gitlab` | Interactive wizards capture intent before generating any config file |
6565
| **Standardise before Scale** | `devopsos scaffold gha`, `gitlab`, `jenkins` | Golden-path templates for GitHub Actions, GitLab CI, and Jenkins — reviewed baselines every team can adopt |
66+
| **Standardise the container runtime & Kubernetes env** | `devopsos scaffold devcontainer` | Encodes Docker/Podman choice and all Kubernetes CLI tools (kubectl, helm, kustomize, argocd_cli, flux, k9s, kind, minikube, kubeseal …) into a reproducible `devcontainer.json` |
6667
| **Automate the Repeatable** | `devopsos scaffold argocd` | GitOps sync process encoded as an ArgoCD `Application` + `AppProject` CR |
6768
| **Automate the Repeatable** | `devopsos scaffold devcontainer` | Developer environment setup encoded as `devcontainer.json` — reproducible for every team member |
6869
| **Observe and Iterate** | `devopsos scaffold sre` | Prometheus alert rules, Grafana dashboards, and SLO manifests — close the measure-improve feedback loop |
@@ -128,11 +129,33 @@ stream **before** selecting or configuring any tool.
128129

129130
| Best Practice | Why it matters |
130131
|---------------|----------------|
131-
| Define build standards before choosing tools (Docker, Gradle, Maven, Make) | Prevents tool sprawl and ensures consistent outputs |
132-
| Standardise base images and dependency management across all teams | Reduces "works on my machine" issues |
133-
| Enforce reproducible builds with version-pinned dependencies | Makes builds auditable and roll-backable |
132+
| Define build standards before choosing tools (Gradle, Maven, Make) | Prevents tool sprawl and ensures consistent outputs |
133+
| Standardise dependency management and enforce version-pinned builds | Reduces "works on my machine" issues |
134+
| Enforce reproducible builds across all teams and environments | Makes builds auditable and roll-backable |
134135
| Use an artifact repository (Nexus) to cache, version, and audit build outputs | Provides a single source of truth for artifacts |
135136

137+
### 🐳 Containerization
138+
139+
| Best Practice | Why it matters |
140+
|---------------|----------------|
141+
| Choose and document your container runtime (Docker or Podman) before writing the first Dockerfile | Consistency prevents environment drift across teams |
142+
| Standardise base images: use pinned, minimal images (distroless or Alpine) updated on a schedule | Reduces attack surface and image size |
143+
| Define a container image naming and tagging convention (`<registry>/<org>/<service>:<gitsha>`) | Makes every image traceable back to its source commit |
144+
| Scan every image for vulnerabilities in the CI build stage before pushing to a registry | Prevents known CVEs from reaching any environment |
145+
| Use multi-stage Dockerfiles to keep production images free of build-time dependencies | Smaller images, faster pulls, smaller attack surface |
146+
| Use `devopsos scaffold devcontainer` to standardise the container runtime for every team member | Every engineer starts from the same reproducible baseline |
147+
148+
### ☸️ Kubernetes
149+
150+
| Best Practice | Why it matters |
151+
|---------------|----------------|
152+
| Define cluster topology and namespace strategy before deploying any workload | Avoids namespace sprawl and permission confusion |
153+
| Use a local cluster (kind or minikube) for development so every engineer can reproduce production-like conditions locally | Reduces "it works on staging but not prod" surprises |
154+
| Manage all manifests through version-controlled Kustomize overlays or Helm charts | No kubectl apply from developer laptops in production |
155+
| Use GitOps (ArgoCD or Flux) as the single deployment path — direct production kubectl changes are prohibited | Every change is auditable, reviewable, and reversible |
156+
| Manage Kubernetes secrets with Sealed Secrets (Kubeseal) | Encrypted secrets can be safely stored in Git |
157+
| Use k9s or Lens for day-two operations and cluster observability | Consistent tooling reduces operator error |
158+
136159
### 🧪 Test & Quality
137160

138161
| Best Practice | Why it matters |

0 commit comments

Comments
 (0)