Active

TMM Created

Automating CI/CD pipelines with Lightwell

Dev test, approval, prod deploy with rollback


Description

After CI validates a Lightwell-remediated dependency, a webhook starts automation orchestrator. The workflow deploys and tests in dev, posts OpenFlake (ServiceNow-compatible) work notes from live run variables, pauses at a contextual approval gate, drains the load balancer, deploys production with a pre-deploy snapshot and smoke test, then either closes the change with an AI-written audit note or rolls production back automatically.

Why it matters

  • Automation orchestrator owns the CD path after CI - it does not replace Jenkins, GitHub Actions, or Gitea Actions; it coordinates them with ITSM and production runbooks.
  • Approvers see the CVE, artifact version, CI build link, and change request - a governed decision, not a checkbox.
  • Smoke-test failure restores the pre-deploy snapshot and records the failure on the change with a complete audit trail instead of leaving production and the CHG half-done.

AO building blocks

Automation orchestrator step types this workflow uses on the canvas. See all building blocks

Interactive Experience

Workflow

flowchart LR
  A@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/glossary/webhook-trigger.svg", label: "CI Pipeline Succeeded", pos: "b", h: 96, constraint: "on" } --> B@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Deploy Dev + Test", pos: "b", h: 96, constraint: "on" }
  B --> C@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/glossary/conditional-node.svg", label: "Dev Tests Passed?", pos: "b", h: 96, constraint: "on" }
  C -->|true| D@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/approval-node.png", label: "Approve Prod Deploy", pos: "b", h: 96, constraint: "on" }
  C -->|false| E@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/task-agent.png", label: "AI Dev Failure Note", pos: "b", h: 96, constraint: "on" }
  D -->|approved| F@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Drain Load Balancer", pos: "b", h: 96, constraint: "on" }
  F --> G@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Deploy Prod + Smoke", pos: "b", h: 96, constraint: "on" }
  G --> H@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/glossary/conditional-node.svg", label: "Prod Smoke Passed?", pos: "b", h: 96, constraint: "on" }
  H -->|true| I@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/task-agent.png", label: "AI Close Note", pos: "b", h: 96, constraint: "on" }
  H -->|false| J@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/task-agent.png", label: "AI Rollback Note", pos: "b", h: 96, constraint: "on" }
  I --> K@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Close OpenFlake CHG", pos: "b", h: 96, constraint: "on" }
  J --> L@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Rollback Snapshot", pos: "b", h: 96, constraint: "on" }
  classDef noBorder fill:transparent,stroke:transparent
  class A,B,C,D,E,F,G,H,I,J,K,L noBorder

Switch routing

Path Condition Action
Dev failure ao_dev_test_passed != true AI writes OpenFlake failure note; production blocked
Happy path Dev tests pass + approval Drain LB → prod deploy → smoke test → AI close note → close CHG
Prod rollback ao_prod_health_passed != true AI incident note → restore snapshot → update change

Demo walkthrough - happy path

Presenter runbook for the basic CI/CD show. URLs and passwords come from the product-demos seed summary (and the OpenFlake / Gitea setup jobs).

  1. Open four tabs before you start - keep them side by side: AAP (Controller); automation orchestrator (AO URL from the seed summary; admin + printed password); OpenFlake (ITSM UI; login from seed summary / OpenFlake job); Gitea (apdadmin / Ansible123!).

Note: OpenFlake stands in for ServiceNow in this lab. It is an open source, ServiceNow-compatible ITSM used for demo purposes only; the same Table API pattern maps to a real ServiceNow instance in customer environments.

  1. Simulate the Lightwell PR. In AAP, launch CI/CD Demo - Simulate Lightwell PR. In Gitea, open the new PR and confirm requirements.txt shows the Lightwell backport: aiohttp==3.9.2.rhlw-00001 (same app baseline, Lightwell .rhlw-00001 suffix - that is the CVE remediation story).
  2. Merge the PR → watch Actions → webhook to AO. In Gitea, merge the PR. Open Actions on inventory-service - a run should start. That Action posts a webhook into automation orchestrator when CI succeeds.
  3. Watch the AO workflow. In automation orchestrator (left nav) → Workflow Runs. You should see CI/CD Pipeline - Dev Test, Approval, Prod Deploy with Rollback start from the webhook.
  4. Approve when prompted. Let it run through dev deploy/test. When it hits Dev Lead Approval - Promote to Production, Approve it. Stay until the run completes successfully (prod deploy + close loop).

Presenter note: Human approval steps are optional - teams can add more gates, remove them, or fully automate promotion based on maturity and trust. For emergency response under high security exposure, organizations often waive approvals to move faster.

  1. Check OpenFlake. Open the change. When the pipeline finishes you should see about seven activities on the issue (work notes / updates from the AAP steps along the way, ending with close).

Tip: Before every recording or live show, run CI/CD Demo - Reset Demo so Gitea is back on vulnerable aiohttp==3.9.0. For a second take, break the prod /health endpoint before merge to walk the automatic snapshot rollback path.

Playbooks

Playbook What it does Runs on
cicd_deploy_dev_and_test.yml Deploys the artifact to the dev environment (port 8080), runs integration tests, posts OpenFlake work notes, and publishes ao_dev_test_passed for the condition step. Demo host (dev + prod app)
cicd_drain_lb.yml Simulates a graceful load balancer drain before production deploy and records the drain on the OpenFlake change request. Demo host
cicd_deploy_prod.yml Snapshots prod, deploys the artifact (port 80), smoke-tests /health, updates OpenFlake, and publishes ao_prod_health_passed plus ao_snapshot_id. Demo host
cicd_rollback_to_snapshot.yml Restores production from the pre-deploy snapshot after a failed smoke test, verifies health, and records the rollback on the change request. Demo host
cicd_close_loop.yml Patches the OpenFlake change request to Closed with the AI-generated close note. localhost (OpenFlake Table API)
cicd_simulate_lightwell_pr.yml Creates an OpenFlake change request and opens a Gitea PR that bumps aiohttp to the Lightwell remediated build. localhost (Gitea + OpenFlake APIs)
cicd_reset_demo.yml Resets the Gitea inventory-service repo to the vulnerable aiohttp==3.9.0 baseline in a single commit. Demo host
cicd_setup_demo_host.yml Installs inventory-service as systemd units on ports 80 (prod) and 8080 (dev) with a baseline snapshot. Demo host
cicd_setup_gitea.yml Installs Gitea and act_runner with Podman on RHEL 9 and prints the admin API token. Demo host

Demo video