Azure / Azure-Functions

1.12k stars 199 forks source link

Deployment slots with Functions #45

Open lindydonna opened 8 years ago

lindydonna commented 8 years ago

Article explaining how to use it with Azure Functions

miantosca commented 7 years ago

Are deployment slots planned for azure functions? Is the alternative for now to setup a function app service for each slot - dev, test, prod for instance and deploy to those?

lindydonna commented 7 years ago

They are planned, yes, but we don't have a timeline to share. A separate Function App for each slot is a good solution in the meantime.

SimonLuckenuik commented 7 years ago

@lindydonna, is the limitation applicable to both Dedicated and Consumption Plans, or only Consumption Plan?

SimonLuckenuik commented 7 years ago

With the newly released Functions Proxies, using the Application Settings to customize the URL could be a good temporary alternative to the deployment slots: https://%CURRENT_FUNCTION_DOMAIN%/api/orders

Ref: https://docs.microsoft.com/en-us/azure/azure-functions/functions-proxies#a-namemodify-requestsamodifying-backend-requests

lindydonna commented 7 years ago

@SimonLuckenuik The limitation is on both regular App Service and Consumption plans.

That is a really nice trick on using Functions Proxies!

SteveALee commented 7 years ago

What is the best way to escalate this as a feature request? I mean the feature not the article :)

lindydonna commented 7 years ago

@SteveALee You should consider it already escalated as a feature request, and it's under development. (No dates to share, unfortunately.)

APErebus commented 7 years ago

ooooo, what is this? slots?

fabiocav commented 7 years ago

😀

kverpoorten commented 7 years ago

I'd like to deploy my function app to a slot using a VSTS build and release. Are there any manuals available for that already?

sjkp commented 7 years ago

@kverpoorten as far as I can see there is nothing special about the slots from webapp slots, so you should be able to use the same vsts task to deploy to an azure function slot as you use to deploy to an web app slot.

sadgit commented 7 years ago

I have enabled a develop slot and tried to switch it to the develop branch - now it seems FUBAR on both the slot and production.

fabiocav commented 7 years ago

@sadgit can you provide more information about what you're seeing? What error(s) are you running into?

sadgit commented 7 years ago

I have several Azure function apps with CI from VisualStudio.com. With the release of Slots setup a 'develop' slot for one branch and then production slot for Master. Setup the CI on the slot to take from 'develop'. The slot simply shows No Deployments. An afternoon of head scratching and frantic Binging I found the history tab and these errors. This is now happening on other function apps without slots.

sadgit commented 7 years ago

PS - I wondered whether it was something the cloning of the slot during slot creation process? I seems a common use case to have Master to Production perhaps with auto-swap and a develop version. Same repo different branch.

sadgit commented 7 years ago

Hooray - all seems to be back working this morning For logs check here https://**myCorp**.visualstudio.com/**myProj**/_apps/hub/ms.vss-servicehooks-web.manageServiceHooks-project

Thanks MSFT

NapalmCodes commented 7 years ago

Is there a reason why deployment slots are not compatible with the consumption plan? Is this a short term limitation or going to be a long term restriction?

lindydonna commented 7 years ago

@napalm684 Deployment slots are supported for the consumption plan; is it not working for you?

NapalmCodes commented 7 years ago

@lindydonna correct it gives me the error that only one slot is supported for the consumption plan if I need multiple I need to use an app service plan.

lindydonna commented 7 years ago

@napalm684 That's correct, only one slot is currently supported on the Consumption plan. We may change this in the future.

NapalmCodes commented 7 years ago

@lindydonna I hope more get added a single slot really doesn't work for me under the premise of trying to consolidate down to a single function app with slots for dev, test, stage and production. Another related question, if you use slots can FTPs be directed to deploy to a specific slot? If that doesn't work then slots just aren't going to cover my scenario currently anyway.

PingPongSet commented 5 years ago

wathing it

petro2050 commented 4 years ago

I was able to start using deployment slots on a consumption plan, but I'm having issues with the auto swap feature. I'm getting 503 errors for a few seconds when the new deployment becomes active.

https://github.com/Azure/Azure-Functions/issues/1655