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
-
Triggers
Webhook trigger
Starts a workflow when an external system sends an authenticated HTTP POST to a generated endpoint URL, with the request body available as trigger input for downstream steps. Commonly used to integrate CI/CD pipelines, monitoring tools, or Splunk alerts - each workflow gets its own unique URL path.
-
AAP execution
AAP job template
Launches a single Ansible Automation Platform job template from the workflow, polling until the job completes and exposing results to downstream steps. The standard bridge between automation orchestrator reasoning and AAP execution - one playbook with resolved inventory, credentials, limits, and extra vars.
-
Logic
Conditional step
Evaluates one expression and routes to a true or false branch, sharing the same expression builder as switch steps. Use it for simple binary branching, and leave the false path unconnected to end the branch when the condition isn't met.
-
Approval
Approval step
Pauses the branch and creates an approval request; an approver reviews context, approves or rejects, and the workflow continues on the matching path. Place approvals before destructive or production changes, with configurable approver users/groups, a decision window, and fallback behavior if no one responds in time.
-
AI & integrations
Task agent
Adds LLM reasoning to a workflow - the step receives a natural-language prompt, can call enabled tools, and returns structured output that downstream steps reference through expressions. Use it for unstructured data (logs, tickets, alerts) to summarize, classify, triage, and recommend remediation actions; pair with an approval step for human oversight.
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).
- 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.
- Simulate the Lightwell PR. In AAP, launch CI/CD Demo - Simulate Lightwell PR. In Gitea, open the new PR and confirm
requirements.txtshows the Lightwell backport:aiohttp==3.9.2.rhlw-00001(same app baseline, Lightwell.rhlw-00001suffix - that is the CVE remediation story). - 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. - 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.
- 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.
- 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 |