【发布时间】:2017-03-30 16:52:49
【问题描述】:
是否可以通过 Azure 资源管理器将多个 DSC 配置应用到一个虚拟机?
目前我正在使用这样的东西:
{
"apiVersion": "2015-06-15",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('vm_name'))]"
],
"location": "[resourceGroup().location]",
"name": "DSCSetup",
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.20",
"autoUpgradeMinorVersion": true,
"settings": {
"modulesUrl": "[concat('https://', variables('sa_name'), '.blob.core.windows.net/.../dsc.ps1.zip')]",
"configurationFunction": "dsc.ps1\\Main",
"properties": {
"MachineName": "[variables('vm_name')]",
"UserName": "[parameters('vm_user')]"
}
},
"protectedSettings": {}
},
"type": "extensions"
}
如果不能,能否自动合并多个 DSC?
场景是:
- 拥有多个 DSC
- 一个用于 IIS + ASP.Net 的 DSC
- 一个 DSC 创建站点 1
- 另一个 DSC 创建 Site2
- 在 Dev 中将 Site1 和 Site2 部署到一台机器上
- 在生产中部署到单独的机器,甚至可能在可用性集中...
- (准备好以后使用单独的容器)
【问题讨论】:
标签: powershell azure azure-resource-manager powershell-dsc