部署azure快速启动模板的分叉repro

时间:2016-05-13 08:06:00

标签: azure github

Github的新手。

我已经分享了Azure Quickstart模板的副本并更改了“moodle-singlevm-ubuntu”的“install_lamp_moodle.sh”以满足我的需求但我似乎无法每次都使用newuserscript部分进行测试azuredeploy.json模板(我已在本地存储),失败

我已从以下位置更改了installscript URI的路径:

"installScriptUri": "[concat('https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/moodle-singlevm-ubuntu/', variables('installScriptName'))]",`

"installScriptUri": "[concat('https://github.com/albertramsbottom/azure-quickstart-templates/blob/master/moodle-singlevm-ubuntu/', variables('installScriptName'))]",

我使用Azure power-shell创建资源组并运行模板

对于newuserscript

每次都出现404错误

显然在这里做一些非常愚蠢的事情。因为我不知道Github我不想改变任何事情,并认为通过分配repro我可以尝试这个。我不知道newuserscript在哪里生活,我认为它是Linux的扩展。

New-AzureRmResourceGroupDeployment : 08:56:02 - Resource Microsoft.Compute/virtualMachines/extensions
'myVM/newuserscript' failed with message 'The resource operation completed with terminal
provisioning state 'Failed'.'At line:1 char:1
+ New-AzureRmResourceGroupDeployment -ResourceGroupName mygroup -TemplateFile C:\T ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResourceGroupDeploymentCommand

New-AzureRmResourceGroupDeployment : 08:56:02 - VM has reported a failure when processing extension 'newuserscript'.
Error message: "Script returned an error.
---stdout---
---errout---
install_lamp_moodle.sh: 6: install_lamp_moodle.sh: Syntax error: newline unexpected
".At line:1 char:1
+ New-AzureRmResourceGroupDeployment -ResourceGroupName mygroup -TemplateFile C:\T ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResourceGroupDeploymentCommand

我知道这听起来像是一个Azure快速启动问题,但我认为它实际上缺乏对GitHub的理解以及如何使用分叉的复制品

我还是假设这与moodle-singlevm-ubuntu模板有关,并且与我的白痴有更多关系:)

抱歉#

1 个答案:

答案 0 :(得分:0)

您想要链接到" raw"像原始模板中的文件URI。如下所示:

"installScriptUri": "[concat('https://raw.githubusercontent.com/albertramsbottom/azure-quickstart-templates/master/moodle-singlevm-ubuntu/', variables('installScriptName'))]"

请注意,该位置必须可公开访问。有关如何在私人位置放置工件的模型,您可以查看此存储库:

https://github.com/bmoore-msft/AzureRM-Samples