Skip to content

Commit 218186d

Browse files
committed
Docs Editor: Update hdinsight-hadoop-customize-cluster-linux.md
1 parent dc026a6 commit 218186d

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

articles/hdinsight/hdinsight-hadoop-customize-cluster-linux.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,42 @@ Script actions can also be published to the Azure Marketplace as an HDInsight ap
1818
A script action is Bash script that runs on the nodes in an HDInsight cluster. Characteristics and features of script actions are as follows:
1919

2020
- The Bash script URI (the location to access the file) has to be accessible from the HDInsight resource provider and the cluster.
21+
2122
- The following are possible storage locations:
2223

23-
- For regular (non-ESP) clusters:
24-
- A blob in an Azure Storage account that's either the primary or additional storage account for the HDInsight cluster. HDInsight is granted access to both of these types of storage accounts during cluster creation.
25-
26-
> [!IMPORTANT]
27-
> Do not rotate the storage key on this Azure Storage account, as it will cause subsequent script actions with scripts stored there to fail.
24+
- For regular (non-ESP) clusters:
25+
26+
- A blob in an Azure Storage account that's either the primary or additional storage account for the HDInsight cluster. HDInsight is granted access to both of these types of storage accounts during cluster creation.
27+
28+
> [!IMPORTANT]
29+
> Do not rotate the storage key on this Azure Storage account, as it will cause subsequent script actions with scripts stored there to fail.
2830
29-
- Data Lake Storage Gen1: The service principal HDInsight uses to access Data Lake Storage must have read access to the script. The Bash script URI format is `adl://DATALAKESTOREACCOUNTNAME.azuredatalakestore.net/path_to_file`.
31+
- Data Lake Storage Gen1: The service principal HDInsight uses to access Data Lake Storage must have read access to the script. The Bash script URI format is `adl://DATALAKESTOREACCOUNTNAME.azuredatalakestore.net/path_to_file`.
3032

31-
- Data Lake Storage Gen2 is not recommended to use for script actions. `abfs://` is not supported for the Bash script URI. `https://` URIs are possible, but those work for containers that have public access, and the firewall open for the HDInsight Resource Provider, and therefore is not recommended.
33+
- Data Lake Storage Gen2 is not recommended to use for script actions. `abfs://` is not supported for the Bash script URI. `https://` URIs are possible, but those work for containers that have public access, and the firewall open for the HDInsight Resource Provider, and therefore is not recommended.
3234

33-
- A public file-sharing service accessible through `https://` paths. Examples are Azure Blob, GitHub, or OneDrive. For example URIs, see [Example script action scripts](#example-script-action-scripts).
35+
- A public file-sharing service accessible through `https://` paths. Examples are Azure Blob, GitHub, or OneDrive. For example URIs, see [Example script action scripts](#example-script-action-scripts).
3436

3537
- For clusters with ESP, the `wasb://` or `wasbs://` or `http[s]://` URIs are supported.
3638

3739
- The script actions can be restricted to run on only certain node types. Examples are head nodes or worker nodes.
40+
3841
- The script actions can be persisted or *ad hoc*.
3942

4043
- Persisted script actions must have a unique name. Persisted scripts are used to customize new worker nodes added to the cluster through scaling operations. A persisted script might also apply changes to another node type when scaling operations occur. An example is a head node.
4144
- *Ad hoc* scripts aren't persisted. Script actions used during cluster creation are automatically persisted. They aren't applied to worker nodes added to the cluster after the script has run. Then you can promote an *ad hoc* script to a persisted script or demote a persisted script to an *ad hoc* script. Scripts that fail aren't persisted, even if you specifically indicate that they should be.
4245

4346
- Script actions can accept parameters that are used by the script during execution.
47+
4448
- Script actions run with root-level privileges on the cluster nodes.
49+
4550
- Script actions can be used through the Azure portal, Azure PowerShell, Azure CLI, or HDInsight .NET SDK.
51+
4652
- Script actions that remove or modify service files on the VM may impact service health and availability.
4753

4854
The cluster keeps a history of all scripts that have been run. The history helps when you need to find the ID of a script for promotion or demotion operations.
4955

50-
> [!IMPORTANT]
56+
> [!IMPORTANT]
5157
> There's no automatic way to undo the changes made by a script action. Either manually reverse the changes or provide a script that reverses them.
5258
5359
## Permissions
@@ -83,7 +89,6 @@ Script actions used during cluster creation are slightly different from script a
8389

8490
The following diagram illustrates when script action runs during the creation process:
8591

86-
8792
:::image type="content" source="./media/hdinsight-hadoop-customize-cluster-linux/cluster-provisioning-states.png" alt-text="Stages during cluster creation" border="false":::
8893

8994
The script runs while HDInsight is being configured. The script runs in parallel on all the specified nodes in the cluster. It runs with root privileges on the nodes.
@@ -92,9 +97,12 @@ You can do operations like stopping and starting services, including Apache Hado
9297

9398
During cluster creation, you can use many script actions at once. These scripts are invoked in the order in which they were specified.
9499

95-
> [!IMPORTANT]
100+
> [!NOTE]
101+
> If the script is present in any other storage account other than what is specified as cluster storage (at cluster create time), that will need a public access.
102+
103+
> [!IMPORTANT]
96104
> Script actions must finish within 60 minutes, or they time out. During cluster provisioning, the script runs concurrently with other setup and configuration processes. Competition for resources such as CPU time or network bandwidth might cause the script to take longer to finish than it does in your development environment.
97-
>
105+
>
98106
> To minimize the time it takes to run the script, avoid tasks like downloading and compiling applications from the source. Precompile applications and store the binary in Azure Storage.
99107
100108
### Script action on a running cluster
@@ -112,7 +120,7 @@ EndTime : 8/14/2017 7:41:05 PM
112120
Status : Succeeded
113121
```
114122

115-
> [!IMPORTANT]
123+
> [!IMPORTANT]
116124
> If you change the cluster user, admin, password after the cluster is created, script actions run against this cluster might fail. If you have any persisted script actions that target worker nodes, these scripts might fail when you scale the cluster.
117125
118126
## Example script action scripts
@@ -155,7 +163,7 @@ This section explains the different ways you can use script actions when you cre
155163
| Bash script URI |Specify the URI of the script. |
156164
| Head/Worker/ZooKeeper |Specify the nodes on which the script is run: **Head**, **Worker**, or **ZooKeeper**. |
157165
| Parameters |Specify the parameters, if required by the script. |
158-
166+
159167
Use the __Persist this script action__ entry to make sure that the script is applied during scaling operations.
160168

161169
1. Select __Create__ to save the script. Then you can use __+ Submit new__ to add another script.
@@ -228,7 +236,7 @@ This section explains how to apply script actions on a running cluster.
228236
| Bash script URI |Specify the URI of the script. |
229237
| Head/Worker/Zookeeper |Specify the nodes on which the script is run: **Head**, **Worker**, or **ZooKeeper**. |
230238
| Parameters |Specify the parameters, if required by the script. |
231-
239+
232240
Use the __Persist this script action__ entry to make sure the script is applied during scaling operations.
233241

234242
1. Finally, select the **Create** button to apply the script to the cluster.
@@ -324,10 +332,10 @@ The following example script demonstrates using the cmdlets to promote and then
324332

325333
### HDInsight .NET SDK
326334

327-
For an example of using the .NET SDK to retrieve script history from a cluster, promote or demote scripts, see [
328-
Apply a Script Action against a running Linux-based HDInsight cluster](https://github.com/Azure-Samples/hdinsight-dotnet-script-action).
335+
For an example of using the .NET SDK to retrieve script history from a cluster, promote or demote scripts, see
336+
Apply a Script Action against a running Linux-based HDInsight cluster.
329337

330-
> [!NOTE]
338+
> [!NOTE]
331339
> This example also demonstrates how to install an HDInsight application by using the .NET SDK.
332340
333341
## Next steps

0 commit comments

Comments
 (0)