将Azure功能(Linux托管)从消耗转移到高级计划

发布于 2025-01-29 19:30:07 字数 510 浏览 2 评论 0原文

我有一个现有的Azure功能,具有消费计划,但是,我需要将其移至高级计划。在创建功能应用程序时,我为操作系统选择了Linux。

到目前为止,我创建了一个高级计划,然后通过Azure-CLI运行以下内容:

az functionapp update --name <name-of-the-app> --resource-group <resource-group> --plan <premium-plan>

它给了我以下消息:

This feature currently supports windows to windows plan migrations. For other migrations, please redeploy.

问题:

  • 有没有办法从消费计划更新/移动而不重新部署它?
  • 如果没有,我唯一的选择是重新部署,是否可以从我现有应用程序中克隆函数?

I have an existing Azure function with Consumption plan, however, I need to move it to Premium Plan. While creating the function app, I selected linux for the OS.

So far, I created a premium plan and then running the following through azure-cli:

az functionapp update --name <name-of-the-app> --resource-group <resource-group> --plan <premium-plan>

and it gives me the following message:

This feature currently supports windows to windows plan migrations. For other migrations, please redeploy.

Question:

  • Is there a way to update/move from consumption plan to premium plan without redeploying it?
  • If not, and if the only option I have is to redeploy, is it possible to clone the functions from my existing app?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南七夏 2025-02-05 19:30:07

截至目前,此问题 - 将Azure Linux函数应用程序从消费计划移动到高级托管计划,在 github

这被标记为功能请求。

甚至将消费计划迁移到专用计划中,也在 github中的“ nofollow noreferrer”> github ,, Jeffhollan采用了一种手动迁移方法,但他也推荐了解决方案 - 创建一个新的应用程序并重新发布

As of now, this issue - Moving the Azure Linux Function App from Consumption Hosting Plan to Premium Hosting Plan is Open in the GitHub.

This is marked as a feature request.

Even Migration of Consumption Plan to Dedicated Plan is in Open Issue in the GitHub, JeffHollan given a manual approach to migrate, but he too recommended the solution - creating a new app and re-publishing to it.

や莫失莫忘 2025-02-05 19:30:07

找到了解决方案。您可以使用AZ Resource Update命令来完成此操作。 官方文档a>/ github

IT:

将UI用于Azure资源( https://resources.azure.com/

  • 在: your-subscription/resourcegroup/your-Resource-group/microsoft.web/stites/
  • 检查 numofworkers 。如果是-1,则将其更改为1,因为它应该大于0(如果在'21之前创建了应用程序),
  • 然后将 serverfarmid 更改为您最新的Premium Plan的资源ID 。

使用Azure CLI

  • 安装使用:brew install azure-cli(macOS)
  • 使用az login
  • change 更改 numofworkers to 1 to 1 to in:az resource更新 - resource-type“ microsoft.web/stites” - 名称&lt; your-app&gt; - 资源群&lt; your-Resource-group&gt; -Set Properties.numofworkers = 1
  • 现在您可以更改 serverfarmid 以指向新的高级计划:AZ Resource Update -Resource-Type“ Microsoft.web/sites” - 名称&lt; your-app&gt; - 资源群&lt; your-Resource-group&gt; -set properties.serverfarmid =&lt; prem-plan-resource-id&gt;

Found a solution. You can do it by using az resource update command. Official Documentation / GitHub

There are two ways that you can do it:

Using UI for Azure Resources (https://resources.azure.com/)

  • Find your app in: your-subscription/resourceGroup/your-resource-group/Microsoft.Web/sites/
  • Check numOfWorkers. If it is -1, change it to 1 as it should be greater than 0 (this might be the case if the app was created before '21)
  • Then change the serverFarmID to your latest premium plan's resource ID.

Using Azure CLI

  • Install using: brew install azure-cli (macOS)
  • Login using az login
  • Change numOfWorkers to 1 using: az resource update --resource-type "Microsoft.Web/sites" --name <your-app> --resource-group <your-resource-group> --set properties.numOfWorkers=1
  • Now you can change the serverFarmID to point to new premium plan: az resource update --resource-type "Microsoft.Web/sites" --name <your-app> --resource-group <your-resource-group> --set properties.serverFarmId=<premium-plan-resource-id>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文