What you will learn in this TP
- Chain CI, security and GitOps
- Verify and roll back automatically
- Measure the chain with DORA
Introduction #
What you will learn in this section
- Chain CI, security and GitOps
- Verify and roll back automatically
- Measure the chain with DORA
Context. You present an end-to-end delivery chain for a new service to your management. Each step reuses a course lab; the goal is to chain them with no manual action between the commit and the cluster.
Prerequisites: a GitHub account, Docker, kubectl and kind; having completed the Git, CI/CD, GitOps and DevSecOps labs · Estimated time: 120 min
A commit on main reaches production in minutes, verified, traceable and reversible.Hands-on #
Guided steps, with their solution.
1. Two repositories
Why? Separating code and deployment description gives separate permissions and histories.
Createshop-api(code, Dockerfile, tests, workflow) andshop-deploy(Kustomize manifestsbaseandoverlays/staging,overlays/production). Protect main on both.2. CI pipeline
Why? The pipeline applies the CI/CD chapter lessons: fail fast, build once, secure.
Inshop-api, write a workflow: lint and tests, Gitleaks and Trivy, build and push to GHCR tagged with the SHA, SBOM and keyless Cosign signature.3. Automatic deployment repository update
Why? CI only needs to write to Git: it holds no cluster access.
Add a job that updates the staging tag inshop-deploywithkustomize edit set imageand pushes the commit (limited-scope token or GitHub App).4. GitOps deployment
Why? Argo CD applies every commit of the deployment repository and fixes any drift.
On a kind cluster with Argo CD (GitOps lab), create two Applicationsshop-stagingandshop-productionpointing to the overlays, with automatic sync.5. Verify and promote
Why? Production receives exactly the image validated in staging, through a reviewed pull request.
After staging syncs, run a smoke test; if it passes, automatically open a pull request copying the same tag to the production overlay.6. Incident and rollback
Why? A Git rollback is fast, traced and needs no cluster access.
Ship a version returning 500 errors on/health, see the staging smoke test fail (no promotion), then simulate a production incident and roll back withgit revertinshop-deploy. Write a short post-mortem.7. Measure
Why? DORA metrics show whether the chain delivers on its promise.
Deploy five small changes and compute deployment frequency, commit-to-production lead time, failure rate and restore time (DORA lab method). Present the result and the next improvement.
Difficulty level : ●●●●○ (4/5)
My progress
Sign in to track your progress and take notes. Sign in
Recommended Articles
CI/CD de bout en bout (1/5) : principes et anatomie d'un pipeline
Comprendre la CI/CD de bout en bout : intégration continue, livraison continue et déploiement con...
CI/CD de bout en bout (5/5) : GitHub Actions, GitLab CI, Jenkins et Argo CD en pratique
Comparer et utiliser les outils CI/CD : GitHub Actions, GitLab CI, Jenkins, Argo CD et Flux ; pip...
Infrastructure as Code et GitOps : Terraform, Ansible et Argo CD
Gérer l'infrastructure comme du code : déclaratif ou impératif, Terraform (providers, état, plan,...
DevSecOps : sécuriser la chaîne logicielle de bout en bout
Intégrer la sécurité dans le pipeline DevOps : shift-left, modélisation des menaces, détection de...
Mesurer la performance DevOps : métriques DORA, SPACE et amélioration continue
Mesurer et améliorer la performance de livraison : les métriques DORA (fréquence de déploiement, ...