What Is Harness CD?
Harness Continuous Delivery (CD) is a cloud-native deployment platform that simplifies software delivery without requiring scripts. It supports multiple deployment strategies, including canary, blue-green, and rolling deployments. Harness CD integrates with infrastructure provisioning tools like Terraform and AWS CDK, enabling efficient creation of short-lived environments.
The platform includes AI-powered deployment verification, which analyzes logs and application performance metrics to track deployment health. If issues arise, Harness can automate rollbacks based on predefined deployment strategies.
What Are Harness GitOps Pipelines?
Harness GitOps pipelines implements GitOps principles by automating deployment workflows and infrastructure provisioning. They work with Argo CD and Flux, allowing teams to manage GitOps deployments from a centralized control plane.
One key feature is pull request pipelines, which automate the propagation of changes across multiple services and environments. Harness also provides rollback capabilities by continuously verifying deployments with observability tools. If an issue is detected, Harness can generate a rollback pull request to revert changes automatically.
Harness GitOps reduces the overhead of managing GitOps implementations by offering a managed service. It can install and configure GitOps agents or integrate with existing Argo CD and Flux setups without requiring teams to recreate their configurations.
The platform ensures consistency with drift detection and application sync, keeping deployed environments aligned with their declared state in Git. Additionally, Harness provides REST APIs for automating workflows, onboarding teams, and integrating with other tools.
Tutorial: Getting Started with Harness CD GitOps
Let’s review the steps involved in setting up a GitOps workflow with Harness CD. These instructions are adapted from the Harness documentation.
Step 1: Add a Harness GitOps Agent
A Harness GitOps agent is required to perform GitOps tasks. It runs in the organization’s environment and enables synchronization between the source repository and target clusters.
To add a GitOps agent in Harness:
- Navigate to the Harness project and click on GitOps.
- Go to Settings > GitOps Agents and click New GitOps Agent.
- Choose whether to install the agent with or without an existing Argo CD instance. For a fresh installation, select No and click Start.
- Enter a name for the agent (e.g.,
example
). - Select a GitOps Operator: Argo CD or Flux as the reconciler.
- Set the Namespace where the agent will be installed (e.g.,
default
). - Click Continue and download the generated YAML manifest.
- Apply the YAML in the Kubernetes cluster using:
kubectl apply -f gitops-agent.yaml -n default
- Back in Harness, click Continue and then Finish. The agent should now show as Healthy and Connected in the Agents list.
Step 2: Add a Harness GitOps Repository
A GitOps repository stores Kubernetes manifests and application configurations for deployment.
To add a GitOps repository:
- In Harness, go to GitOps > Settings > Repositories.
- Click New Repository and select Git as the repository type.
- Enter the following details:
- Repository Name:
guestbook
- GitOps Agent: Select the previously added Agent.
- Repository URL:
https://github.com/argoproj/argocd-example-apps
- Repository Name:
- Choose HTTPS as the connection type and Anonymous for authentication.
- Click Save & Continue. If the connection is valid, click Finish. The repository is now added.
Step 3: Add a Harness GitOps Cluster
A GitOps Cluster is the target Kubernetes environment where applications will be deployed. To add a GitOps Cluster:
- In Harness, go to GitOps > Settings > Clusters.
- Click New Cluster and enter a name (e.g.,
example
). - Select the previously added GitOps Agent and click Continue.
- Choose Use the credentials of a specific Harness GitOps Agent to allow the agent to manage cluster connections.
- If connecting manually, enter:
- Master URL: Run
kubectl cluster-info
and copy the Kubernetes master URL. - Authentication: Select Service Account and provide a valid Service Account Token.
- Master URL: Run
- Click Save & Continue. If the connection is successful, the cluster is now available for deployments.
Step 4: Add a Harness GitOps Application
A GitOps application manages the synchronization between the source repository and the target cluster. To create a GitOps application:
- In Harness, go to GitOps and click New Application.
- Enter an Application Name (e.g.,
example
). - Select the previously configured GitOps Operator (Argo or Flux) and GitOps Agent.
- Create a New Service named
guestbook
and a New Environment namedexample
. - Click Continue and choose Manual Sync Policy.
- Under Source, select:
- Repository Type: Git
- Repository URL: Select
https://github.com/argoproj/argocd-example-apps
- Revision:
master
- Path:
helm-guestbook
- Helm Values File:
values.yaml
- In Destination, select the previously added cluster and set Namespace to
default
. - Click Finish to create the Application.
Step 5: Perform GitOps: Sync the Application to Git
Now that the application is created, sync it with the live cluster:
- Open the Application and click SYNC.
- In the Synchronize settings, enable Prune to remove outdated resources. Enable Apply Out of Sync Only to optimize the sync process.
- Click Synchronize and wait for the status to change to Healthy.
- Verify the deployment using:
kubectl get pods -n default
You should see theexample-helm-guestbook
pod running.
Step 6: Using the Application
Once the application is deployed, you can monitor its sync status, inspect resource configurations, and manage deployments within Harness.
Key features include:
- Git Details: Displays commit history and sync sources.
- Resource View: Shows Kubernetes objects and their sync status.
- Sync Operations: Allows manual syncs and rollbacks.
- App Diff: Compares desired and live states.
You can also use Refresh to check for updates in Git and Sync to apply them. This ensures the deployed environment remains aligned with the desired state defined in the repository.
Read our guide to Harness Kubernetes
Limitations of Harness CD
While Harness CD offers useful automation and management capabilities, it has some limitations that users should consider. These limitations were reported by users on the G2 platform:
- High cost: Harness CD GitOps can be expensive, especially for small-scale deployments.
- Complex on-prem and edge deployments: Running Harness CD GitOps in on-premises or edge environments is not straightforward and may require additional configuration and effort.
- Steep learning curve: The platform offers a range of services, which can be overwhelming for new users.
- Documentation challenges: As the platform evolves, keeping up with the documentation can be difficult. Users may find it challenging to navigate and locate relevant information.
- UI and integration issues: Some users report UI bugs, a non-intuitive onboarding experience, and complex integrations with code repositories.
- Limited open source plugin support: Compared to other CI/CD tools, Harness has limited support for open-source plugins, which may restrict flexibility for advanced users.
- Dependency on multiple modules: While Harness is marketed as modular, getting the most value often requires adopting multiple modules rather than using a single component.
- Managed service limitations: While Harness automates many tasks, some features available in self-managed CD tools are either missing or require workarounds.
- Migration challenges: Transitioning from older Harness versions to newer ones is not always seamless. Users who rely on deep customizations may face difficulties during migration.
- System integration latency: Some users experience delays when integrating Harness with other tools, which can impact workflow efficiency.
- Pricing and licensing concerns: Many users expect better pricing models or discounts to make the platform more accessible.
Codefresh: Ultimate Harness GitOps Alternative
Codefresh is a modern Kubernetes and GitOps solution powered by Argo, bringing the best open-source tools to a reliable enterprise-grade DevOps toolchain. Codefresh provides a secure and thoroughly validated runtime allowing you to fully tap the power of Argo Workflows, Events, CD, and Rollouts. The best practices of GitOps are built into Codefresh while still giving teams the flexibility and control they need.
Codefresh provides unrivaled visibility from code-to-cloud into your entire continuous integration and continuous delivery workflows. It offers a streamlined, automated approach to advanced deployments like canary, blue-green, and experimental releases. Codefresh has a unified user interface for all of your builds and deployments as well as a centralized management control plane for your Codefresh Argo runtimes. It integrates with your best-of-breed tools to give you the best possible software delivery process.
Here are some of the key features Codefresh offers:
- Enterprise-grade Argo runtime with all Argo Project components
- Optional hosted runtime for Argo CD
- Centralized management control plane for all Argo runtimes
- Customized Argo Workflows and Events for CI and CD
- Integrated dashboard for Dora metrics
- Unified Argo user interface with end-to-end traceability
- Comprehensive dashboards for tracking releases and deployments
- Insights into images, build artifacts, and their environment usage
- Detailed performance breakdown of resource usage during workflows
- Codefresh Hub for Argo Workflows for reusable Workflows templates
- Native integration with popular secret management tools
- Cross-application single sign on with centralized management
- Integration with issue management like Jira
- Integration with other CI systems such as Jenkins, Github actions etc.
- GitOps Argo Autopilot runtime installer
- Additional security validation and intercompatibility testing for Argo components
- Award-winning support and professional services