shell - 如何使用 ARM 模板在 Azure 上的现有 HDI 集群中安装脚本

标签 shell azure azure-hdinsight azure-rm-template

我已经使用 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/

相关文章:

mysql - 当非空结果集时,MySQL 可以给出非零返回码吗?

linux - 如何阻止 getopts 将空白或 null 或其他选项作为选项值

bash - bash 变量何时导出到子 shell 和/或可由脚本访问?

azure - 数百个 Application Insights 快照调试日志文件 - 我们没有故意打开它们

c# - 合并异步方法的结果并同步返回

csv - LOAD DATA INPATH 将相同的基于 CSV 的数据加载到两个不同的外部 Hive 表中

csv - 使用Data Lake Tools for ViS将HDInsight/Hadoop以Excel/CSV格式将数据提取到本地计算机

Bash shell 脚本从文件名中查找丢失的文件

asp.net - 如何配置: Window Azure Load Balancing between instances?

azure - Hadoop future 大数据分析的数据格式