For the complete documentation index, see llms.txt. This page is also available as Markdown.

4. Deployment Pipeline Modeling Overview

This topic describes how to model your CD practices in Harness.

This topic describes how you use the Harness Continuous Delivery Abstraction Model.

How do I model my CD practices in Harness?

Continuous Delivery is modeled using Pipelines and Stages.

In each Stage, you define what you want to deploy using Services, where you want to deploy it using Environments, and how you want to deploy it using Execution steps.

For example, a Service uses your Kubernetes manifests and Docker image, an Environment connects to your dev cluster, and Harness automatically generates an Execution using a Rolling Deployment step.

The image above shows you the order for modeling a CD stage:

  1. Create a pipeline.

  2. Add a CD stage.

  3. Define a service.

  4. Target an environment and infrastructure.

  5. Select execution steps.

You can model visually, using code, or via the REST API.

Pipeline Studio (Visual)

Model your process visually using a guided sequence:

YAML Builder

Model your process in code using a full-featured YAML editor:

For more details, go to Write pipelines in YAML.

REST API

Model your process using a full-featured REST API:

For more details, go to Get started with Harness APIs.

How do I automate my CD process in Harness?

Harness Continuous Delivery provides Triggers for automating the execution of Pipelines, multiple settings for adding conditions to how the Pipeline executes and rolls back, and Approvals to ensure that the Pipeline only proceeds when safe to do so.

Triggers

Automate the execution of a Pipeline in response to changes in manifests/specs, artifacts, or on a schedule:

For more details, go to Triggers.

Conditions

Set when, if, and how a Stage executes and what to do if it fails:

For more details, go to Define conditional executions for stages and steps.

Approvals

Add checks at any point in your process to ensure that deployments are safe:

For more details, go to Approvals.

Verification

Harness' Continuous Verification (CV) approach simplifies verification.

Harness CV integrates with your APMs and logging tools to:

  • Verify that the deployed service is running safely and perform automatic rollbacks.

  • Apply machine learning to every deployment to identify and flag anomalies in future deployments.

For more details, go to Verify Deployments with the Verify Step.

Summary

This topic provided a high-level overview of how you can model your software delivery process in Harness Continuous Delivery Pipelines and Stages.

For more details and examples, go to:

How Harness Models it's Pipelines?

Mastering Continuous Delivery: A Closer Look at How Harness Engineers Deploy Software from Harness highlights their journey towards optimizing their Continuous Delivery (CD) pipelines. They address challenges like migration complexities, pipeline management issues, and the lack of standardization across services. By introducing a simplified, unified "Golden K8s Pipeline," integrating version control through GitHub, and adopting a uniform deployment process, Harness streamlined its deployment strategies. These changes resulted in significant benefits such as enhanced collaboration, consistent deployment practices, and automated workflows, paving the way for further advancements like adopting Helm Charts for better scalability and simplification.

Demo Video

Pipeline Template

This YAML describes a pipeline configuration for deploying Kubernetes (K8s) services using a template named "Golden_K8s." The pipeline, designated as "Golden Harness K8s Deployment," is structured for deploying services across various environments, including QA, production, and UAT, while ensuring deployment on both primary and failover infrastructures. It incorporates steps for prerequisite checks, applying Kubernetes resources, and post-deployment actions, which may involve updating Jira. The configuration also allows for specifying variables related to deployment types, environments, and integration points such as webhooks, sign-off pages, and Git details, emphasizing flexibility and control in deployment processes.

Stage Template

The YAML outlines a detailed stage template named "Golden K8s" for deploying Kubernetes services, incorporating various steps to ensure robust and regulated deployments. It checks environmental prerequisites, verifies QA deployments, sets deployment-specific parameters, and includes security scans, mandatory validation, and approval steps. The template also manages notifications, sanity checks post-deployment, and has provisions for rollback in case of failure. This structured approach emphasizes thoroughness, security, and compliance, tailored for diverse environments including production and QA.

Last updated

Was this helpful?