Harness Continuous Verification (CV) overview
Harness CV is a critical step in the deployment pipeline that validates deployments. Harness CV integrates with APMs and logging tools to verify that the deployment is running safely and efficiently. Harness CV applies machine learning algorithms to every deployment for identifying normal behavior. This allows Harness to identify and flag anomalies in future deployments. During the Verify step, Harness CV automatically triggers a rollback if anomalies are found.
This topic provides an overview of the prerequisites and steps involved in setting up Harness CV.
If you are already familiar with setting up Harness CV and the verification step and are looking for instructions on configuring the verification step for a specific health source, then go to Configure CV.
Before You Begin
- Learn Harness' Key Concepts.
- Learn about Kubernetes deployments.
- Refer to the supported platforms and technologies
Deployment strategies for CV
You can set up Harness CV by adding a Verify step to a pipeline. The following are deployment strategies that you can apply while configuring CV.
Continuous verification type
Auto: Harness automatically selects the best continuous verification type based on the deployment strategy.
Rolling Update: Rolling deployment is a deployment technique that gradually replaces old versions of a service with a new version by replacing the infrastructure on which the service runs. Rolling updates are useful in situations where a sudden changeover might cause downtime or errors.
Canary: Canary deployment involves a two-phased deployment. In phase one, new pods and instances with the new service version are added to a single environment. In phase two, a rolling update is performed in the same environment. Canary deployment helps to detect issues with the new deployment before fully deploying it.
Blue Green: Blue-green deployment is a technique used to deploy services to a production environment by gradually shifting user traffic from an old version to a new one. The previous version is referred to as the blue environment, while the new version is known as the green environment. Upon completion of the transfer, the blue environment remains on standby in case of a need for rollback, or can be removed from production and updated to serve as the template for future updates.
Load Test: Load testing is a strategy used in lower-level environments, such as quality assurance, where a consistent load is absent, and deployment validation is typically accomplished through the execution of load-generating scripts. This is useful to ensure that the application can handle the expected load and validate that the deployment is working as expected before releasing it to the production environment.
You can set the sensitivity option as High, Medium, or Low. When the sensitivity is set to High, any anomaly, no matter how small, will be treated as a verification failure. This ensures that even the slightest issue is detected and addressed before releasing the deployment to production.
Harness uses the data points within this duration for analysis. For instance, if you select 10 minutes, Harness analyzes the first 10 minutes of your log or APM data. Harness recommends you choose 10 minutes for logging providers and 15 minutes for APM and infrastructure providers. This helps you thoroughly analyze and detect issues before releasing the deployment to production.
Use the Harness expression
<+serviceConfig.artifacts.primary.tag> to reference this primary artifact. To learn about artifact expression, go to Artifact.
Fail on no analysis.
You can configure the pipeline to fail if there is no data from the health source. This ensures that the deployment fails when there is no data for Harness to analyze.
The Verify step also includes a metric-level option to fail the Verify step when the analysis of a given custom metric is not possible because there is no data for the custom metric on either the test nodes or the control nodes.
To enable the metric-level fail-on-no-analysis option, in the configuration pane of your Verify step, select Step Parameters, expand Optional, and select Fail if any custom metrics has no analysis.
The metric-level option is behind the feature flag
CV_UI_DISPLAY_FAIL_IF_ANY_CUSTOM_METRIC_IN_NO_ANALYSIS. Contact Harness Support to enable the feature.
Harness CV monitors health trend deviations using logs and metrics obtained from the health source, such as APM and logging tools, via a monitored service. A health source is an APM or logging tool that monitors and aggregates data in your deployment environment. You can add multiple health sources.