Please enable JavaScript to view the comments powered by Disqus. How to Implement DevOps with Microsoft Azure

 

 

 

How to Implement DevOps with Microsoft Azure

NovelVista

NovelVista

Last updated 21/07/2021


How to Implement DevOps with Microsoft Azure

We have been talking a lot about DevOps lately. Isn’t it? 

And why shouldn’t we?

After all, DevOps is the new face of the work culture revolution! But DevOps and Microsoft Azure together? How it is possible, really? How can someone go forward with implementing DevOps with Microsoft Azure? So let’s see what DevOps actually do 1st. 

DevOps is a methodology where you can plan, develop, build, test, deliver, and monitor your application to provide value in a continuous manner. But it is not just a framework though, it’s an entire culture! So let’s tell you all about achieving a DevOps culture through Microsoft Azure starting from the scratch itself! Let’s start with all the acts of Implementing DevOps with Microsoft Azure! Consider this to be a guide when you are actually going to apply it.

Implementing DevOps with Microsoft Azure 101: How to achieve DevOps?

Before we get deep into the subject of DevOps implementation with Microsoft Azure, let’s start with the main mantra of achieving a DevOps culture. Binding your whole organization with DevOps is pretty simple actually. 

Here’s how:

You just need to remember one thing that DevOps is aimed towards only one main goal: Shorten the cycle time of software development. For this, the following would be counted as terms and conditions.

Continuous Integration: This includes merging and testing of codes that help you to find faults. 

Continuous Delivery: This ensures the constant deployment of software solutions to the production and testing environment.

Version Control — using git which enables effective collaboration and communications between teams in their daily development activities.

  • Agile planning and lean project management
  • Monitoring and Logging

Now, there are many platforms, tools, and frameworks that allow you to implement DevOps like Puppet, Jenkins, Ansible. So why choose a cloud platform for the same?

Here’s why:

Implementing DevOps with Microsoft Azure 102:DevOps Services supported by Azure

It’s a known fact that Microsoft Azure is a cloud service provider. But, some of its features support DevOps in a very huge way.

Let’s see what they are!

Azure Boards

The Azure Board is almost similar to the Atlassian Jira tool. It’s an agile tool that helps you to plan, track, and discuss with your team. 

azure-devos-add-task-checklist

Source

Azure DevOps Pipelines

Azure Pipeline is a cloud service that can be used to build and test our code project automatically. The Azure pipeline possesses a lot of capabilities like continuous integration and continuous delivery to consistently test and builds your code regularly and ship to any target. Azure DevOps Pipeline is built with the following concepts:

  1. Pipeline: It is a workflow that defines how our test, build, and deployment steps are run.
  2. Stage: It is a logical boundary in the pipeline. It can be used to mark the separation of concerns. Each stage contains one or more jobs.
  3. Job: A stage can contain one or more jobs. Each job runs on an agent. It represents an execution boundary of a set of steps.
  4. Step: It is the smallest building block of a pipeline. It can either be a script or a task. A task is simply an already created script offered as a convenience to you.
  5. Agent and Agent pools: An agent is an installable software that runs one job at a time. Instead of managing each agent individually, you organize agents into agent pools.
  6. Artifact: It is a collection of files or packages published by a run. The Artifact is made available to subsequent tasks, such as distribution or deployment.
  7. Trigger: It is something that is set up to tell the pipeline when to run. We can configure a pipeline to run upon a push to the repository, at scheduled times, etc.
  8. Environment: It is a collection of resources, where you deploy your application. It contains one or more virtual machines, containers, web apps, etc.
  9. Checks: Checks define a set of validations required before a deployment can be performed.
  10. Runs: It represents a single execution of a pipeline and collects the logs associated with running the steps and the results of running tests.

With the help of Azure DevOps Pipeline, we can achieve these following pointers:

azure-devops-pipeline

Source

Azure Repos

Azure Repos works in the same way as Git or Bitbucket. It supports collaboration to create better code with the help of pull requests and advanced file management.

azure-repos

Source

Azure Test Plans

Want to test your applications and improve the code quality? Azure test plans are right at your service!

It helps you to plan, execute, and track scripted tests with actionable defects and end to end traceability.

Not only this, Azure Test Plans allows you to not only set up and manage your test environment but it also gives you the privilege to test your web or mobile application on thousands of real devices that are distributed to beta testers and app stores.

Azure test plans help you monitoring usage with crash and analytics data as well.

azure-test-plans

Now, let us show you how Azure Pipelines can help us to achieve DevOps through Continuous Integration and Delivery of our application.

Implementing DevOps with Microsoft Azure 103: Achieving DevOps through Azure Pipeline

Sign In to Microsoft Azure Portal

You will have to visit Azure Website to sign in or signup to Microsoft Azure Portal

sign in to microsoft azure

If you already have an account, click on Sign in. It is going to sign you in by default if you had logged in to your account before or will take you to a sign-up page where you can put in  your credentials.

If you don't have an account, click on New to Azure Start allowed making a free account. You will need to have a Mastercard number and a Hotmail or standpoint email address to effectively make your account.

Once you have signed up successfully, you will be provided with free credits that you can use to access their services for free for a particular duration of time.

If you stick to the limits of the services that you are using, you will not be charged any extra penny.

After logging into the portal, it should look similar to the screenshot below.

sign in azure devops

Sign In to Microsoft Azure DevOps

Now, you need to open a new browser window and type azure DevOps. Click on the first link and it should take you to this page.

sign in devops azure dashboard

Go to start free and since you are logged in to the Azure portal, it will take you to the Azure DevOps portal

azure devops sign in

You will have to start by creating a new organization that simply means a structure to help you group and store your project.

Create new organization

If you click on the new organization button, it prompts you for the name and your organization gets created.

Once you create an Organization, you have to go ahead and create a new project. You’ll also need to mention the project name and the description and specify whether it's public or private.

create new 

The public organization is mainly for your open source project. Click on the create button option which should start your project that you are creating and once it's done, you should be able to see it.

demo project

At the bottom and side nav bar, you can see that there are those components that we talked about which include Azure Boards, Azure Pipelines, Azure Repos, Azure Test Plans, and Azure Artifacts.

At the next step, click on pipelines which should show you a similar view like this screenshot. Click on the new pipeline button to proceed

no build pipeline

You will have two options here. Either you can choose to use the current editor screen to choose your code repository or proceed to use the classic editor which we will use in this article which enables us to create a pipeline without YAML.

Mention the place of your dockerized Angular application code is, either existing from Github, Bitbucket, or the Azure repo and authorize It.

Dockerizing an angular application simply means adding a docker file to the root of your angular application.

selecting pipeline

Now, choose to either create your pipeline from a template or select an empty Job to create the pipeline from scratch.

We are choosing the empty job option for this blog, since we will be configuring the pipeline manually in the sections that follow below.

selectng a pipeline

We will add four different tasks for our CI/CD pipeline. Hosted Linux is being used as a Hosted Linux agent for it contains native docker support.

pipeline

You need to click on the plus icon to add a task and choose npm. Type “npm install” as the display name and in the command type “install”. This task will allow us to install the required npm packages.

dashboard

The second task will enable us to build the application using the Angular-CLI and place the code under the dist folder.

Type “Build Application” on the display name. The command is custom based on your configuration on the package.json scripts section.

The third and final task enables us to build the docker image and push it to the Azure Container Registry (ACR).

To create an Azure Container Registry follow the steps below.

  1. Sign in to your Azure account at https://portal.azure.com
  2. In the Azure Portal, choose New, Containers, then choose Azure Container Registry.
  3. Enter a Registry name, Resource Group, and select a Location.

create registry

  1. Wait for the Azure Container Registry deployment process to finish

Select Docker Build and Push from the list of tasks.

Type “buildAndPush” as the Display name then specify the container registry that we have just created and select the container repository. On the commands option type “buildAndPush”.

The other inputs will remain default as shown on the screen below.

angular-cloud-portal

Click on the save and queue option to begin the build process and once it completes a new docker image is produced and stored inside Azure Container Registry.

angular cloud-portal

We now need to set up an Azure web app to enable continuous deployment of our docker enabled app.

To do this, login to the Microsoft Azure portal and click on create a resource that opens Azure market place. Search for “Web app for containers and click on create. You are presented with a similar screen below.

azure-webapp

Proceed to fill in your details. Under the Docker tab, on the image source option, select Azure container registry which auto-populates for us the registry we had created earlier.

We are now able to choose our built image from the dropdown under the image option then proceed to click on Review + create

microsfot azure web app

The next step is to create a release pipeline that will deploy the image to our web app service.

Under pipelines’ main menu select the “Releases icon” and proceed to create the pipeline.

Select a Template to create the release pipeline from. Choose the Azure App Service Deployment template and click on apply.

azure app web

Under Tasks, you now have Deploy Azure App service as the default task. Configure the properties as shown below.

Once you complete configuring the properties, go to the “Pipelines tab” and click on the artifact and configure the details which enable you to select the latest built image artifact.

new release

Your complete release definition should now look like the image below.

all pipelines

 

Click on save, then new release. This proceeds to release our image to the new web service.

If the release is completed successfully then deployment will occur to our Webservice.

If you now check under logs, you are now able to see the URL where our app was deployed to. If you click on it, you should now be able to see your live application.

new release pipeline

If you now check under logs, you are now able to see the URL where our app was deployed to. If you click on it, you should now be able to see your live application.

angule web application hosted

Conclusion:

We guess there is nothing much to say. Except this, that if you follow these steps, it will give your DevOps journey a whole new meaning. So maybe try starting right away? If you still have doubts, feel free to drop them in the comment section below.

Oh yes, and don’t forget to check out our DevOps and Azure courses if you are seeking in-depth knowledge!



Topic Related Post

Securing the Pipeline: Integrating Security into Your SRE Practices
Ready for the Next Level? Top DevSecOps Skills to Master Before 2025
SRE in FinTech: Challenges and Opportunities

About Author

NovelVista Learning Solutions is a professionally managed training organization with specialization in certification courses. The core management team consists of highly qualified professionals with vast industry experience. NovelVista is an Accredited Training Organization (ATO) to conduct all levels of ITIL Courses. We also conduct training on DevOps, AWS Solution Architect associate, Prince2, MSP, CSM, Cloud Computing, Apache Hadoop, Six Sigma, ISO 20000/27000 & Agile Methodologies.

 
 

SUBMIT ENQUIRY

* Your personal details are for internal use only and will remain confidential.

 
 
 
 
 
 

Upcoming Events

ITIL-Logo-BL
ITIL

Every Weekend

AWS-Logo-BL
AWS

Every Weekend

Dev-Ops-Logo-BL
DevOps

Every Weekend

Prince2-Logo-BL
PRINCE2

Every Weekend

Topic Related

Take Simple Quiz and Get Discount Upto 50%

Popular Certifications

AWS Solution Architect Associates
SIAM Professional Training & Certification
ITIL® 4 Foundation Certification
DevOps Foundation By DOI
Certified DevOps Developer
PRINCE2® Foundation & Practitioner
ITIL® 4 Managing Professional Course
Certified DevOps Engineer
DevOps Practitioner + Agile Scrum Master
ISO Lead Auditor Combo Certification
Microsoft Azure Administrator AZ-104
Digital Transformation Officer
Certified Full Stack Data Scientist
Microsoft Azure DevOps Engineer
OCM Foundation
SRE Practitioner
Professional Scrum Product Owner II (PSPO II) Certification
Certified Associate in Project Management (CAPM)
Practitioner Certified In Business Analysis
Certified Blockchain Professional Program
Certified Cyber Security Foundation
Post Graduate Program in Project Management
Certified Data Science Professional
Certified PMO Professional
AWS Certified Cloud Practitioner (CLF-C01)
Certified Scrum Product Owners
Professional Scrum Product Owner-II
Professional Scrum Product Owner (PSPO) Training-I
GSDC Agile Scrum Master
ITIL® 4 Certification Scheme
Agile Project Management
FinOps Certified Practitioner certification
ITSM Foundation: ISO/IEC 20000:2011
Certified Design Thinking Professional
Certified Data Science Professional Certification
Generative AI Certification
Generative AI in Software Development
Generative AI in Business
Generative AI in Cybersecurity
Generative AI for HR and L&D
Generative AI in Finance and Banking
Generative AI in Marketing
Generative AI in Retail
Generative AI in Risk & Compliance
ISO 27001 Certification & Training in the Philippines
Generative AI in Project Management
Prompt Engineering Certification
SRE Certification Course
Devsecops Practitioner Certification
AIOPS Foundation Certification
ISO 9001:2015 Lead Auditor Training and Certification
ITIL4 Specialist Monitor Support and Fulfil Certification
SRE Foundation and Practitioner Combo
Generative AI webinar
Leadership Excellence Webinar
Certificate Of Global Leadership Excellence
SRE Webinar
ISO 27701 Lead Auditor Certification
Gen AI for Project Management Webinar