简体   繁体   English

Azure ARM 具有多个扩展和多个 VM

[英]Azure ARM with Multiple Extensions and multiple VMs

I am bit struggling to understand this Azure ARM template containing multiple "Microsoft.Compute/virtualMachines/extensions" and multiple VMs:我有点难以理解这个包含多个“Microsoft.Compute/virtualMachines/extensions”多个 VM 的 Azure ARM 模板:

kafka-on-ubuntu/azuredeploy.json kafka-on-ubuntu/azuredeploy.json

Assuming there will be 4 VMs: 1 for zookeeper and 3 for Kafka cluster repsectively, how can be ensured that the extension (+script) for Zookeper will run on exactly that one Zookeper VM, and how to ensure that the extension (+script ) for Kafka cluster will run on exactly those 3 Kafka VMs?假设将有 4 个 VM:分别 1 个用于 zookeeper,3 个用于 Kafka 集群,如何确保 Zookeper 的扩展(+script)将恰好在一个 Zookeper VM 上运行,以及如何确保扩展(+script)对于 Kafka 集群将在这 3 个 Kafka 虚拟机上运行? I am more tempted to believe that each extension run on all VMs.我更倾向于相信每个扩展都在所有VM 上运行。

This behavior seems to be poorly documented, but from the documentation page for the Windows custom script extension :这种行为似乎没有很好的记录,但来自Windows 自定义脚本扩展的文档页面:

The name of the resource has to be in the format virtualMachineName/extensionName, if this extension is used as a standalone resource in the Azure Resource Manager template.如果此扩展在 Azure 资源管理器模板中用作独立资源,则资源名称必须采用 virtualMachineName/extensionName 格式。

Which seems to imply that the resolution for where the custom script extension should be executed is based on the name.这似乎暗示自定义脚本扩展应该在何处执行的分辨率是基于名称的。 I imagine this is the case for Linux VMs too.我想 Linux VM 也是这种情况。

For the particular example that you are looking at, the name of one of the vms is:对于您正在查看的特定示例,其中一个虚拟机的名称是:

"name": "[concat('zookprvm', copyindex())]",

whereas that of the extension is:而扩展名是:

"name": "[concat('zookprvm', copyindex(), '/installzoo')]",

so the prefix of the name of the extension must be identical to the VM name.因此扩展名称的前缀必须与 VM 名称相同。

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

相关问题 GCE 一次创建多个虚拟机 - GCE create multiple VMs at once 在 Azure 资源管理器(ARM)中从 KV 安装多个版本的证书 - Install multiple versions of cert from KV in Azure Resource Manager (ARM) 如何在 Azure SQL 服务器使用 Azure ARM 模板中一次添加多个客户端 IP 地址? - How to add multiple client IP addresses at time in Azure SQL Server using Azure ARM Templates? 如何在我的 ARM (JSON) 模板中的 Azure 漏洞评估基线定义中指定多行? - How do I specify multiple rows in an Azure Vulnerability Assessment baseline definition in my ARM (JSON) template? 通过 ARM 模板使用单个 azure 资源向多个用户添加 RBAC 角色 - Adding a RBAC role to multiple users using single azure resource via ARM template 了解 ARM 事务性 Memory 扩展 - Understanding ARM Transactional Memory Extensions Azure DevOps / 多个项目 - Azure DevOps / Multiple projects 在Azure注册多个应用 - Register multiple application in Azure 在 azure 中创建多个 su.net - Creating Multiple subnet in azure 在本地运行多个 Azure 函数 - Running multiple Azure Functions locally
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM