Get Speed and Efficiency with Azure CI/CD Pipelines for AKS

Itay Malka
2bcloud
Published in
4 min readOct 28, 2021

Continuous Integration and Continuous Deployment (CI/CD) development methods took the technology world by storm a little over a decade ago, offering developers and teams a path for sidestepping the cumbersome manual updating processes that often plagued software releases with flaws. Since then, the world’s software development platforms have increased the CI/CD tools they offer to developers to ship new features quickly and sustainably, with Microsoft Azure leading the way. I recently hosted a 2bcloud webinar to coach developers on how to utilize Azure CI/CD pipelines to maximize their speed and efficiency in releasing features and updates. In this blog, we’ll unpack what CI/CD pipelines are, why they are so useful, and give a brief overview on how to create CI/CD pipelines in Azure.

What is a CI/CD pipeline, and why is it useful?

The CI/CD pipeline is an automation pipeline that helps developers accelerate and scale their software development at a pace that was previously unimaginable. The pipeline’s reflexive nature builds a seamless bridge between development and operations, creating a stable operations environment that can process fast and frequent changes in code.

To better understand this pipeline, we should break down and define its components. CI stands for continuous integration. This development process triggers automatic building, testing, and deployment scripts that act as a quality assurance inspector, ensuring that new code is reliable and immediately integrated into repositories. The rapid integration of reliable code enables developers to frequently deploy large-scale changes and updates, with far less incidence of error.

CD stands for continuous deployment. Think of the CD like a traffic cop, directing the deployment of validated CI codes to various production environments. Codes that are validated through the CI pipeline can be immediately applied and deployed to the end user’s environment, driving faster production deployments and updates that can be immediately felt by the end-user. Whereas developers once had to aggregate and merge all software updates into one large batch and then implement them across the board in order to roll out a new version, CI/CD pipelines enable greater flexibility in the product lifecycle, allowing developers to respond to product issues in real-time and make small or large changes quickly and frequently. In this way, the CI/CD pipeline is something of a miracle tool for creating agility and stability all at once.

Now that I’ve excited you about all you stand to gain with CI/CD DevOps methods, let’s learn a bit about how to implement these practices in Azure with their Azure DevOps CI/CD pipelines.

Building CI/CD Pipelines

The Azure DevOps portal guides users through the entire building process of the CI/CD pipeline, sparing you a lot of legwork with automated building tools and pipeline templates. To start building the pipeline, you’ll need some basic elements: source code, an ASP, and the IP addresses of your Azure Kubernetes containers (those can be accessed throughout the development process). The program will steer you to input the information it needs throughout the pipeline’s creation, so you don’t need to have all this information ready from the beginning, though it can help to speed the process along.

When you start a new pipeline, the program prompts you to select your code repository from a local or online repository, such as GitHub. Once you’ve designated a code repository, the system offers a number of pipeline templates based on the code it finds there. You also have the option to build a pipeline from scratch (don’t worry, the automation options will still be there too).

Once you select a pipeline, Azure will bring up the cloned code repository and allow you to write CI trigger commands, which can be scripts, jobs, tasks, and more. These commands include a number of functions that your pipeline can continuously perform at scale, such as fetching code from a repository, running unit tests, compiling applications, and more. Essentially, in this part of the process, you are writing and validating the build, test, and deployment codes that will be continuously integrated into your product. As you establish the CI pipeline’s trigger commands, you will specify which “agent” (meaning the virtual machine or server) from which you want your commands to run. This is where the CI pipeline development (which consists of commands) merges with the CD pipeline development, which deals more with allocation across environments. Once you’ve tested and validated your CI commands, you “seal the deal” by committing the code and “releasing” the CI/CD pipeline to production. Later, you can configure various monitoring tools in Azure to ensure that your pipeline is as optimal as possible.

--

--