Disclaimer: this is an experimental project and should not be used as-is in production
The goal of this project is to experiment with the migration of functions in .NET in-process to .NET8 isolated using deployment slots as described in this migration guide
azd provision
Deploy the initial version of the Function App written in .NET6 to the production slot.
A sample code was provided in the ApiInDotNet6InProcess directory.
func azure functionapp publish $FUNCTION_APP_NAME --dotnet
Test the Ping
function (on the main/production slot) and ensure it returns PONG .NET6.0
.
Deploy the migrated version of the Function App written in .NET8 to the staging slot.
A sample code was provided in the ApiInDotNet8Isolated directory.
func azure functionapp publish $FUNCTION_APP_NAME --dotnet-isolated --slot staging
Test the Ping
function of the staging slot and ensure it returns PONG .NET8.0
.
az functionapp deployment slot swap --name $FUNCTION_APP_NAME --resource-group $RESOURCE_GROUP --slot staging --target-slot production
Test the Ping
function on the production slot and ensure it returns PONG .NET8.0
.
Don't forget to delete the resource group once you have finished testing the migration with slot swapping:
azd down