Category: Uncategorized

SEE WHATS CHANGED IN AZURE USING RESOURCE GRAPH: Part 2

This second part goes a little further than part 1. I could have went about this many ways, but I wanted to use Azure Resource Graph with a Logic App as why not eh?

So I created a dashboard in Azure from the queries I wrote and it looks something like this: –

So from the bottom part which says – Resources thats have No Tags I wanted to email a report to myself every x days.
So I created a Logic App which looks like this:-

Step 1 – is a recurrence trigger of x days
Step 2 – I call the manangement api which is -> https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01

With a JSON Payload like so:-

{
  "query": "Resources | join kind=leftouter (ResourceContainers | where type=='microsoft.resources/subscriptions' | project SubName=name, subscriptionId) on subscriptionId | mvexpand tags | extend tagKey = tostring(bag_keys(tags)[0]) | extend tagValue = tostring(tags[tagKey]) | where tagKey == '' and tagValue == '' | order by resourceGroup | project SubName, subscriptionId, name, ['Resource Type']=type, location, resourceGroup, tags",
  "subscriptions": [
    "subscription id goes here"
  ]
}

Step 3 – I then parse the JSON which looks like this:-


Step 4 – I use an initialize variable with the sample json returned from the API call in Step 2
Step 5 – I create an HTML Table which formats my results like so:-

Step 6 – I then send the email using whatever you like – I chose SendGrid and that looks like this:-

So every x days I get a report telling me whatever is in the Azure Resource Graph, formatted in an email.

Don’t forget to subscribe to my YouTube Channel.



See whats changed in Azure using Resource Graph

At work I needed to look and see if it was easy to figure out what resources have changed in Azure, in say the last day, week or month. Now there are multiple ways to do this but the one I like the most is using Azure Resource Graph (which I really like), that and some Kusto Query Language (KQL) and you can find out just about anything you want to about your resources. I’ve used Azure Resource Graph a lot and do workshops on it regularly, not sure why people dont use it more often tbh.


So if I want to see what has changed in a resource group in the last few days its a sample as reading this Microsoft web page: – https://docs.microsoft.com/en-us/azure/governance/resource-graph/how-to/get-resource-changes.

From here we can start to think about the kinds fo queries of interest.

These include:-

  • Show me all of the resources that have been created in the past 7 days.
  • Show me the tags for all resources and group them by Tag.
  • Show me all resources which havent been tagged.

This is the kind of things that interest me at the moment.

If we have a new subscription we can add a landing zone and add tagging by default to the subscription, the resource group, the resources etc, using Azure policy, which is all fine.

One other thing I like doing is adding a created date Tag to the resources on the day they were created incase I want to know this information at a later stage.

Lets get back to existing subscriptions where we cant add a landing zone for different reasons, I want to know which resources are tagged with a certain tag.

I found this really useful blog from some guy called John Klimster, who I have met in person and is a thoroughly nice chap and has a great blog!

If you’re interested the post I found particularly helpful for working in KQL and using Tags was this one from John.

I’m off to figure out what I need to do which will be hook my queries up to a Logic App and send a report via a schedule of some sort i reckon.

Don’t forget to subscribe to my YouTube Channel.



Festive Tech Calendar 2021- its a wrap

I would just like to say a big huge THANK YOU! to everyone who was involved in this years Festive Tech Calendar, organisers, helpers and the people who contributed thier submissions.

December is a busy time for most people trying to tie up loose ends with projects etc, and I appreciate its not a nice time to have to deliver a workshop or record a talk for our event.

This year we had 137 entries at the start if December but due to Covid we have had a number of people who had to withdraw.
To each and every person who withdrew, I just wanted to go on record to say you never need to say sorry to anyone, health and family health goes before everything else, thank you for submitting and I hope everyone submits again next year.

We had a record number of people taking part this year and its been the biggest event we have ran yet so next year we will continue to do the Festive Tech Calendar, if you missed out this time please submit again next year.

Everyone who submits gets to take part – and I do mean everyone.

I have learned a few things running these events of the past 4 years and I plan to record some videos on how to go about running an event like this using Sessionize.com, more on that coming in February.

This year we decided to raise money for charity and we set a target of £5000 which was hugely ambituous.

I am delighted to say that at the time of writing this we achieved £5000 and you can still donate https://www.justgiving.com/fundraising/festivetechcalendar

Before I go here are some figures thus far:-

  • 90 Videos
  • 7.7k Views
  • 514 hours worth of content watched

Next year we will make some changes so that we can concentrate more on raising money for a charity as this year time ran away from us with regards to this.

Thanks for reading and I hope you all sign up again next year!.




The struggle is real…

This December I’ll be 4 years into my Azure journey and the struggle is real.

Before going any further I am a very upbeat person, I love to have a laugh and wind people up, this isnt meant to sound like I am complaining, its more a personal story.

What do I mean by that? Well its a similar struggle for people starting out learning Azure.

Instead of where, and how do I get started (which is a common worry when starting out) I have thoughts like how do I stay relevant, what services should I keep an eye on, what areas should I go deep on?

I am what’s called a T-Shaped developer, think of the letter T – I have a breadth of knowledge and go deep in the dev space.

I never wanted to be the goto person in one area, thats just not me, I have always wanted to know something, about as much as I can, and therefor I pay a heavy price for that.

People who are experts in one area will tend to do better than the person who has a good knowledge across a lot of areas. Why do I think that, I just do, It’s hard to stand out as the goto person yeah, but if you are good at one thing then you can devote all of your energy to that one thing. I have a passion for learning and I can be like that forever.

So my struggle invloves, what should I learn?, I love working with Azure, its my primary focus area at this time. The thing to remember is technology changes, it evolves, the Cloud changes at speed. I keep an eye on trends ans I see where the trends are heading and If I am honest – not a huge fan of some of the latest technologies.

We seem to be making developing a solution a lot harder than it used to be, we seem to have black boxes which our code runs on which no one really fully understands. Maybe I am just old and need to get with the cool kids who knows.

So as you can see the struggle is real, keeping your skills up to date isnt too hard if you have the time and energy to do it. My struggle right now is deciding what technologies I want to learn, AI and Data, AKS, Machine Learning.

With Ignite coming in November I’m sure things might change and VNext is the next cool thing.

Anyways getting back to the main point, the struggle is real for all of us, not just the person getting started – we are all doing our best to stay relevant, to learn and help our customers.

Right now I am evaluting what I want to do next, I love my job and I am very lucky to work where I do. This is a personal choice I need to make and its a struggle figuring it all out.

What are you struggling with? – comment below.

Don’t forget to subscribe to my YouTube Channel.



To Don’t List

I had 2 weeks off and plans fell through for the second week and so I have had some down time to figure out my next move. I’ve been searching for something of late and wasnt sure what it was and I know I have found what it was I needed.

Off the back of finding what I needed I am creating a To Don’t list so that I can check this regularly just to ensure I am on track, so here goes.

  • Don’t consume Twitter, use it to post and leave it there.
  • Same with LinkedIn, share content but dont spend time scrolling through it.
  • Don’t purchase a book from Amazon, get half way through it and put it down for good.
  • Don’t keep saying yes to every new project that people want me to work on, work on you’re own projects.
  • Don’t spend time gathering resources for a project and then move onto the next thing because it might be a better idea.
  • Don’t start the podcast back up and then let it slide again, I learned a lot from speaking to people all over the globe and it was a lot of fun.
  • Don’t spend time blogging just for the sake of blogging.
  • Don’t work on cool Azure projects at work and not blog about them either.
  • Don’t do any more exams unless I need to know about the thing for work, you’ve done loads, concentrate on your other projects.

Ok so this was a very quick blog post to keep me in check. I will probably add to it as I go.

Don’t forget to subscribe to my YouTube Channel.



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.