簡體   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