简体   繁体   English

使用 Azure Function(隔离进程)部署到 Azure 使用 Z3A580F142203676F53F0

[英]Deploying Azure Function (isolated process) to Azure using Azure DevOps is not working

Currently Microsoft has introduced a new way to treat azure functions called isolated process and it's the only way to run Azure functions on .NET5.目前微软已经引入了一种新的方法来处理 azure 函数,称为隔离进程,它是在 .NET5 上运行 Azure 函数的唯一方法。

I am trying to deploy a function app that is already running correctly on my local machine to Azure Func app through Azure DevOps.我正在尝试通过 Azure DevOps 将已经在我的本地计算机上正常运行的 function 应用程序部署到 Azure Func 应用程序。 It deployed successfully but the functions don't work.它部署成功,但功能不起作用。

First in the deployment task I can't see .NET 5 appears as shown:首先在部署任务中看不到 .NET 5 出现如图:

But I can see in the link here that the .NET 5 is supported as preview:但我可以在此处的链接中看到 .NET 5 作为预览版受支持:

https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions#languages https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions#languages

After deploying, I can see this error:部署后,我可以看到这个错误:

But I changed the configuration to this:但是我将配置更改为:

Also the function shown this error: function 也显示此错误:

Also I can see that the function has seen as running on .NET 5 from here:我还可以看到 function 从这里运行在 .NET 5 上:

So not sure how to deploy this correctly.所以不确定如何正确部署它。 I know that the isolated process functions are just need the azure functions tools + running command line so not sure how to deploy it and also Microsoft didn't have any tutorial or doc about how to deploy it?我知道孤立的进程功能只需要 azure 功能工具+运行命令行所以不知道如何部署它,而且微软没有任何关于如何部署它的教程或文档?

I found a solution for that.我找到了解决方案。 The problem was that Microsoft isn't supported running Isolated process functions on Linux plans.问题是微软不支持在 Linux 计划上运行独立进程功能。

Also as shown below, you can't create Isolated process functions from Azure portal yet (17/03/2021) so i had to create it myself as shown below:同样如下所示,您还不能从 Azure 门户创建隔离进程函数(17/03/2021)所以我必须自己创建它,如下所示:

az group create --name {resoucrce-group} --location {location}

Then然后

az storage account create --name {storage-name} --location {location} --resource-group {resoucrce-group} --sku Standard_LRS

Then create the function:然后创建 function:

az functionapp create --resource-group {resoucrce-group} --consumption-plan-location {location} --runtime dotnet-isolated --runtime-version 5.0 --functions-version 3 --name {name} --storage-account {storage-name}

And now from the DevOps portal you can deploy a normal App Function on windows and here we go.现在从 DevOps 门户,您可以在 windows 上部署普通应用程序 Function,这里是 go。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM