How to use Azure Deployment slots with multiple function apps and an app service

222 views Asked by At

I have gone through tutorials on creating and using deployment slots for app services, but have a question on how to handle using deployment slots for several function apps that service the app service. How can one setup deployment slots that swap several at once? In my case, I have 5 function apps that the app service uses (one of them that does DB communication and migrations). Do I need to swap each on individually or can they all be linked?

1

There are 1 answers

0
SiddheshDesai On

You can create 5 of your each function app in 2 different slots each, One in Production slot and another in Staging slot like below:-

I have 2 function apps deployed in same app service with 2 different Deployment slots added to both the Functions so we can manage them independently.

enter image description here

Function 1:-

enter image description here

Function 2:-

enter image description here

Swap:-

enter image description here

Here, You can manage individual Function app independently by swapping them in another slot. Without affecting another function app as every Function app have their separate Staging and Production slot. And use the Function specific deployment slots while making any changes or source deployment to your function app by filtering at their Deployment Slot level.

Another method is to keep all the Function app in the same slot instead of creating separate Slots and swap them together into another slot.

Refer this MS Document for more information Azure Functions Deployment Slot feature.