繁体   English   中英

azure 使用自定义映像开发自托管容器代理

[英]azure devops self hosted container agent with custom image

我们有结合 .net 4.0 和 C++ (CLI C++) 的源代码。 要构建此代码,我们同时使用 Visual Studio 2015 和 Visual Studio 2010。 要构建 C++ 源代码,我们使用 VS 2010。现在我们正在迁移到 azure devops,我们需要创建构建管道。 实现此目的的一种方法是创建一个自托管的 windows 代理并在其上安装 vs 2015 和 vs 2010。

有没有办法让这个容器化? 我们可以创建一个已经安装了 vs 2015 和 vs2010 的自定义容器镜像吗?

You can use docker inside virtual machine for containerization, You can set up a self-hosted agent in Azure Pipelines to run inside a Windows Server Core (for Windows hosts), or Ubuntu container (for Linux hosts) with Docker. 当您想要使用外部编排运行代理时,这很有用,例如 Azure 容器实例。 Windows 和 Linux 都支持作为容器主机。 Windows 容器应该在 Windows vmImage 上运行。 To run your agent in Docker, you'll pass a few environment variables to docker run, which configures the agent to connect to Azure Pipelines or Azure DevOps Server. 最后,您可以自定义容器以满足您的需求。 任务和脚本可能取决于容器 PATH 上可用的特定工具,您有责任确保这些工具可用。

这是参考文档https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops

据我所知,我们在 VM 中运行的容器数量完全取决于我们选择的 VM 大小(硬件配置)。 我们在 azure 中确实提供了不同的 VM 大小。

if you want to run more containers, I would recommend to go with AKS,Azure Kubernetes Service (AKS) simplifies deploying a managed Kubernetes cluster in Azure by offloading the operational overhead to Azure. 作为托管的 Kubernetes 服务,Azure 处理关键任务,例如健康监控和维护。 由于 Kubernetes 主节点由 Azure 管理,因此您只需管理和维护代理节点。 因此,AKS 是免费的; 您只需为集群中的代理节点付费,而不为主节点付费。

暂无
暂无

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

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