Setup CI on Azure Kubernetes Service (AKS) with Azure DevOps, Docker Compose and Helm
24 Feb 2019- Prerequisites
- Setup Build Pipelines (CI)
- Setup Release Pipelines (CD)
- What I learned
-
New build pipeline
-
Select source control – every check-in to that branch will trigger the build process
-
Start with an Empty job
-
Choose Ubuntu as agent pool to build Linux images
-
Add Docker Compose task to build images
-
Fill in Azure Subscription and Container Registry
It will authorize build agent to access to Azure and Container Registry Service (e.g. Azure Container Registry or Docker Hub)
-
Select docker-compose files from source control
Docker command will be generated based on Docker Compose File and Additional Docker Compose Files e.g.
docker-compose -f docker-compose.yml -f docker-compose.production.yml build
-
Select “Build service images” in Action dropdown
-
-
Clone the #5 task to push images to ACR
Just change Action to “Push service images”
-
Clone the #5 task to lock images
Just change Action to “Lock service images”
-
Add “Copy Files” task to copy environment configuration yaml files e.g. values.Production.yaml
-
Install helm client
- Fill in Azure Subscription, Resource group and Kubernetes group
- Select “init” in Command dropdown
- Set Arguments as “–client-only” to install helm client to package helm charts
-
Package helm charts
- Select “package” in Command dropdown
- Set Destination for the package to be saved in artifact
-
Publish Build Artifacts