Super Easy Azure Function Deployments with DevOps
| June 26, 2019 | in
Azure Functions are pretty cool and, from the perspective of an Azure .NET developer, they are almost the perfect place to drop some code. They are basically stateless services in the cloud. What else could you want?
Azure DevOps is Microsoft’s solution for hosting software projects in the cloud. We use it for almost everything we do. It provides a nice hybrid between source hosting, builds, and task management.
Setting up and deploying to Azure from within DevOps is easy, you just need to configure a build and a release. And Microsoft has optimized the process down to a few clicks from within the Azure portal. Yep, no build config, no release config. Just a little dialog in the Azure portal.
Let’s step through how to deploy an Azure Function.
First, you need to create an Azure Function application inside of the Azure Portal. Once that is done, you can configure your deployment from the Deployment Center menu inside of your Function app.
Click Azure Repos.
Click Azure Pipelines (Preview).
Enter your account information.
Click Continue and wait a couple of minutes. You will have your Azure Function deployed online.
The few dialogs inside of Azure didn’t do any magic, and that is what I love about it. What it did was just configure some existing tooling in Azure DevOps to publish an Azure function. You can see this by looking at Azure DevOps.
Creating Azure Functions and setting up a deployment isn’t a super-complicated task. Even if you start from within DevOps, you are not in for a battle. Microsoft makes it pretty easy to write C# Azure Functions and deploy them to the cloud. But the super-fast automation of starting from within Azure and getting a fully-built out pipeline saves a lot of time. Plus, you don’t have to remember all the details of all the steps. Microsoft does it for you.
If you have any questions or comments, hit me up on Twitter or sound off in the comments below.