gpt4 book ai didi

mongodb - 操作系统类型“Linux”不支持每个处理程序多个 VMExtension

转载 作者:行者123 更新时间:2023-12-03 04:51:03 25 4
gpt4 key购买 nike

我已使用 ARM 模板创建了 Azure VM。现在我想在 Azure VM 上安装 Java 和 Mongodb。

当我尝试使用多个 CustomScript 时,出现以下错误。

Multiple VMExtensions per handler not supported for OS type 'Linux

以下是我的配置:-

参数:-

"javaPackageName": {
"type": "string",
"defaultValue": "openjdk-7-jdk",
"allowedValues": [
"openjdk-6-jdk",
"openjdk-7-jdk",
"openjdk-8-jdk"
]
},
"tomcatPackageName": {
"type": "string",
"defaultValue": "tomcat7",
"allowedValues": [
"tomcat6",
"tomcat7",
"tomcat8"
]
}

变量:-

“mongoInstallCentos”:“https://..install-mongo.json”

{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('virtualMachineName'),'/javainstall')]",
"apiVersion": "2015-05-01-preview",
"location": "[variables('location')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]"
],
"properties": {
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": ["https://..java-tomcat-install.sh"],
"commandToExecute": "[concat('sh java-tomcat-install.sh',' ',parameters('javaPackageName'),' ',parameters('tomcatPackageName'))]"
}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('virtualMachineName'),'/mongoinstall')]",
"apiVersion": "2015-05-01-preview",
"location": "[variables('location')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]"
],
"properties": {
"publisher": "Microsoft.Azure.Extensions",
"type": "CustomScript",
"typeHandlerVersion": "2.0",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": ["https://..mongo-install.sh"],
"commandToExecute": "sh mongo-install.sh"
}
}
},

有没有在ARM模板中使用多个CustomScript的解决方案?请帮我解决这个问题。

最佳答案

Multiple VMExtensions per handler not supported for OS type 'Linux

目前,无法在部署时运行多个 CustomScript 扩展。

根据您的方案,您可以编写一个调用依赖脚本的入口点脚本,然后将入口点脚本、依赖脚本和任何其他依赖二进制文件上传到脚本位置(Azure 存储 blob 或 GitHub)。更多信息请引用这个link .

另外,你可以引用这个类似的question .

关于mongodb - 操作系统类型“Linux”不支持每个处理程序多个 VMExtension,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42952273/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com