Welcome to the blog series, where we follow my learning path on Azure DevOps from the scratch. I was trying to look for a step-by-step guide from the internet but couldn’t quite find what I was looking for.
All the information is scattered across multiple sites and blogs, so I thought I would create my own blog, that follows my path in the world of Azure DevOps and more.
In the first part, I will be creating a storage account using ARM(Azure Resource Manager) template, through the DevOps pipeline.
At the beginning, we need to create DevOps Organization and a project. This blog is based on assumption, that you already have an existing Azure subscription and knowledge around it.
Head over to https://dev.azure.com and click on Start Free
Then you will need to login with your Microsoft account, to start creating the DevOps Organization. Give your organization a name and select the location where you want to host it.
Then its time to create first project. Select if you want it to make it public or private.
With DevOps, my first interest was to learn how to deploy ARM templates through the pipeline. For this, I needed a Hosted Pool Parallelism, which you can get for free from Microsoft to your Private project. You can apply for the Parallelism from here.
I will also be using Visual Studio Code, to create my ARM templates, you can download it from here, so download it, install it, and enable the Azure Resource Manager (ARM) Tools extension.
After I got all the prerequisites done, it was time to start creating my first ARM template. I needed a new storage account to my subscription, so I decided to create that through the pipeline.
In Visual Studio Code, I created a fairly simple .json file, called azuredeploy.json
So, after that is done, is time to head back to DevOps portal at https://dev.azure.com
In DevOps portal, head over to Repos and create a new Repo from the bottom by clicking Initialize
After that, you can upload your .json file, from the top right corner, under 3 dots.
Once you have uploaded your .json file, head over to Project Settings, on the bottom left corner of the page.
In the Settings, under Pipelines, select Service Connections.
Start creating a New Service Connection.
From the list, select Azure Resource Manager
Select the Recommended Service Principal
Select your Subscription, and the Resource Group you want to connect, or if you want to do it on a management group level, select that.
Once the Service Connection is made, head over to Pipelines, and create a new pipeline.
On the new Pipeline wizard, select use the classic editor
Select Azure Git as your repository
From the top, select start with empty job
On the Pipeline settings, give your pipeline a name and select the hosting pool
From the Agent Job, click the + sign to add a task
Fill in your details, select the previously created Service Connection, Subscription and Resource Group
Select desired location, and from the 3 dots next to Template, select the .json file you uploaded earlier.
For the Deployment mode, select Complete. **NOTE! The Complete mode will remove all the existing resources from that Resource Group that are not included in your template, so make sure to use Incremental mode, if you use Resource Group that has some other resources in it.**
Last thing to do, is Save and Queue your Pipeline, which will save and deploy your template.
After a while, the resources you specified in your .json file, will appear to the selected Resource Group.
This was the first part of my journey into Azure DevOps, and just barely scratched the surface. I will be posting sequels to this post as my journey continues.
Feel free to drop a comment, suggest things I should learn on DevOps, or what you think is great about DevOps.