New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI Support for Slots #227

Open
wilsonge opened this Issue Aug 30, 2017 · 24 comments

Comments

Projects
None yet
10 participants
@wilsonge
Contributor

wilsonge commented Aug 30, 2017

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 :)

@alohaninja

This comment has been minimized.

alohaninja commented Oct 4, 2017

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.

@wilsonge

This comment has been minimized.

Contributor

wilsonge commented Oct 26, 2017

I guess this covers Azure/azure-functions-host#2073

@ahmelsayed ahmelsayed self-assigned this Oct 27, 2017

@ahmelsayed

This comment has been minimized.

Contributor

ahmelsayed commented Oct 27, 2017

sorry for the delay in response @wilsonge. I'll get to this soon

@wilsonge

This comment has been minimized.

Contributor

wilsonge commented Oct 27, 2017

Thanks!

@alohaninja

This comment has been minimized.

alohaninja commented Nov 16, 2017

@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!

@alohaninja

This comment has been minimized.

alohaninja commented Dec 22, 2017

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

@alohaninja

This comment has been minimized.

alohaninja commented Jan 23, 2018

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!

@mattspeterson

This comment has been minimized.

mattspeterson commented Jan 24, 2018

+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.

@Bomret

This comment has been minimized.

Bomret commented Mar 20, 2018

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.

@ahmelsayed ahmelsayed added the wontfix label Apr 30, 2018

@ahmelsayed ahmelsayed added this to the backlog milestone Apr 30, 2018

@ahmelsayed

This comment has been minimized.

Contributor

ahmelsayed commented Apr 30, 2018

closing as we're not adding new functionality to slots.

@ahmelsayed ahmelsayed closed this Apr 30, 2018

@wilsonge

This comment has been minimized.

Contributor

wilsonge commented May 1, 2018

Does this mean you’re 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

@Bomret

This comment has been minimized.

Bomret commented May 1, 2018

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.

@mattspeterson

This comment has been minimized.

mattspeterson commented May 1, 2018

But this isn't really "adding new functionality for slots"; it is simply adding support for slots to the Azure Function Core Tools.

@SBIWebteam

This comment has been minimized.

SBIWebteam commented May 9, 2018

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?

@masters3d

This comment has been minimized.

masters3d commented Jul 27, 2018

@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.

@IGx89

This comment has been minimized.

IGx89 commented Sep 5, 2018

@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?

@Bomret

This comment has been minimized.

Bomret commented Sep 6, 2018

@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.

@ahmelsayed ahmelsayed reopened this Sep 6, 2018

@ahmelsayed

This comment has been minimized.

Contributor

ahmelsayed commented Sep 6, 2018

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

@IGx89

This comment has been minimized.

IGx89 commented Sep 6, 2018

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

@Bomret

This comment has been minimized.

Bomret commented Sep 6, 2018

@ahmelsayed thanks for at least giving us the input that you don't know that much more either. That was already helpful.

@mebibou

This comment has been minimized.

mebibou commented Oct 9, 2018

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

@mebibou

This comment has been minimized.

mebibou commented Oct 9, 2018

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

@Bomret

This comment has been minimized.

Bomret commented Oct 9, 2018

@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

@vgaltes

This comment has been minimized.

vgaltes commented Nov 18, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment