Showing all posts tagged: 'Automation'

A 16-post collection

Enforcing TLS version on Azure WebApps with Resource Manager Policies

Azure Policies are an amazing, albeit well-hidden, feature that allow subscription administrators to define and enforce specific rules on how Azure Resources should be deployed. [Azure Policies](https://docs.microsoft.com/en-us/azure/azure-policy/azure-policy-introduction" target="_blank) have been around for a long time, however they only became a first-class feature on Azure recently by getting a dedicated section in the portal. Therefore, when working with Azure Policies in the portal these days, you can now see all the definitions and assignments in one central place, making it easier to manage infrastructure and set explicit rules to enforce …[read more]


Keeping your Azure Search Index up-to-date with Azure Functions

Azure Search can work really well with Azure Blob Storage. It can automatically index and analyse documents uploaded to a Storage Container to make it easy for you to expose the data in your application. When working with Blob data, Azure Search is designed to incrementally add new documents automatically. However, where it gets really tricky is when blobs are deleted from storage. The index doesn't get updated automatically, so the data ends up in a stale state. There's a way to use a soft delete approach to indicate to an Azure Search data source that a document/blob should …[read more]


Deploying your code to production doesn't have to hurt

This blog post is at the back of a conversation I had on Twitter with a few people about how (not) to deploy code to an environment. It all started after reading a blog post by Jesse Liberty with the title Azure For Developers – Part 3: Deploying from Visual Studio. I have huge respect for Jesse and I know he's been around for much longer than I've been. However, I felt that he omitted something very important from his blog post. The fact that although deploying from Visual Studio works great and is super convenient, this is something that should …[read more]


Monitor Azure Web Application backups with Azure Functions

For most of your monitoring and alerting needs, [Azure Monitor](https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-overview" target="_blank) should be the tool of choice. It's made the whole process so much easier and streamlined while, for the first time, providing management through the portal. I've already blogged about various monitoring options [here](https://cmatskas.com/monitoring-applications-and-infrastructure-on-azure/" target="_blank). However, there are a still few edge cases (not for long) for which Azure Monitor can't be the solution. In this instance, I needed a way to monitor and alert on failed backups on Azure Web …[read more]


Deploying Functions with ARM templates and inline code

Last week I started a mini-series that focused on [Azure Functions and DevOps. The tooling is still being worked and in the interim we need a solution in order to do proper CI/CD with Azure Functions. In this post we're looking into how to deploy Azure Functions using ARM Templates only. That's correct. This is a one stop solution but requires that you include your function code inline to the ARM JSON template. This is somewhat undocumented and I had to figure out how do it with help from the Azure PG (product group). The good parts Obviously this …[read more]


Deploying Azure Functions with ARM templates and the Kudu REST API

This approach is by far my preferred and favourite. Ok, it's not perfect but I believe that it provides the most open source, versatile and flexible way to deploy your functions using any tool and any platform. This one does not require you to install any special tools other than the Azure CLI on your build server. In this step, rather than trying to do everything from one file, i.e. the ARM template, I decided to go with the 2 step approach: Deploy the ARM template with the Application Service and Function(s) structure Deploy the Function(s) code. …[read more]


Service Principals in Microsoft Azure

What is a service principal? Azure has a notion of a Service Principal which, in simple terms, is a service account. On Windows and Linux, this is equivalent to a service account. These accounts are frequently used to run a specific scheduled task, web application pool or even SQL Server service. In a cloud context, Service Principals are the new paradigm. They are great because they allow you to provision an account that only has enough permissions and scope to run a task within a predefined set of Azure resource. It is vital that you don’t use your own …[read more]


The new Azure Management Fluent API has landed

Hello friends. Did you hear the news? Did you read the announcement? There's a new [awesome] Azure Management Fluent API for C#. The [announcement](https://azure.microsoft.com/en-us/blog/simpler-azure-management-libraries-for-net/" target="_blank) went out today and as soon as I saw it I knew I had to give it a try! But first, let's see what the team had to say about the release: One C# statement to authenticate. One statement to create a virtual machine. One statement to modify an existing virtual network, etc. No more guessing about what is required vs. optional vs. non-modifiable. And …[read more]