Before you start this challenge, please review these guidelines, recommendations and prerequisites:
- Form teams of four; you will work as a team, distribute tasks, and help eachother.
- The goal is to learn… If you see a task that you know well, let someone else on the team do it and instead help them if needed.
- Your team will share an Azure DevOps project, Azure resources and GitHub repos. You need to use your existing assets (none are provided). (Azure spend will be minimal and other resources are free.)
- All secrets must be stored in a vault (GitHub secrets, Azure Key Vault, etc.)
- The first three stories in the Kanban board (""Prepare..."") are prerequisites for all others.
- The different stories (challenge goals) are in order of dependencies although many can be done concurrently.
- Some of the tasks will require use of the Azure CLI or similar scripting mechanism.
- There are several places that you have options in terms of how to achieve the goal. You can use something you're familiar with if you're concerned about time, but feel free to try something new.
- There is too much to do in the time provided. Do what you can, learn what you can, and as possible choose the challenges that will be most interesting to you and your team.
- ENJOY!
The first challenge objective below provides guidance on setting up Azure Boards integration. All objectives after the first one are included for reference but should be managed using Azure Boards:
- Prepare an Azure DevOps project (from a template) for the DevOps Challenge
- Select or create an Azure DevOps org that has the ability to add guest users
- Create the project for the DevOps Challenge: https://aka.ms/PartnerDevOpsChallenge2019
- Grant other users permissions to the project
- Review the work items and plan your approach to maximize learning
- Prepare an Azure subscription
- Create a resource group for the challenge in an existing subscription
- Setup appropriate team permissions for the resource group
- Create an Azure Web App for Linux using the Node.JS 10 runtime in the resource group
- Create a Cosmos datbase in the resource group
- Prepare a challenge GitHub repo
- Create a public repo on GitHub
- Grant appropriate permissions to your team
- Connect the GitHub repo to the Azure DevOps challenge project
- Download the ZIP stored in the challenge repo; unzip and upload it to the new GitHub repo, and associate the commit with this user story.
- Setup branch protections to require PRs and at least one reviewer, including the repo administrator.
- Have two other team members test the access and branch protections by updating the README.md file, associating the commit with this user story
- Associate the PR with this User Story, complete the merge, and close the PR
- Create a continuous integration workflow using GitHub Actions to verify PRs
- Create a new GitHub Actions workflow to compile and test the Node.JS application whenever there is a pull request
- Add a status badge to the main README.md file and associate this user story with the commit
- Once the PR is succeeding with this new workflow, associate the PR with this User Story, complete the merge, and close the PR
- Update the GitHub Branch Protection on Master to require this workflow
- Add a continuous deployment Actions workflow
- Create a new GitHub Actions workflow triggered on pushes to master that compiles, tests, packages and deploys the application to the Azure Web App; trigger on any push to the master branch
- Make a visible change in the content so that you ccan easily verify deployment
- Once the PR is succeeding with this new workflow, associate the PR with this User Story, complete the merge, and close the PR
- Secure the application
- Enable security alerts
- Enable automatic security fixes
- Review security alerts
- Review security PRs and implement recommended fixes
- Collaborate with Issues and Projects
- Create an issue specifically naming all teammates, requesting a change to the readme
- Have a teammate modify the readme and issue a PR associated with the Issue
- Review and accept the PR, and close the associated issue
- Create a Project in GitHub; experiment with the basic capabilities and share learnings with the team
- Create an Action workflow to provision Azure resources
- Create Infrastructure-As-Code to provision the Azure resources described above. Use your choice of Ansible, ARM templates, Terraform or Pulum; commit the files into the provision folder.
- Make sure all secrets (usernames, passwords, tokens)… are properly secured
- Set the trigger to filter on any push to the provision folder
- Containerize the app
- Create a Dockerfile to package the application
- Provision a new Web App for Linux (Containers) against your exisitng app plan
- Update the infrastructure-as-code for your new Web App and verify it in the existing workflow
- Create a workflow to publish the resulting container to the container registry of your choice (GitHub Package Repository, Azure Container Registry, Dockerhub, ...); following the successful push to the container registry, deploy it to the new Web App
- Create reusable actions
- Identify reusable YAML in one of your workflows (e.g., script containing a group of Azure CLI commands)
- Create a new GitHub repo; create an action in that repo to encapsulate the reusable YAML
- Update your GitHub Actions workflow to use your new action