Azure DevOps Services

Azure DevOps Services provide development collaboration tools including high-performance pipelines, free private Git repositories, configurable Kanban boards, and extensive automated and continuous testing capabilities.

Environment variables and prerequisites:

export AZURE_DEVOPS_EXT_PAT=<Azure DevOps Personal Access Token >
export AZURE_DEVOPS_PROJECT_NAME=<Azure DevOps Project name>
export AZURE_DEVOPS_ORG=<Azure DevOps Ogranization name, e.g. use Contoso when your URL is https://dev.azure.com/Contoso>
export AZURE_DEVOPS_REPO_NAME=<Azure DevOps Repository name>
export AZURE_DEVOPS_USER=<Azure DevOps User, e.g. username@contoso.com>

Azure DevOps Pipelines configuration block:

cicd:
  front-end:
    type: provision-azuredevops-ci
      azuredevops_user: maksym.kholodianskyi@globallogic.com
      azuredevops_org: "{{ lookup('env','AZURE_DEVOPS_ORG') }}"
      azuredevops_project_name: "{{ lookup('env','AZURE_DEVOPS_PROJECT_NAME') }}"
      azuredevops_ci_pipeline_name: Frontend-CI
      azuredevops_cd_pipeline_name: Frontend-CD
      azuredevops_cd_environments:
        dev:
          service_conn_type: provision-service-conn
          service_conn_name: "AzureSubscription-Dev1Cluster"
          k8s_cluster_name: maxkho-dev-cluster
          namespace: devns
        qa:
          service_conn_type: provision-service-conn
          service_conn_name: "AzureSubscription-QA1Cluster"
          k8s_cluster_name: maxkho-dev-cluster
          namespace: qans
      ci_branch: master
      ci_Path: "/"
      project_local_root: "/Users/dev/source/microservices-demo/front-end"
      shell: "/usr/local/bin/bash"
      repo_type: azuredevops
      repo_name: front-end
      registry_type: docker
      registry_name: OpeNgineContainerReg

Element

Description

cicd

Parent element of CICD configuration that contains a list of applications that are to be deployed in clusters managed by OpeNgine.

front-end

Application name.

type

For Azure DevOps Pipelines, type can have only one value - provision-azuredevops-cicd

azuredevops_user

Email address of the user who has admin permissions on the Azure DevOps project where pipelines will be created.

azuredevops_org

Name of Azure DevOps Ogranization. For example, if the URL of your organization is https://dev.azure.com/Contoso, then you should put Contoso into this field.

azuredevops_project_name

Azure DevOps project where pipelines will be created.

azuredevops_ci_pipeline_name

Name of Build (CI) Pipeline.

azuredevops_cd_pipeline_name

Name of Release (CD) Pipeline.

azuredevops_cd_environments

Parent element of the configuration of target environments where the applicatiojn will be deployed to.

azuredevops_cd_environments.dev, azuredevops_cd_environments.qa etc.

Names of target environments. At this point, only dev and qa are supported. Note, we can easily add support for any number of environments. Their names are customizable too, we don’t require you using specific names for your environments.

dev.service_conn_type

Type of Service Connection for the target Kubernetes cluster. Support type is provision-service-conn.

dev.service_conn_name

Name for the Service Connection for the target Kubernetes cluster.

dev.k8s_cluster_name

Name of the target Kubernetes cluster.

dev.namespace

Kubernetes namespace in the target cluster.

ci_branch

Git branch to use in the CI pipeline.

ci_path

Relative path in the Git repo that should be used in the CI pipline, e.g. “/feature1/src”.

project_local_root

Project root folder on the local file system.

shell

Path to shell on the system where OpeNgine installation is being executed. NB: bash version > 5.0 is required.

repo_type

Type of your Git repository. Accepted values are azuredevops and git

repo_name

Name of your Git repository.

registry_type

Type of your Container registry. Accepted values are acr``(Azure container registry) and ``docker (DockerHub). Note: when using DockerHub as a Container registry, OpeNgine will also utilize Github as a repository for Helm packages. This is necessary because DockerHub does not support Helm packages. See the “Repositories and Registries” section for more details.

registry_name

Name of your Containter registry.