VSTS and Git Integration for Deploying to Azure – Part 1

At work we use Visual Studio Team Services (VSTS) with git and in this post I’ll walk you through our development process for writing code and deploying it to a demo site on Azure.

I have become a big fan of VSTS, it has some cracking functionality built-in which saves you a lot of time and effort.

I will cover the following:-

Using Visual Studio 2017 with the git integration tools

So I open up Visual Studio 2017 and I first of all need to update my local copy of the master branch and pull down the latest version.

To do this I select Sync as shown above and then I choose fetch to fetch the latest commits and pull to pull them all down as below.

Ok, so now I have the latest code from the master branch as seen below.

Now I want to run the master branch and see if everything is good and check whats changed with the commits I pulled down but before I can do this I need to apply some local settings.

The reason for this is we have a number of Azure Services being used like event hubs etc and I have a local settings json file with my settings which I never check in. To apply these local settings I saved them into a stash and I will show you how I apply my stashes next.

So I click Stashes within Team Explorer and then I see the following.


And now I right-click on local settings and select apply stash, and this will apply my local settings to the project allowing me to run my own event hub instead of the one on our demo site as an example.

In order to get the Git Stash Extension you can download it from Extensions and Updates from the Tools menu within Visual Studio.


In Part 2 https://gregorsuttie.com/2018/08/24/vsts-and-git-integration-for-deploying-to-azure-part-2/ – I’ll show you how to use VSTS build pipelines to build and test your code and then deploy it to Azure.

How to debug issues with Azure Web Apps Part 1 – using Kudu

At work we have 2 Azure WebApp’s in 2 different regions in the world, we deployed the same code using a CI/CD pipeline and in one region the website returns a 404 error message.

So the following is some information and things I started looking into in order to try to diagnose the problem.


The website uses Azure Traffic Manager so that users in one part of the world get directed to lets say webapp1 and the others go to webapp2 (the one which isn’t working), we also have a custom domain name for our site and I mention this so that I can use something called Kudu.

Kudu what is that you ask? – well you can learn about Kudu here: – Kudu

Ok back to the problem at hand.

So to use kudu you add .scm. before the azure web app name like so https://<your web app name goes here>.scm.azurewebsites.net/ into a browser

This in our case looks like so: –


So what can I get out of using Kudu, it turns out you can find out quite a fair bit of information around your running webapp.

Here is a quick list of what you can find out using just the environments tab within kudu

  • System info
  • AppSettings
  • Connection Strings
  • Environment variables
  • Path
  • HTTP Headers
  • Server Variables

Debug Console
Allows you to choose CMD (a command window) or PowerShell window where you can actually see the list of files on the server where the webapp is running and do loads more.


Or if you prefer PowerShell instead.


This is very cool as you can see the list of files you have deployed, check version numbers and do all manner of things including the following:-

  • View the System Files
  • Add folders and files
  • Delete / Edit / Download individual files

So who says you don’t get access to the files on your Azure WebApp deployment 🙂

Process Explorer

  • View the running processes on the server
  • Get a memory dump of processes


    • Diagnostic Dump
    • WebJobs Dashboard
    • WebHooks
    • Zip Push Deploy
    • Download Deployment Script
    • Support

Site Extensions
View a list of extensions you’ve added to your Azure WebApp

I am off to go poke around and use these tools to see what I can find.

In the next post I will show you how to setup and use diagnostic logs to look more into the actual issue I am facing, but for now enjoy Kudu.

Vulnerability Scanning your Azure App Service

At work we were asked how do we scan a website we have deployed to Azure for vulnerabilities and I wanted to share how we go about it by using Tinfoil https://www.tinfoilsecurity.com/azure

Within Azure if you have an App Service plan you can click on that from App Services within the Azure Portal and then look for the following:-





After you click on that then look for Premium Tools like so: –

Once you click on Security Scanning you can the add a service called Tinfoil Security


As you can see this is a paid service which will scan your website for security vulnerabilities.


You can read more on this here: – https://azure.microsoft.com/en-gb/blog/web-vulnerability-scanning-for-azure-app-service-powered-by-tinfoil-security/

Visual Studio Team Services – Gated Check-ins: How-To

So you using Visual Studio Team Services (VSTS) and you have some build definitions and your team are doing pull requests but you want their branch to run a build before the pull request is reviewed.

The steps to add gated check in are like so:-

  1. Log into VSTS
  2. Go to the Code Menu and then select Branches
  3. From the list of branches look to the right of master for 3 dots … (ellipses)
  4. Click the 3 dots and then select branch policies
  5. Look on the left under Branch policies
  6. Click on Add build Policy
  7. Choose your build pipeline
  8. Fill that out and then give it a name
  9. Make sure it’s enabled
  10. Now when a user goes to create a pull request and pushes they’re code
  11. The gated check-in will check that the users branch builds before anyone can review the pull request.

This add a quality gate to your check-ins using VSTS.

Hope that helps

Microsoft Azure Infrastructure and Deployment (beta) AZ-100

The following is a study guide for the AZ-100 Azure exam

Manage Azure subscriptions and resources (15-20%)
Manage Azure subscriptions

Analyze resource utilization and consumption

Manage resource groups

Implement and manage storage (20-25%)
Create and configure storage accounts

Import and export data to Azure

Configure Azure files

Implement Azure backup

  • May include but not limited to: Configure and review backup reports; perform backup operation; create Recovery Services Vault; create and configure backup policy; perform a restore operation

Deploy and manage virtual machines (VMs) (20-25%)
Create and configure a VM for Windows and Linux

  • May include but not limited to: Configure high availability; configure monitoring, networking, storage, and virtual machine size; deploy and configure scale sets

Automate deployment of VMs

  • May include but not limited to: Modify Azure Resource Manager (ARM) template; configure location of new VMs; configure VHD template; deploy from template; save a deployment as an ARM template; deploy Windows and Linux VMs

Manage Azure VM

  • May include but not limited to: Add data discs; add network interfaces; automate configuration management by using PowerShell Desired State Configuration (DSC) and VM Agent by using custom script extensions; manage VM sizes; move VMs from one resource group to another; redeploy VMs

Manage VM backups

  • May include but not limited to: Configure VM backup; define backup policies; implement backup policies; perform VM restore

Configure and manage virtual networks (20-25%)
Create connectivity between virtual networks

Implement and manage virtual networking

Configure name resolution

Create and configure a Network Security Group (NSG)

Manage identities (15-20%)
Manage Azure Active Directory (AD)

Manage Azure AD objects (users, groups, and devices)

Implement and manage hybrid identities

Global Azure Bootcamp – Glasgow April 21st 2018

Saturday April 21st was the day for the Azure Global Bootcamp which say people attend user groups all around the world as you can see below, so we all spent a day as the Azure community learning all about Azure in many different ways from speakers all around the globe.

I took part and my talk was on learning Azure and becoming ready for the exams into the bargain.




As promised here are my slides:- HowToLearnAzure3

The Glasgow event was awesome and we also had Analben Mehta talking about serverless and Azure Functions and then we had Kenny Lowe talking about Azure Stack, great content and lunch and beers/soft drinks provided, all in all great to be apart of and hopefully people enjoyed they’re day.

Hope to see the people attended at the next Glasgow Azure User Group.

Investing in Yourself

I listen to podcasts and read twitter probably a lot more than I should – why you may ask?

Well for me it’s about investing in yourself, if you want to be smarter than you are currently it wont happen itself, you have to invest time in yourself.

Investing in myself for me means I have dreams which I will fulfil and I have set goals for myself – this year alone I’ve been promoted, done some internal talks, learned a lot about Azure and even enough to do an external talk on it. I plan to do many more talks on Azure going forward.

I’ve written a few blog posts and this will continue when I get some spare time after I pass the 70-532 Azure exam, which I will.

Part of the reason why I want to continue on investing in myself is so that I can surround myself with quality people who I can learn from. I have had my fair share of disappointments in my career and yet I keep going. I will never stop taking hits along the way, I’ve failed the 70-532 exam twice now but I will pass it.

Investing in yourself takes time and it takes commitment, I am committed to learning Azure and passing at least 2 certifications in 2018.

Why Azure you may ask, well I  know .Net and will continue to learn .Net core in my spare time and use it with Azure as I go.

Failure is what life is about, suck it up and get over it.

If you’re not happy in your job or it’s not giving you what you want out of it then move on, don’t hang around if it’s not what you want to do.

So I will continue to invest in myself, I have done throughout my career, but I think its worth talking about that if you have goals and dreams then you need to invest in yourself to achieve them, which I will.