Category: Uncategorized

Deploying your Azure Function using Azure DevOps

In this blog post we will cover how to deploy your Azure Function using Azure DevOps to try to get away from the right click publish way of deploying / or deploying straight from VS Code for example (ideally we want to run tests against our code). In my case I will be deploying a PowerShell Azure Function.

In Azure DevOps we have a new repo project which has our Azure Function code within a repository in Azure DevOps.

If we choose select Create Pipeline

We can then choose, Azure Repos Git like so:-

Then we need to select the Repo, next we select PowerShell Function App to Windows on Azure

Next we need to select the correct Azure Subscription, and then choose an existing Function App Name, then click Validate and configure.

So now we have a pipeline YAML file which will build and deploy your Azure PowerShell Function to Azure itself and the Yaml looks like the following:-

We can set our pipeline to build and deploy the code whenever any code changes are commited to the Azure Repo. As you can see highlighted above we do this by using a trigger: – master which means any commits to this branch will run the pipeline.

This is pretty simple stuff but its nice to know that Azure DevOps can tell from the repo that we have a PowerShell Azure Function and can create our yaml for us.



Skylines Summer Sessions

Over the summer this past year, I and Richard Hooper were interviewing people around the world on Azure related content and it has been an absolute blast, it has been so much fun chatting to some very talented individuals who have a passion for their profession.

We talked about all things Azure and threw in some fun questions along the way. If you haven’t checked out the content its around 30 minutes per video and we have slides and demo’s galore.

Checkout the speakers and content -> SkyLines Summer Sessions

Huge thank you to the amazing people who work at Skylines Academy, Amy, Brette, and Nick – thanks for setting this up and organizing it.


Thomas Maurer talks to us about Azure Arc with a very cool demo.

Thomas Maurer

Richard Hooper talks to us about AKS with a very cool little demo.

Richard Hooper

Dwayne-Natwick talks to us about Virtual Machine Scale sets and Virtual Machine Availability Sets

Dwayne Natwick

Peter De Tender talks to us about Terraform on Azure.

Peter De Tender

Maarten Goet talks to us about Azure Sentinel.

Maarten Goet

Wesley Haakman talks to us about Cloud Solution Providers (CSPs) and Managed Service Providers (MSPs)

Wesley Haakman

Shannon Kuehn talks to us about Azure VMware Solution (AVS).

Shannon Kuehn

Joe Carlyle talks to us about Azure FireWall.

Joe Carlyle

April Edwards talks to us about A/B Testing in Azure.

April Edwards

Adam Bertram talks to us about PowerShell

Adam Bertram

Sarah Lean talks to us about Datacenter Migration & Azure Migrate

Sarah Lean

Sam Smith talks to us about common mistakes with DevOps.

Sarah Lean

Gwyneth Peña talks to us about her journey to becoming an Azure MVP and a Cloud Engineer.

Gwyneth Peña S.

Wim Matthyssen

Wim talks to us about Azure spend and how to take control.

Pete Gallagher

Pete talks to us about Azure IoT.

Michael Levan

Michael talks to us about using Octopus Deploy with Azure.



Review of the year

Wow what a year its been.

  • Started a new job as An Azure Architect @ Intercept
  • Gave workshops at work on GitHub Actions, Azure PaaS, and Azure Governance.
  • Renewed as an MVP
  • Helped 9 people become an MVP.
  • 53 User Group talks / took part in.
  • Helped Organise this year’s Festive Tech Calendar, Global Azure Bootcamp UK / Ireland, Skylines Summer Sessions.
  • Spoke at Scottish Summit.
  • Passed the following exams: –
    • AI-900 Azure AI Fundamentals.
    • DP-900 Azure Data Fundamentals
    • DP-200 Implementing an Azure Data Solution.
    • DP-201 Designing an Azure Data Solution.
    • AZ-104 Azure Administrator Associate.
  • Became a Microsoft Certified Trainer.
  • Started my own YouTube channel.
  • Started the CloudFamily Podcast with Richard Hooper – https://anchor.fm/cloudfamily
  • Blogging – made a conscious effort to slow down blogging to spend time on other things, still managed over 10,000 views each month.

Whats next I hear you ask.

  • Speaking at Scottish Summit 2021
  • Azure AI-100 Designing and Implementing an Azure AI Solution
  • DP-300 Administering Relational Databases on Microsoft Azure
  • PL-900: Microsoft Power Platform Fundamentals

I don’t have much more planned than that.

Thank you
I have way too many people to thank in 2020, honestly, I am very fortunate to know some amazing people from the communities, everyone I work with day to day, shout out to everyone who I speak with on Twitter, everyone involved in running User Groups, event organizers, etc.
I am grateful to each and every person who I speak to, I do my best to get back to everyone and help where I can. I have noticed that none of you sleep, most of you are up at silly hours of the night.

Highlights this year
This one is easy, helping people who are passionate about helping others is something I will take time out of my day to help people with.

Summary
Next year, more of the same, helping people get started, sharing people’s content as it’s tough to create content and people spend a lot of time on this.
I’d like to see events that focus on newcomers to our communities and highlight their work.

Its been a horrid year for everyone, keep safe and keep your chin up and a smile on your face as much as you can.

Gregor



Ignite the Tour Zurich

Speaking At Microsoft Ignite the Tour, Zurich

On March 4-5th I will be attending and speaking at the Ignite Tour, Zurich and will be talking about Deployment Practices for Greater Reliability as part of the Ops learning path.

Within the talk I will cover how to move toward a more reliable deployment of software and infrastructure as code, I’ll cover testing and talk about what good looks like and show some demo’s of what an up to date app deployment looks like using services like AKS and Azure Devops.

I have never been to Zurich and speaking at conferences was one of my goals for this year, I am really looking forward to seeing some friends during my trip and be able to present.

I have been using Presenter Coach which is built into PowerPoint if you use PowerPoint online and will record a quick demo of this if people think it would be worthhwile.

If you’re attending let me know and I will come and say hi, maybe even see you at my talk.

Any questions let me know in the comments below.



Using Azure Recovery Vault to backup SQL Server within your Virtual Machines

In this blog post I’ll show you how to go about baking up SQL Server within your VM’s on Azure. I’m going to assume you have created an Azure Recovery Vault already.


Step 1 – Log into Azure and go into your Recovery Vault.


Step 2 – Click Backup.


Step 3 – Choose SQL Server in Azure VM (Preview).
Step 4 – Choose Start Discovery and that goes off to discover your VM’s which have SQL Server on them.
Step 5 – Select the Virtual Machine name(s) from the list and then hit the Discover DB’s button.
Step 6 Select Configure Backup.
Step 7 – Select from the list the instance(s) and then select the DB’s you wish backed up, you can also change the AutoProtect to ON from the drop down and this will always backup each new database added going forward.


Step 8 – Select Ok.



Step 9 – Choose your Backup Policy Options.

And that should be that, you now have your SQL Server’s within your VM’s on Azure backed up using a Policy which you can configure to suit your needs and change ant any time you wish.



What I learned last week – 13th August – 17th August

This week I have been busy mostly busy with bug fixing some code we have which used to be a windows service but is now a TopShelf service – if you use windows services you’ll know that there hard to debug, enter TopShelf

TopShelf is almost identical to a windows service but runs like a console app and that allows you to debug the code you would have within your windows service. To change your code from a windows service to a TopShelf service is minimal code indeed and well worth the small amount of effort.

What I learned this past week

  • Visual Studio 2012 and Windows 8 are available, if you use Visual Studio 2012 then check out a fantastic extension called Web Essentials – go check it out.
  • RavenDB – the guys who bring you Raven are hard at work on a 1.2 release which will bring a number of great changes, I have upgraded my home-brew project to the latest unstable version and the upgrades to the front end are cool and most welcome – more soon when I get more time hands on.
  • Select2 is a very neat little javascript library which you use to make your select boxes on web pages far sexxier – take a look here.
  • Elmahr 0.91 is out – more here.

What did you find useful this week? – please let me know by leaving a comment after the beep.



6 months into the job

Monday 11th May will see be me 6 months into my new job, my last place I was there for 11 years so it was quite a big thing for me moving on.

The new job is going well, I like the way we go about our work, we talk about it, we plan it, then we try as best we can to do proper test driven development.

Last week saw us starting a new RavenDB based MVC 3 project which will be using Agile techniques using sprints – it will also include some new tools which I havent yet used such as initializer and twitter bootstrapper – more on them to come as I get hands on during the project.

Starting a new project is always great, although we are under pressure to get this out the door, were luck to not having paying customers demanding software releases as soon as possible, this means we don’t cut corners and can produce code which has been thoroughly tested and due to the tools we use we know it’s of decent high quality.

Testing driven development has been quite a mind shift from what I have been used to, in the past I would have written the code and then done some manual testing usually from the front end, so this has been a great leap forward – it’s not the be all and end all of course and code can still contain bugs, however, changing code and knowing if you broke something is very nice.

The main difference has been using Resharper, style cop and unit tests along with a great build system – all checked in code has the same style and formatting which is rather nice.



I feel fortunate where I work

I moved jobs a little under 3 months ago and I know work for Maclean Electrical as a developer in a small team.

At Maclean’s I work in an Agile development team working on a number of projects which we use to drive the business forward and make the company more productive.

Maclean Electrical

Our code base is a made of a number of different projects including some windows service projects, some MVC web apps, a Windows Forms application and even an ASP.NET 2 web app.

The development team strive for a number of goals a couple of which are below as below:-

  • Test Driven Development – write a failing test, write the code tp make the test pass, refactor your code.
  • Code Coverage – the code you write should meet a high level of test code coverage, each project had individual levels but should be around 70% as a minimum.
  • Refactor where possible – refactoring the code you come across so that you always leave it better than you found it where possible.
  • If you break the build, its your responsibility to fix it, yeah it’s normally me I know.

We have a very nice setup at work using TeamCity as our build server and we have ported over a few things as Nuget packages to make life easier going forward – I can push a deployment of the code which runs all the unit tests from the build server to deployment or the test environment in one click.

At work we are about to start looking at using RavenDB and the developers are all being sent on a course in London for training on a 2 day course.

Working for a company who listens to their developers and has fantastic communication with everyone in the team is always good in my book. The developer’s in the team often chat about what technologies are new and who’s looking at what and what they have thought about it. We don’t stick with what we know and are always looking at new technology as a way of sharpening our skills which I love to do anyway.

I guess we have a team of passionate developers who communicate well and who really enjoy their jobs – if you enjoy your job it makes a huge difference. If you want a book on a particular subject then it’s ordered, if you come across a tool that you find helpful its bought.

Do you enjoy your job as much as I do? – I do hope so.



Steps for improving my development skills in 2012

Note:- This will be an on going blog post.

My plan is as follows:-

Firstly I plan to write a lot more code at home, to me that’s definitely the best way to learn. My first goal this year is to get better at writing unit tests/tdd and learning how to use mocking properly.

January: Watch all of John Skeets Tekpub series on C#, go through Roy Osherove’s Unit Testing Kata’s and watch the @tekpub and @pluralsight videos on Unit Testing.

How did I fare in January?:

  • having set out my goals above for January I would say I have learned a lot when it comes to TDD, still got a lot to learn especially when it comes to mocking.
  • I have watched the first 6 of the 25 video series so still got a lot to watch and learn about. The detail in this particular series is exceptional and if you want to learn c# in detail then this is for you.
  • I bought the following book on Dependency Injection :-

February: Get up close and personal with RavenDB.

March: Time to start an app using RavenDB.

I shall update as we go but this is a good start. Let me know if you come across something you think is worth learning.



My Review of 2011

In 2011 I started blogging and this post will be a review of the year which is about to come to an end.

At the start of 2011 I was working on a windows mobile 6.5 project up until around April, which was the first time I have even looked at any windows mobile development – the project itself was a good one and I enjoyed working on it – my overall feeling from it though was that windows mobile 6.5 was old and clunky and things seem to have gotten a lot better with the latest version including the mango release.

From April to August I was working for Barclay’s Stockbrokers in Glasgow working on moving their entire code base from windows server 2003 to server 2008 and re-writing the way al off this software was built and packaged using MSBuild and WIX.

From August to the start of November I was back at base which was Pulsion Technology working on various projects.

In mid November I resigned from Pulsion and took a job at my new employers Maclean Electrical in Cumbernauld, where I am now working. Moving jobs after 11 years was a little daunting at first but I am so so glad I made the move.

During the year I have purchased Tekpub and I also have a subscription to Pluralsight training which are both fantastic – I am also a Friend of Redgate and have been looking at their most recent releases which look very interesting indeed.

In 2012 I hope to travel to one of the big conferences at some point as I didn’t travel abroad this year – I also hope to get stuck into RavenDB soon and learn more about Agile and see what else 2012 brings with it.

Thats it folks enjoy 2012!