基础架构模板的放置位置

Infrastructure templates where to position them

A​​zure 资源管理器和 ARM 模板自发布以来一直比较轻松。 ARM 模板支持很棒。我们现在可以设置一个充满资源的 Azure 资源组,为其导出一个 ARM 模板,然后采用该模板并部署到不同的资源组。

我想使用 Azure 实现持续部署。我不确定将我的模板放在源代码管理或 Azure 模板存储或 X 中的什么位置。

最佳做法是什么?

参数会不时变化,如果在 SCM 中有帮助,我如何将其与我的代码库同步?

我认为这真的取决于您想为 CI/CD 使用什么引擎。模板部署只是将 JSON 文件推送到 Azure,您可以使用 REST APIs, PowerShell, CLI

下面是一个使用 VSTS 的示例:https://docs.microsoft.com/en-us/azure/vs-azure-tools-resource-groups-ci-in-vsts - it shows 2 different approaches, one using an Azure Resource Group project in VS and the other just using a PowerShell script like the ones find in the quickstart 存储库。