How to set up a DevOps toolchain on an Azure Kubernetes Cluster. (8 min read)

Sam Verhaegen - 2019-03-04

testerdetest

DevOps specialist and Ixor managing partner Johnny Vanhentenryk takes you through the setup of a DevOps toolchain at one of the Ixor customers. This guide is aimed at experienced DevOps specialists.

Follow us on our socials to never miss an update!

Goal

The DevOps toolchain we build is targeting all development teams of our customer. With a small DevOps team we have to evolve and maintain the DevOps toolchain. The solution has to scale quickly when the usage and adoption grows.

The following tools were integrated to build our DevOps toolchain:

  • Jenkins
  • Nexus
  • SonarQube
  • UrbanCode Deploy (UCD)

There are alternatives available for most of these tools. The decision to use these particular tools was made in agreement with the client. The DevOps Lanscape illustrates how these tools interact.

DevOps Landscape

Kubernetes

Despite the fact that customer has its own datacenter with support for Linux virtual machines we decided to install the entire DevOps toolchain in a Kubernetes cluster on Azure. This allows us quickly scale our infrastructure up or down following usage. By using Kubernetes as our workload orchestrator, we have drastically reduced the need for monitoring on Infrastructure or services/applications failures. Kubernetes will automatically move or redeploy applications when they are unavailable.

DevOps Toolchain Deployments

The entire toolchain is based on Docker images and deployment artefacts which are maintained as Helm charts.

These helm charts are saved in a Git repository on which we have hooked a GitOps deployment process. Each environment is a branch which deploys automatically when the charts are updated. Deployment to production is typically just a merge of our UAT branch to production.

Jenkins CI

For our Continuous Integration we use Jenkins with the Kubernetes Plugin. For each job a new Pod is started. These pods will always have a ‘Jenkins jnlp container’ to start a Jenkins Slave and connect it to the Jenkins master. The developer of the CI pipeline then adds the images needed to build, test, validate and deploy his code. By using Jenkins with Kubernetes and images, the maintainers of the DevOps toolchain don’t need to install any tools (java, npm, node, maven, …) on Jenkins slaves.

kub3

The DevOps toolchain developers created shared libraries in Jenkins for application developers to easily use the following features in a CI/CD pipeline:

  • maven build / test
  • npm build / test
  • execute sonar quality scan
  • execute security scan
  • Upload artefact to Nexus
  • Trigger UCD deployments

Each team can create its own shared libraries and share them with the other teams as well.

Urban Code Deploy

For deploying applications to different environments we use UCD. Each application can have its own deployment process and common processes can be shared with deployment processes. A really nice feature of UCD is that it can download its deployment artefacts from any repository be it Git, Maven or NPM.

Every artefact in UCD can be tagged with labels. We add these labels from Jenkins when specific quality rule goals have been reached. In the deployment process we have implemented gating via presence of labels and manual approvals.

Want to get updates like these in your mailbox? Register for our newsletter here.

Related articles

Zyzo brengt leven in huis bij opa en oma!

Read more

How to set up a DevOps toolchain on an Azure Kubernetes Cluster. (8 min read)

Read more

E-invoicing bij De Lijn bereikt historisch hoogtepunt

Read more