I know it's experimental but it would be really nice to have some CLI support for slots in azure, both enabling support for them (even if i have to add --iAcceptToShootMyselfInTheFoot in addition because it's experimental :P)
Pretty pretty please :)
This feature is a must have for us too! hope to see --slot option added or just use the slot name as the publish target functionName-slotName. We rely heavily on slots for multiple environments during our development cycle.
I guess this covers https://github.com/Azure/azure-webjobs-sdk-script/issues/2073
sorry for the delay in response @wilsonge. I'll get to this soon
Thanks!
@ahmelsayed Really getting close to using this CLI for deployment in production CI/CD scenario. Thought maybe we could use az webapp stop and az webapp start along with swapping slots via az webapp deployment slot swap, but I get the error Cannot swap site slots because one of the slots is in a stopped state.. Using stickly slot settings so I can't just deploy to production slot and swap to the actual slot it goes to since it has to be running in order to swap.
Without the ability to deploy with the CLI directly to a slot here we are extremely limited in our adoption of this tool. Hope you guys are getting closer!
We just launched our PROD setup this week using the CLI. For now we have a complex script which disables both production and target slot function apps (_via function.json_), swaps slots, deploys via CLI, swaps back slots, then re-enables the function. Now that we are in production this is even more desired as this will now introduce downtime to do development deployments.
Hoping to get some status update soon! For now we still use the CLI to deploy, but we have PROD slot downtime during publishes
We are now deploying to function app slots using the kudu API zipdeploy approach until the CLI gets direct support. Hope to see slot-publishing supported soon!
+1 on this. The Azure Functions CLI is the cleanest way to do CI/CD for functions...hope to be able to deploy to slots using it soon.
Is there any news on this? A lot of teams use slots and it would be very nice if we could use this CLI to automate configuration an deployment of those.
closing as we're not adding new functionality to slots.
Does this mean you鈥檙e going to remove support for slots in functions? If so is there some blog post with reasoning? Just interested because to me slots were a major differentiator from AWS lambda functions
I also don't get it. Slots are a main feature that are vital for serious development because they remove the need to create a dedicated function app per environment.
But this isn't really "adding new functionality for slots"; it is simply adding support for slots to the Azure Function Core Tools.
Seems like an odd decision to decide not to support Azure functionality with the Azure CLI. Are slots going to be deprecated for Function Apps? Is the Azure CLI not intended to be the best way to interact with Azure programatically?
@ahmelsayed can you please clarify? Are you saying since SLOTS is still in preview that you are going to add it to CLI untill it is stable? It would be weird if I could not interact with SLOTS from the CLI. The use case I had in mind was to spin up a new SLOT per PR and then destroy it once the PR is merged.
@ahmelsayed, could you clarify your comment for us? You said the same thing on #353. Does this mean Microsoft is deprecating slots?
Anyone else have newer info?
@ahmelsayed Can't you please just respond to the concerns raised here? This silence is really not helping. I think most of the people here are paying Azure customers and these core tools are a vital part of our daily work, so please just say something.
I don't really know what our direction is for slots. I'd rather not do throwaway work, but it's unclear to me. I'm tagging some PMs from the team to clarify slot support.
@jeffhollan @dariagrigoriu @eduardolaureano
Thanks a lot for reopening this! FYI, I asked a similar question in the MSDN forums and got the following more favorable response from David Ebbo:
Indeed, we haven't been very clear in that area. Right now, our priority is to GA v2, at which point Slots will still not be GA. But we very much want to make them work well, so they're not going away. I cannot give an ETA of when it will happen, and I realize it's been in that state for too long, but we will get there.
David
@ahmelsayed thanks for at least giving us the input that you don't know that much more either. That was already helpful.
I must not be the only one in this case then, how do you publish Function Apps to Slots then? I get it's not in the CLI but nobody ever talks about how to do it a different way, especially not the documentation which just explains how to enable them. It feels like the option to enable it was added without actually thinking on how to properly use it
Oh also, how to disable or remove a slot? Since I can't integrate this into my CI/CD yet the slot I created becomes useless but I couldn't find a way to remove it
@mebibou you can use the zip deploy api of kudu. To deploy to a slot you just post it to {AppName}-{SlotName}.scm.azurewebsites.net
Hi, you can create/delete/deploy to slots using the Azure CLI. For example, to create a slot you can use
az webapp deployment slot create --name testDeployTF --resource-group rg-testDeployTF --slot staging and to deploy to that slot you can use Zip deployment: az webapp deployment source config-zip -g rg-testDeployTF -n testDeployTF --src ../functionapp.zip --slot staging. To swap slots you can use: az webapp deployment slot swap -g rg-testDeployTF -n testDeployTF --slot staging --target-slot production
@vgaltes How are you creating that .zip file? I see the documentation for what needs to go into it, but is there some cli command that will produce that zip file automatically?
Hi @mswilson4040, no, as far as I know, you need to create it automatically. You can check how you can do it in my blog
We may be picking this up soon
We are open for ideas about the user experience ... specifically in the publish command
@ahmedelnably --slot=mySlot or something. Not specifying --slot would default to production slot
Here is one idea I was thinking about <functionappname>/<slotname>
ex. func azure functionapp publish myFunctionApp/mySlot
@ahmedelnably - interesting idea - I know that ARM under the hood uses the path structure for slots - I would prefer to use an explicit parameter --slot which matches the az webapp pattern. Existing CLI users should already be familiar with this parameter and also makes documentation consistent and easier to create/follow across CLI tooling.
This had been fixed in July with https://github.com/Azure/azure-functions-core-tools/commit/9cc58db73732bf17364c151be822036f52c78cd4
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@ahmedelnably - interesting idea - I know that ARM under the hood uses the path structure for slots - I would prefer to use an explicit parameter
--slotwhich matches theaz webapppattern. Existing CLI users should already be familiar with this parameter and also makes documentation consistent and easier to create/follow across CLI tooling.