Thursday, March 5, 2026

Harness | Core Concepts

 Core components of Harness



1. Application

An Application is the top-level container in Harness.

  • It represents a complete project or system
  • Contains all services, environments, workflows, and pipelines for that project

Example

Application: E-commerce Platform

Inside it you may have:

  • payment-service
  • order-service
  • notification-service


2. Service

A Service represents a deployable microservice or application component.

It defines:

  • Artifacts (Docker image, JAR, ZIP, etc.)
  • Service configuration
  • Deployment variables

Example

Service: Order Service

Artifacts:

  • Docker image from Docker
  • JAR file from a repository
  • Lambda package

Possible service types include:

  • Secure Shell
  • Kubernetes
  • AWS Lambda
  • ECS

Example:

  • If deploying a container to Kubernetes → Kubernetes service type
  • If deploying serverless → use AWS Lambda service type.


3. Environment

An Environment represents where the service will be deployed.

Typical environments:

  • Dev
  • QA
  • Staging
  • Production

It defines:

  • Infrastructure
  • Cloud provider
  • Target cluster or server

Example:
Environment: Production

Infrastructure:

  • Kubernetes cluster
  • AWS account
  • VM instances


4. Workflow

Workflows are part of First Gen Harness in Next Gen Harness its moved under Pipelines Execution.

A Workflow defines how the deployment happens.

It contains:

  • Deployment steps
  • Pre-deployment tasks
  • Post-deployment verification
  • Rollback steps

Example workflow steps:

  1. Pull artifact
  2. Deploy container
  3. Run database migration
  4. Perform health check
  5. Verify deployment

Harness can also integrate with monitoring tools for verification.


5. Pipeline

A Pipeline orchestrates multiple workflows.

It allows:

  • Sequential deployments
  • Multi-environment promotion
  • Approval gates

Example pipeline:

Build → Dev Deploy → QA Deploy → Approval → Production Deploy

Example integration:

  • Build triggered from Jenkins
  • Deploy to Kubernetes cluster


Complete Example

Application

Online Banking System

Services
  • account-service
  • transaction-service
  • notification-service

Environments
  • Dev
  • QA
  • Production

Workflow

Deploy container → Run health check → Verify logs

Pipeline
Build → Dev → QA → Manual Approval → Production


Easy way to remember

  • Application → Project
  • Service → What you deploy
  • Environment → Where you deploy
  • Workflow → How you deploy
  • Pipeline → Deployment process across environments

No comments:

Post a Comment

Node | Cluster Vs Worker Threads

Cluster: Multiple processes (scale app across CPU cores) Worker Threads: Multiple threads (handle CPU-heavy work inside one process) Cluster...