Azure CI/CD Discovery

Set up microservices discovery in your Azure CI/CD pipelines.

🚧

Early Adopter Release

This feature is currently in early adopter release and may not be available to all users.

Overview

If your organization uses Azure DevOps as a platform for hosting code repositories, you can establish an automated process for microservices discovery by configuring Azure CI/CD pipelines. Automated discovery ensures consistent updates and accurate representation of microservices within your system.

Prerequisites

Before you start, prepare the following:

  • A YAML manifest file
  • A relevant Python script

To learn how to create a YAML file and a Python script, see Microservice Discovery Through a Manifest File.

Configuring Your Azure Pipeline

The Azure pipeline outlined in this guide is designed to automatically update your microservices on each push to the main branch. This ensures your microservice fact sheets are consistently updated with the latest changes. The pipeline includes the following steps:

  1. Checking out your code
  2. Setting up Python
  3. Installing the necessary Python dependencies
  4. Invoking the SAP LeanIX service discovery Python helper

To set up this pipeline, create a new azure-pipelines.yml file in your repository root.

The following YAML script outlines the pipeline:

trigger:
- main

pool:
  vmImage: 'ubuntu-latest'

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: '3.12'
    addToPath: true

- script: |
    python -m pip install --upgrade pip
    pip install requests pyyaml
  displayName: 'Install dependencies'

- script: python leanix_service_discovery.py
  displayName: 'Invoke Manifest Parser'

By automating these steps, you not only streamline your microservice discovery process but also ensure accuracy and consistency in your microservice fact sheets.