Harness.io

Continuous Deployment with Harness (Demo)

Harness Continuous deployment Demo with Azure Kubernetes Cluster.

Documentation Link : http://docs.harness.io/

Uncut Clip – Created by Chirag Sukhija #HarnessioDemo

Video Link on Youtube : https://youtu.be/iTHHCJR9ZtI

IP : http://40.119.226.226/

Harness Dashboard Link:
https://app.harness.io/#/account/bR87hfMwTQmlEtJ1oEmqtw/custom-dashboard/NFdWj1tYRyuyOS55r5uhPQ/details

Badges Link : https://aka.ms/devopschirag

TIMESTAMPS

0:00 Start
0:05 Installing Delegate On Kubernetes Cluster
0:42 Kubernetes Cluster in Azure Overview
00:51 Azure Container Registry Overview
01:16 Using Azure Service Principal for Harness to access Azure Cloud.
01:47 Kubernetes Cluster with 3 nodes in VMSS
02:10 Kubernetes IP Configuration in Load balancer
02:22 Harness Configuration Overview for WordPress Pipeline
02:36 Harness Workflow and Pipeline
02:48 Harness Infrastructure Definition
03:35 Delegate Configuration on Harness UI
03:52 Starting WordPress Deployment through Harness.
04:17 Transient Failure in Initialization
04:59 Running Pipeline on Azure Kubernetes Cluster (Successful Run)
05:48 WordPress Installation Success and Verification through IP.


Deployment Preview

The following list describes the major steps we will cover in this guide:

  1. Install the Harness Kubernetes Delegate in an AKS Kubernetes cluster.
  2. Add Cloud Providers. We will create two Harness Cloud Providers:
    1. Kubernetes Cloud Provider – This is a connection to your AKS Kubernetes cluster using the Harness Delegate installed in that cluster.
    2. Azure Cloud Provider – This is a connection to your Azure account to access ACR. For other artifact repositories, a Harness Artifact Server connection is used. For Azure, Harness uses a Cloud Provider connection.
    Why two connections to Azure? When you create an AKS cluster, Azure also creates a service principal to support cluster operability with other Azure resources. You can use this auto-generated service principal for authentication with an ACR registry. If you can use this method, then only the Kubernetes Cloud Provider is needed.

    In this guide, we create separate connections for AKS and ACR because, in some instances, you might not be able to assign the required role to the auto-generated AKS service principal granting it access to ACR. For more information, see Authenticate with Azure Container Registry from Azure Kubernetes Service from Azure.
  3. Create the Harness Application for your Azure CD pipeline. The Harness Application represents a group of microservices, their deployment pipelines, and all the building blocks for those pipelines. Harness represents your microservice using a logical group of one or more entities: Services, Environments, Workflows, Pipelines, Triggers, and Infrastructure Provisioners. Applications organize all of the entities and configurations in Harness CI/CD.
  4. Create the Harness Service using the Kubernetes type.
    1. Set up your Kubernetes manifests and any config variables and files.
    2. Set the ImagePullSecrets setting to true. This will enable Kubernetes in AKS to pull the Docker image from ACR.
  5. Create the Harness Environment containing the Infrastructure Definition definition of your AKS cluster, and any overrides.
  6. Create the Kubernetes deployment Harness Workflow.
  7. Deploy the Workflow to AKS. The deployment will pull the Docker image from ACR at runtime.
  8. Advanced options not covered in this guide:
    1. Create a Harness Pipeline for your deployment, including Workflows and Approval steps. For more information, see Pipelines.
    2. Create a Harness Trigger to automatically deploy your Workflows or Pipeline according to your criteria. For more information, see Triggers.
    3. Create Harness Infrastructure Provisioners for your deployment environments. For more information, see Infrastructure Provisioners.

What Are We Going to Do?

This guide walks you through deploying a Docker image from Azure ACR to Azure AKS using Harness. Basically, the Harness deployment does the following:

  • Docker Image – Pull Docker image from Azure ACR.
  • Kubernetes Cluster – Deploy the Docker image to a Kubernetes cluster in Azure AKS in a Kubernetes Rolling Deployment

Recommended for Further Reading