Last updated 21/07/2021
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.
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.
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 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:
With the help of Azure DevOps Pipeline, we can achieve these following pointers:
Source
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.
Source
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.
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
You will have to visit Azure Website to sign in or signup to Microsoft Azure Portal
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.
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.
Go to start free and since you are logged in to the Azure portal, it will take you to the Azure DevOps portal
You will have to start by creating a new organization that simply means a structure to help you group and store your project.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
Your complete release definition should now look like the image below.
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.
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.
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!
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.
* Your personal details are for internal use only and will remain confidential.
ITIL
Every Weekend |
|
AWS
Every Weekend |
|
DevOps
Every Weekend |
|
PRINCE2
Every Weekend |