我已经使用 ARM 模板创建了 HDI 集群。现在HDI集群正在运行。现在我想在现有的 HDI 集群上安装我的 shell 脚本。
我看到大多数示例都在同一模板中安装 HDIcluster + ScriptAction。请参阅https://github.com/Azure/azure-quickstart-templates/blob/master/hdinsight-linux-run-script-action/azuredeploy.json
如何使用 ARM 模板在现有 HDI 集群上安装自定义脚本?
最佳答案
ARM 模板用于创建集群或向集群添加新节点。
您需要使用 PowerShell、AzureCLI 或门户运行脚本操作。以下是在 PowerShell 中执行此操作的方法:
# LOGIN TO ZURE
Login-AzureRmAccount
# PROVIDE VALUES FOR THESE VARIABLES
$clusterName = "<HDInsightClusterName>" # HDInsight cluster name
$saName = "<ScriptActionName>" # Name of the script action
$saURI = "<URI to the script>" # The URI where the script is located
$nodeTypes = "headnode", "workernode"
Submit-AzureRmHDInsightScriptAction -ClusterName $clusterName -Name $saName -Uri $saURI -NodeTypes $nodeTypes -PersistOnSucces
资源: https://learn.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux
关于shell - 如何使用 ARM 模板在 Azure 上的现有 HDI 集群中安装脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43138177/