Lesson 6 of 6 · Database CI/CD

Putting It All Together

One feature from Jira story to production, using Agile, Git, Terraform, Ansible, Liquibase, CI/CD, and monitoring together.

Beginner 9 sections 6 min read

The project

This lesson ties the whole Database DevOps Engineer path together. One feature, V-Buck points for the sales application, goes from a Jira story to production, using Agile, Git, Terraform, Ansible, Liquibase, CI/CD, and monitoring, each doing the job it's best at.

The sales application runs on an Oracle database on OCI. The business wants customers to earn V-Buck points on every order. The application team will build the feature; Kofi's DBA team owns everything on the database side:

  • A new customer_vbuck_points table, index, and PL/SQL function, with tests.
  • More storage on the staging and production databases for the new data.
  • A nightly job to expire old points, and monitoring for the new table's growth.

The team follows continuous delivery: everything is automated, and the DBA team approves production releases.

The workflow at a glance

1 PLAN2 CODE3 CI4 CD 5 OPERATE AgileGitpipelineautomation DBRE JiraScrum sprint 14story DBA-310 GitHubbranch DBA-310pull requestCODEOWNERS sqlfluffOracle containerutPLSQLrollback testterraform plan TerraformAnsibleLiquibaseapproval gate PrometheusGrafanaSLO 99.9%PagerDuty story refined with acceptance criteria; DBA sub-tasks on the board changeset, Terraform, and Ansible changes in one reviewed pull request every push: lint, apply, test, roll back, plan, and ansible-lint test, then staging, then approval, then production dashboards, alerts, and SLOs; incidents become new stories

1. Plan: Agile

The Product Owner brings the V-Buck points feature to backlog refinement. Kofi joins, and the team splits the database work into its own items, linked to the application story:

ItemWorkTool
DBA-310Story: V-Buck points schema, function, and tests. Acceptance criteria: points are calculated correctly, cancelled orders earn nothing, the change rolls back cleanly, and order inserts don't slow down by more than 5%.Liquibase, utPLSQL
DBA-311Task: add 200 GB of storage to staging and productionTerraform
DBA-312Task: nightly points-expiry job and a growth metric for monitoringAnsible

In sprint planning, the items go into sprint 14 with the application team's stories, so both sides deliver together. Progress shows on the shared Jira board, and blockers come up in the Daily Scrum.

2. Code: Git

Kofi works on a branch named after the story, in the team's sales-db repository, which holds all three kinds of code:

$ git switch -c DBA-310-vbuck-points

# the schema: a Liquibase changeset with its rollback
db/changes/2026-11-DBA-310-vbuck-points.sql

# the storage: one variable changed in the Terraform environment files
terraform/envs/staging/main.tf     data_storage_size_in_gbs = 712   # was 512
terraform/envs/prod/main.tf        data_storage_size_in_gbs = 712

# the job and the metric: an Ansible role update
ansible/roles/oracle_db/tasks/vbuck_points_jobs.yml

$ git commit -m "DBA-310 Add V-Buck points table, function, tests, storage, and expiry job"
$ git push -u origin DBA-310-vbuck-points

Kofi opens a pull request. CODEOWNERS automatically asks the DBA team to review db/ and ansible/, and the cloud team to review terraform/. Jira links the pull request to DBA-310, because the key is in the branch name.

3. CI: the pipeline checks everything

The pull request triggers the CI workflows, which check each kind of change with its own tools:

CheckResult posted on the pull request
sqlfluff and policy checksSQL style and risky statements: passed
Oracle Free container, liquibase update-testing-rollbackAll changesets apply, roll back, and re-apply: passed
utPLSQL12 tests, including "cancelled orders earn nothing": passed
terraform plan for staging and production1 to change, 0 to destroy: storage grows in place
ansible-lint and a check-mode run against testPassed; one new scheduler job would be created

Ama reviews the changeset and spots that the new index should be created ONLINE, so it won't block order inserts. Kofi adds it, the checks run again, and Ama approves. The cloud team approves the Terraform plan, which shows no replacements. The pull request is merged.

4. CD: through each environment

The merge to main starts the CD workflow, which runs each tool in its natural order, environment by environment:

  1. Terraform applies the storage change, so there's room before the data arrives.
  2. Liquibase applies the changesets: the table, index, and function.
  3. Ansible creates the nightly expiry job and deploys the monitoring query for the new table.
  4. Smoke tests confirm the application can insert an order and read its points.

This runs automatically in test, then in staging, a production-sized copy with masked data, where the performance test confirms order inserts are only 2% slower. The workflow then pauses at the production approval gate, showing the Terraform plan and the Liquibase SQL preview. The DBA team lead reviews them and approves in GitHub, which records who approved and when. Production gets the same steps, and the pipeline tags the release.

5. Operate: DBRE and feedback

  • Monitoring: Prometheus collects the new table's growth and the order insert latency, and a Grafana dashboard shows them next to the database's other key metrics.
  • SLO: the order service's SLO, 99.9% of order inserts in under 200 ms, stays green, so the release used none of the month's error budget.
  • Alerts: if insert latency or storage growth crossed their thresholds, PagerDuty would page the on-call DBA.
  • Feedback: a week later, the dashboard shows the table growing faster than forecast. That becomes a new story, DBA-327, to partition the table by month, back in the backlog.

At the sprint review, the team shows the feature working end to end. At the retrospective, they agree to add the performance test to CI for all changes to the orders schema, so the next one is caught even earlier.

What each part contributed

Practice or toolIts job in this projectModule
Scrum and JiraPlanned the work, made it visible, delivered it in one sprintAgile & DevOps for DBAs
Git and GitHubOne branch and pull request for all changes, with review by the right teamsGit for DBAs
Automation principlesIdempotent, tested, staged changes with a dry run firstAutomation
TerraformGrew the storage, previewed with a planTerraform
AnsibleCreated the job and deployed the monitoring queryAnsible
Liquibase, utPLSQL, GitHub ActionsApplied and tested the schema change through every environmentThis module
Monitoring, SLOs, and feedbackConfirmed the release was healthy, and found the next improvementMonitoring & Observability

Key takeaways

  • Agile plans and tracks the work, with DBA items in the same sprint as the application stories.
  • Git holds the schema, infrastructure, and configuration changes together, reviewed by the right owners through CODEOWNERS.
  • CI checks each kind of change with its own tools: SQL lint, a container database, utPLSQL, rollback tests, terraform plan, and ansible-lint.
  • CD runs Terraform, Liquibase, and Ansible in order through test and staging, then production after approval.
  • Monitoring and SLOs confirm the release is healthy, and what they reveal becomes the next story.