I am constantly asked to talk about DevOps and what DevOps means for Microsoft. Although there are many definitions of DevOps floating out in our industry, at Microsoft, DevOps is the merging of people, process and products such that we can continually deliver value to our end users. And clearly, VSTS/TFS and Azure are the products which enables this whole DevOps mindset.
Randy Pagels and I created a DevOps demo which show how VSTS/TFS and Azure can do this. For the next couple of blogs, I will walk you through how to set up our DevOps demo using an asp.net website backed by sql server hosted in Azure. Source control, work item tracking, CI builds and CD pipelines , unit tests, automated ui tests and load tests are all done using VSTS.
All artifacts for this blog series can be found here:https://github.com/abelsquidhead/MercuryHealth
Table Of Content
Part 3: Setting up your Git Repo
Part 4: Setting up your Build
Part 5: Setting up your Release Pipeline
Part 6: Full Demo Walkthrough
This demo uses the git repo in VSTS as the pull request/code review workflow in the git is so much nicer than TFVC. First we will upload the source code for this demo to our git repo. Then we will update the source code to use Application Insights.
The team project should have already been created with a git repo.
Uploading Code for the Demo
This walkthrough assumes that you already have git installed on your machine. If not, you can download posh-git using chocolatey here
- Bring up a Windows PowerShell window box and browse to where you want your local git repo for this demo to be
- In your browser, click on the Code hub and click on the copy button to copy the Clone Url
- Go back to your command box and type git clone <paste the Clone Url>
- Enter your username and password
- Type dir and enter. You should see a new folder named MercuryHealth
- cd MercuryHealth
- Copy everything from the Repository directory you downloaded from GitHub to this directory
- Type dir. Your directory should now look like this
- git status
- If this is your first time setting up Git, you must set your account’s default identity.
a. Git config –global user.email firstname.lastname@example.org
b. Git config –global use.name “your name”
- git add *
- git commit -m “Initial checkin of project”
- git push
- Enter user name and password
- Browse to your Resource Group in the Azure Portal and select the ApplicationInsight resource
- Copy the App Insights Instrumentation Key
- Open up $/src/MercuryHealth.Web/ApplicationInsights.config with your favorite editor
- Paste your instrumentation key into ApplicationInsights.config
- Go back to the Azure Portal and select Getting Started
- Click on Monitor and Diagnose Client Side Application
- Open the file $/src/MercuryHealth.Web/Views/Shared/_Layout.cshtml in your favorite editor
- From the command box, type git status
- Type git add *
- Type git commit –m “Added application insight keys to the project”
- Type git push
Next up, part 4. Setting up up your Build