Enable Soft-delete for Key Vault to be able to recover from disaster, recover keys, secrets, certificates or the whole Key Vault on accedental deletion.
Last week we had an incident in which we had deleted the wrong secret from our Azure Key Vault. After some research we found that it could have been recovered if we had used the Soft-delete in Key Vault. However, we did not know about this option and could not recover the item.
Continue reading “Azure Key Vault recover keys, secrets and certificates”
Azure SQL, do not forget to schedule maintenance
Many users on Azure SQL Server do not realize they have to do their own maintenance on Indexes. This index will slowly become fragmented and the performance will decrease over time. Azure SQL does not have a Job scheduler (agent) like on premise. In this post I’ll describe how to schedule a maintenance job from an ASP.NET Core application.
Continue reading “Run maintenance jobs on Azure SQL”
This article focuses on best practices regarding the automated deployment of resources to Azure. We have implemented Continuous Deployment (CD) pipelines including the provisioning of Azure resources for many customers, and we would like to share our experience so you can benefit from it. These practices will help you create more reliable, testable, reusable, and maintainable templates. Continue reading “Best practices using Azure Resource Manager templates”
On October 12 2017 I did session on Best Practices ARM Templates at Microsoft TechdaysNL. The presentation shows some best practices we learned while using ARM templates. Download the pdf:
When I have the recordings of the presentation, I’ll add them to this post.
Thanks to the 160 enthusiast who where there.
When deploying Azure Resources you want to know if all resources are deployed as expected. To check if the resources are correctly deployed you can open the portal and visually inspect the deployed recourses or you can also run some powershell to validate the resources. Why not automate these checks and add them to your deployment pipeline. To validate the resources, I extended the Pester Build Task to connect to Azure. A test that checks the deployment of a VM can look like:
Continue reading “Test Azure deployments in your VSTS Release Pipeline”
You can now make copies in serial mode. That means that the copies are created after each other instead of parallel. This can be a good idea when you update a live resource. The resources will go down and up after each other.
A sample of this:
The mode and batchSize are new. Mode can be serial or parallel. The batchSize configures how many objects are created at the same time in serial mode.
Condition did in ARM templates where not that easy to implement. In the new Azure RM APIs a property condition is added. This condition makes many scenarios a lot easier to implement.
Add condition property to a resource object, the resource object will only be deployed when the condition is met. The following sample code will show this:
The full code sample can be found at Ryan Jones GitHub.
The equals function will return a Boolean that is used as input for the condition.
This new feature in ARM Templates will make templates more readable, faster to develop and less need to copy one version of a template to different files to implement a condition.
Getting control over your deployment pipelines to Microsoft Azure Resources Manager with VSTS
When deploying resources on Azure with Azure Resource Manager you want to be in control of which resources are deployed and control their life span. To get the control you need to do deploy in a tested, standardized and reusable manner. This can be done by managing your resource creation as Infrastructure as Code.
Continue reading “Versioning ARM Template deployments”
Creating multiple blobs, move/rename blobs and delete blobs with advanced runtime bindings in Azure Functions.
The standard input and output bindings in Azure Functions are written in a declarative pattern using the function.json. When defining input and output declarative, you do not have the option to change some of the bindings properties like the name or make multiple outputs from one input. An imperative binding can do this for you. In this blog post I’ll show how to use imperative blob bindings.
Continue reading “Azure Functions imperative bindings”
Create a VSTS release pipeline for Azure Functions
Azure Functions enable you to easily run small pieces of code in the cloud. To do this right, you need to setup continuous delivery of the infrastructure and the code involved. Otherwise you will end with an uncontrolled environment where nobody knows what code is actually running. In this blog post I’ll describe how to setup a deployment pipeline for Functions with VSTS. This will enable you to deploy Functions as Infrastructure as Code.
From an deployment perspective an Azure Function contains of two parts:
- Azure infrastructure
- Function code
Both the ARM template and the code can be deployed from VSTS. By doing this, you can manage functions like any other Azure resource.
Continue reading “Use VSTS to deploy Functions as Infrastructure as Code”