[英]Azure DevOps self hosted windows agent to Azure Linux function app deployment
I am working on Linux based Azure functions with Python 3.7 and trying to use Azure DevOps. I am working on Linux based Azure functions with Python 3.7 and trying to use Azure DevOps. My python project has requirements like psycopg2-binary, cython to name a few of them.
我的 python 项目有诸如 psycopg2-binary、cython 等要求。
We have been provisioned a self hosted windows agent pool in Azure Devops.我们已经在 Azure Devops 中配置了一个自托管的 windows 代理池。 I am building a pipeline and my concern is that the deployment won't be successful since the build would happen on the dev agent (on windows) and deployment is on Azure Functions (linux).
我正在构建管道,我担心部署不会成功,因为构建将在开发代理(在 Windows 上)上进行,并且部署在 Azure 功能(Linux)上。
Do we need a linux agent in this case?在这种情况下,我们是否需要 linux 代理?
Please advise.请指教。
Do we need a linux agent in this case?
在这种情况下,我们是否需要 linux 代理?
As far as I know, you don't need to use a Linux agent to build the Python project.据我所知,您不需要使用 Linux 代理来构建 Python 项目。
You can directly use the python package built by windows agent to deploy to the linux azure function. You can directly use the python package built by windows agent to deploy to the linux azure function.
When you using tasks(eg Azure Functions task or Azure App Service deploy ) to deploy the package to Azure Function app, it will directly publish the packages and the Configuration to Azure Function app. When you using tasks(eg Azure Functions task or Azure App Service deploy ) to deploy the package to Azure Function app, it will directly publish the packages and the Configuration to Azure Function app.
The prerequisite is that the deployed package meets the requirements of the task: the package is a zip or war file.前提是部署的package满足任务要求:package是zip或者war文件。 So you need to use the Archive files task to pack the published files.
因此,您需要使用存档文件任务来打包已发布的文件。
If the configuration of the python project can be run in the linux system, the same configuration can also be run in the linux Function App.如果python项目的配置可以在linux系统中运行,同样的配置也可以在linux Z86408593C34AF72FDD19App中运行
For more details about deploy a Python project to Azure, you could refer to this doc: deploy a Python web app to Azure App Service on Linux For more details about deploy a Python project to Azure, you could refer to this doc: deploy a Python web app to Azure App Service on Linux
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.