Database DevOps Onboarding Guide
A self-service onboarding guide for Harness DB DevOps.
This onboarding guide accelerates your adoption journey by walking you through the essential setup steps from defining your database schemas to deploying versioned changes consistently across environments. Whether you use Liquibase or Flyway configurations, Harness orchestrates the full migration lifecycle within your Kubernetes infrastructure, ensuring predictable, auditable, and scalable database operations.
Before you begin
Before beginning the walkthroughs in this guide, ensure you have:
Harness account
Database DevOps License (go to “Subscription Overview and Management”)
Kubernetes cluster
Kubernetes Cluster ≥ v1.18, Harness Delegate installed (Delegate setup guide)
Database credentials
JDBC‑compatible database; user with DDL/DML privileges. (Go to “JDBC connection strings to review connection string formats”)
Set up Database DevOps with Liquibase and Flyway
Harness supports both Liquibase Compatible and Flyway Compatible configurations, but the setup varies based on your preferred workflow. Before configuring your DB Schema, ensure your repository follows the correct structure and that your migration files adhere to the chosen framework’s conventions.
1. Prepare your migration framework (Flyway or Liquibase)
If you are new to Liquibase, there are two main ways to create your initial changelog:
Use existing SQL files: Recommended if you already manage your schema through SQL scripts.
Generate a changelog: Auto-generate a changelog by diffing an existing database. Go to Build a changelog to set up your changelog using either option.
Create a Git repository to store your DB schema files.
In the repository, create an
sql/folder and add ordered*.sqlfiles.Add
changelog.ymlat the repository root:
databaseChangeLog:
- includeAll:
path: sqlUse semantic versioning in file names, such as V1__init.sql and V2__add_table.sql.
If you are new to Flyway, start by creating migration files that follow Flyway's naming conventions and folder structure. Go to Flyway Migration Files to understand naming conventions.
Create a Git repository containing your schema directory.
All migrations are stored under a folder such as "sql/migrations".
Files follow Flyway’s naming rules:
Versioned: "
V1__init.sql", "V2__add_table.sql"Undo (optional): "
U2__remove_table.sql" This structure enables Flyway and Harness to consistently detect, version, and apply schema changes.
2. Configure your database schema
The database schema defines a set of SQL changes that can be deployed to one or more database instances. Here is how we will configure it:
In the module picker, select DB DevOps.
In DB Schemas, click Add New DB Schema.
Select the migration type, either Liquibase Compatible or Flyway Compatible.
Enter the Git repository details where your schema files are stored:
Git Connector - The Git connector that has access to the repository containing your database schema files.
Repository Name - The name of the Git repository where your database schema files are stored.
Click Next, then enter the changelog file path for Liquibase or migrations folder path for Flyway:
For Liquibase:
changelog.ymlFor Flyway:
sql/migrations
Click Add DB Schema.
3. Connect with database instance
Before we can deploy our Database Schema, we need to connect a database instance to which we can deploy it. Here is how:
In DB Instances, click Add New DB Instance.
Select
mainor your environment branch.Click New JDBC Connector, enter the name, JDBC URL, and credentials, then select the Harness Overview. Click Save and Finish.
Name - A name to identify the database instance.
JDBC URL - The JDBC connection string for your database instance. Go to JDBC connection strings to review connection string formats.
Username - The username to connect to the database.
Password - The password for the database user.
Delegate - The Harness Delegate that will run the database operations.
Click Add Database Instance.
4. Configure your deployment pipeline
A deployment pipeline deploys your database changes when it runs. In addition to deploying your database, it can also deploy application changes, and have other logic such as requiring a manual approval. Here are some steps on how to create a simple pipeline that deploys a schema change to a database instance anytime it changes in git:
In Pipelines, click Create a Pipeline.
Click Add Stage, then select Custom stage.
Select Add step group, then enable Enable Containerized Stage.
Select the Kubernetes cluster where the pipeline runs.
Click Add Step, then select Apply Schema under DB DevOps.
For the step name, enter "Deploy Database Schema".

Name: Name of the step, by default the name is "DBSchemaApply_1".
Timeout: The timeout limit is the maximum allowable time a stage or pipeline can run.
Migration Type: Liquibase Compatible or Flyway Compatible.
Select DB Schema: The DB Schema we created on Step 2.
Select DB Instance: The Instance we created on Step 3.
Tag (Optional): You can add custom tags to each deployment. In case it is left empty, Harness will add the tag during the deployment.
Click Apply Changes, then save the pipeline.
Click Run and wait for the pipeline to complete.

Conclusion
By completing the steps in this onboarding guide, you now have a fully operational Database DevOps workflow powered by Harness. Your schemas are version-controlled, your database instances are securely connected, and your pipelines are ready to execute repeatable, automated schema deployments using Liquibase or Flyway. This foundation sets the stage for enterprise-grade governance, faster release cycles, and improved developer productivity.
Next steps
As you operationalize more environments, explore advanced capabilities to deepen your Database DevOps practice.
Go to Rollback automation to configure automated rollback for failed deployments.
Go to Author DB Change to use LLM-powered change authoring.
Go to the Database DevOps Troubleshooting Guide to resolve common setup and runtime errors.
Last updated
Was this helpful?