You have been given an ARM template for a Linux VM to deploy to Azure. Using Azure DevOps, you must check the ARM template for errors (linting), and deploy the VM to the provided Azure environment.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create an Azure DevOps Organization
- Login to the Azure Portal using the provided credentials.
- Search for "Azure DevOps" from the services menu.
- Create a new organization and project named
MyFirstProject
.
- Push Code to Azure Repos
- Login to the Linux VM provided with this lab.
- Use the following command to clone the
node-express
branch of the repository:
git clone -b arm https://github.com/linuxacademy/content-az400-lab-resources.git
- Remove the GitHub origin with the following command:
git remote remove origin
- Copy the commands from Azure Repos to add the new remote origin and push the code.
- Create the Build Pipeline
- Create a new Azure Build Pipeline in the classic editor.
- Add the appropriate tasks to install
jsonlint
on your build agent. - Run
jsonlint
and specify thetemplate.json
file. - Fix any JSON errors.
- Copy and publish the file to the build artifact staging directory.
- Create the Release Pipeline
- Create a new release pipeline in Azure DevOps.
- Use the artifact created in the previous objective.
- Create the necessary task to deploy the arm template.
- Make sure to create a service connection using the service principal provided.
- Ensure that the service connection is used within the release pipeline task.