Skip to main content

Implementing CI/CD pipeline on Azure

In this article, we will be using Azure Pipelines to create a CI/CD pipeline for a .NET project. The Azure CI/CD pipeline simplifies continuous integration and continuous delivery (CI/CD) in the application development process. You can start from the source stage with existing code on GitHub or on-premise containers. The Azure Repos can maintain a central repository, and the Azure pipelines maintain build and release pipelines for the given project. The Azure DevOps CI/CD process is a crucial process with all the required dev services.

Azure-ci-cd-pipeline.jpg

What is Azure DevOps?

Azure DevOps is a collection of services given by Microsoft Azure. It provides development services for a team to support, plan, collaborate, build, and deploy applications.

It provides integrated features in a browser or an IDE(Integrated Development Environment). Some of the services for developers are :

● Azure Repos

● Azure Pipelines

● Azure Boards

● Azure Test Plans

● Azure Artifacts

These resources are quite useful, especially Azure Pipelines. In this article, we will be using Azure Pipelines to create a CI/CD pipeline for a .NET project.

What are Azure Pipelines?

The Azure CI/CD pipeline simplifies continuous integration and continuous delivery (CI/CD) in the application development process. You can start from the source stage with existing code on GitHub or on-premise containers.

The Azure Repos can maintain a central repository, and the Azure pipelines maintain build and release pipelines for the given project. The Azure DevOps CI/CD process is a crucial process with all the required dev services. 

Apart from continuous integration and continuous deployment with Azure DevOps, these pipelines are used to construct build-deploy-test workflows used mainly in continuous testing (CT). This tests the changes in a fast and scalable routine.

Advantages of Azure Pipelines

The Azure Pipelines can be multifactored, and in the Azure DevOps CI/CD practice, they provide various advantages:

1. Version Control Systems — Having the code into a version control system is the first step of building an Azure CI/CD pipeline. You can manage your source code in GitHub, Bitbucket, Subversion, or any other Git repository. It also supports Team Foundation Version Control (TFVC).

2. Programming Languages and Application Types — You can use different languages with Azure pipelines like Java, Ruby, C, C++, Python, PHP, Go, and JavaScript.

3. Deployment Targets — The applications with Azure CI/CD pipelines can be deployed to multiple target environments. This includes Virtual Machines, Containers, or any On-prem or Cloud Platform.

4. Package Formats — To produce packages that can be consumed by others, you can publish NuGet, npm, or Maven packages to the built-in package management repository in Azure Pipelines. You also can use any other package management repository of your choice.

5. Pricing —  It is free for public projects. But, for private projects, you can run up to 1800 minutes of pipeline jobs free per month.

Do You Know- How can Cloud Services Transform your Business?

Why should I use Azure Pipelines?

Implementing CI and CD pipelines help to ensure consistent and quality code that’s readily available to users.  And, Microsoft Azure cloud service Pipelines provides a quick, easy, and safe way to automate building your projects and making them available to users.

Use Azure Pipelines because it supports the following scenarios:

● Works with any language or platform

● Deploys to different types of targets at the same time

● Integrates with Azure Deployments

● Builds on Windows, Linux, or Mac machines

● Integrates with GitHub

● Works with open-source projects.

Creating Azure Organizations

To create an Azure organization, Search for DevOps and choose Azure DevOps organizations.

Click My azure DevOps organizations.

Azure-DevOps-Organizations.jpg

To create new, Click Create new Organization

Provide a name for the Organization and the region where the projects under the Organizations will be hosted.


Create-new-Organization.jpg


Creating Azure Projects

Once the Organization is created, You will be asked to create a project under an Organization.

Creating-Azure-Projects.jpg

Choose the project to be private and click Create project


CICD Pipeline using Azure DevOps Starter

Azure DevOps Starter creates a CI/CD pipeline in Azure Pipelines. You can create a new Azure DevOps organization or use an existing organization.

Azure DevOps Starter also creates Azure resources in the Azure subscription of your choice.

Azure DevOps Starter presents a simplified process for creating a Continuous Integration (CI) and Continuous Delivery (CD) pipeline to Azure. You can bring your existing code and Git repo, or you can select a sample application.

● Use DevOps Starter to create a CI/CD pipeline

● Configure access to your GitHub repo and choose a framework

● Configure Azure DevOps app and an Azure subscription

● Commit changes to GitHub and automatically deploy them to Azure

● Examine the Azure Pipelines CI/CD pipeline

● Clean up resources

Prerequisites

● An Azure subscription. You can get one free through Visual Studio Dev Essentials.

● Access to a GitHub or external Git repo that contains .NET, Java, PHP, Node.js, Python, or static web code.

Sign In to the Azure Portal

Search for DevOps starter

and click Create DevOps starter

Choose the application of your choice, For this tutorial, I will choose .NET

Choose-the-application.jpg

Click Next: Framework and then choose ASP.NET

Choose-the-Application-Framework.jpg

Next: Service, Choose Windows Web App and Next: Create

Click Authorize to Access the GitHub account to create the workflow.

Once Authorized, You will be asked to choose the organization and the project, and the Subscription where the Azure DevOps pipeline will be created.

Select-Repository-and-Subscription.jpg

Click Review + Create, It will start the Deployment process.

Azure DevOps CI/CD Project is created


The Azure DevOps CI/CD Project is created, the Azure resources pane will take some minutes to load.

Now you can work with the team and make the required changes to the .NET apps with the automated CI/CD process that deploys the latest changes to the website.

On the right pane of Azure resources, click on the Browse button to view the application.

Github-Workflow-Success.jpg

You May Also Like: What is DevOps and its future predictions for 2021 and beyond?

Cleaning up Resources

When you no longer need Azure App Service and the related resources that you created in this tutorial, you can delete them.

Use the Delete functionality on the DevOps Projects dashboard.


Source: https://www.zenesys.com/blog/implementing-ci-cd-pipeline-on-azure

Comments

Popular posts from this blog

Creating S3 Buckets using Terraform

In this blog post, we will learn to create S3 Buckets using Terraform - Infrastructure as Code. Table of Contents ● What is Terraform? ● What is S3? ● Installation of Terraform ● Installation of AWS CLI ● Configuring AWS CLI ● Create Working directory for Terraform ● Understanding Terraform files ● Creating Single S3 Bucket ● Creating multiple S3 Buckets PreRequisites ● Installation of Terraform ● Installation of AWS CLI ● IAM user with Programmatic access  What is Terraform? ● Terraform is a tool to create , delete and modify the resources. ● Supported clouds such as AWS, Azure and GCP , IBM cloud etc. What is S3? S3 stands for Simple Storage Service. Amazon S3 has a simple web services interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the web.  Installing Terraform 1. Using binary package (.zip) 2. Compiling from source Install Terraform From the link provided above, Download the suitable packag...

10 Best Python Libraries For Machine Learning

With the increase in the markets for smart products, auto-pilot cars and other smart products, the ML industry is on a rise. Machine Learning is also one of the most prominent tools of cost-cutting in almost every sector of industry nowadays. ML libraries are available in many programming languages, but python being the most user-friendly and easy to manage language, and having a large developer community, is best suited for machine learning purposes and that's why many ML libraries are being written in Python. Also, the python works seamlessly with C and C++ and so, the already written libraries in C/C++ can be easily extended to Python. In this tutorial, we will be discussing the most useful and best machine-learning libraries in Python programming language. 1. TensorFlow : Website: https://www.tensorflow.org/ GitHub Repository: https://github.com/tensorflow/tensorflow Developed By: Google Brain Team Primary Purpose: Deep Neural Networks TensorFlow is a library developed by the G...

Benefits of Having the Right Zoho Implementation Partner over Freelancer?

Benefits of Having the Right Zoho Implementation Partner over Freelancer? In today’s business world, technology plays a critical role in improving efficiency and streamlining processes. Customer Relationship Management (CRM) software is one such technology that has revolutionized how businesses operate. There are many CRM software available in the market, but one of the most popular and comprehensive solutions is Zoho CRM. What is Zoho Implementation? Zoho implementation refers to setting up and configuring Zoho’s suite of applications for an organization’s specific business needs. Zoho offers a wide range of cloud-based software applications, including customer relationship management, project management, accounting, human resources management, and many more. Zoho Implementation typically involves several steps including Identifying business requirements and selecting the appropriate Zoho applications.  Configuring and Customizing the applications to meet business-specific require...