简体   繁体   English

Azure DevOps self hosted windows agent to Azure Linux function app deployment

[英]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.

相关问题 用于运行 pytest 的 Azure 自托管代理 - Azure Self hosted agent to run pytest Azure 自托管 windows 代理,使用 Python 版本配置中的{工具文件}是什么? - Azure self hosted windows agent, What is the {tool files} in Use Python Version configuration? 如何在通过 MS DevOps 运行管道时在自托管 (Linux Ubuntu 18.04) 代理上指定 python 版本 - How to specify python version on self-hosted (Linux Ubuntu 18.04) agent while running a pipeline through MS DevOps Python功能部署到Azure的应用程序失败 - Python Function App deployment to Azure fails Azure Devops 代理管道安装 pip 失败 - Azure Devops Agent Pipeline install pip fails 将 Python 安装到自托管 Windows 构建代理 - Install Python to Self-hosted Windows build agent 在使用 ZE1ADBCBB92C622D0B3E619F9D0730 部署之前测试 python Azure function 应用程序 - Testing python Azure function app before deployment using Github Workflows 如何阻止构建代理在 Azure devops 的管道进程中等待 - How to stop build agent from waiting in the pipeline process in Azure devops Azure DevOps 管道 Microsoft 托管映像,具有特定 Python 版本 - Azure DevOps pipeline microsoft hosted image with specific Python version 从 Azure Pipelines Microsoft 托管代理中的 URL 下载文件 - Download file from a URL in Azure Pipelines Microsoft hosted agent
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM