You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/hdinsight/hdinsight-hadoop-customize-cluster-linux.md
+26-18Lines changed: 26 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,36 +18,42 @@ Script actions can also be published to the Azure Marketplace as an HDInsight ap
18
18
A script action is Bash script that runs on the nodes in an HDInsight cluster. Characteristics and features of script actions are as follows:
19
19
20
20
- The Bash script URI (the location to access the file) has to be accessible from the HDInsight resource provider and the cluster.
21
+
21
22
- The following are possible storage locations:
22
23
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.
28
30
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`.
30
32
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.
32
34
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).
34
36
35
37
- For clusters with ESP, the `wasb://` or `wasbs://` or `http[s]://` URIs are supported.
36
38
37
39
- The script actions can be restricted to run on only certain node types. Examples are head nodes or worker nodes.
40
+
38
41
- The script actions can be persisted or *ad hoc*.
39
42
40
43
- 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.
41
44
-*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.
42
45
43
46
- Script actions can accept parameters that are used by the script during execution.
47
+
44
48
- Script actions run with root-level privileges on the cluster nodes.
49
+
45
50
- Script actions can be used through the Azure portal, Azure PowerShell, Azure CLI, or HDInsight .NET SDK.
51
+
46
52
- Script actions that remove or modify service files on the VM may impact service health and availability.
47
53
48
54
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.
49
55
50
-
> [!IMPORTANT]
56
+
> [!IMPORTANT]
51
57
> 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.
52
58
53
59
## Permissions
@@ -83,7 +89,6 @@ Script actions used during cluster creation are slightly different from script a
83
89
84
90
The following diagram illustrates when script action runs during the creation process:
85
91
86
-
87
92
:::image type="content" source="./media/hdinsight-hadoop-customize-cluster-linux/cluster-provisioning-states.png" alt-text="Stages during cluster creation" border="false":::
88
93
89
94
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
92
97
93
98
During cluster creation, you can use many script actions at once. These scripts are invoked in the order in which they were specified.
94
99
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]
96
104
> 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
+
>
98
106
> 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.
> 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.
117
125
118
126
## Example script action scripts
@@ -155,7 +163,7 @@ This section explains the different ways you can use script actions when you cre
155
163
| Bash script URI |Specify the URI of the script. |
156
164
| Head/Worker/ZooKeeper |Specify the nodes on which the script is run: **Head**, **Worker**, or **ZooKeeper**. |
157
165
| Parameters |Specify the parameters, if required by the script. |
158
-
166
+
159
167
Use the __Persist this script action__ entry to make sure that the script is applied during scaling operations.
160
168
161
169
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.
228
236
| Bash script URI |Specify the URI of the script. |
229
237
| Head/Worker/Zookeeper |Specify the nodes on which the script is run: **Head**, **Worker**, or **ZooKeeper**. |
230
238
| Parameters |Specify the parameters, if required by the script. |
231
-
239
+
232
240
Use the __Persist this script action__ entry to make sure the script is applied during scaling operations.
233
241
234
242
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
324
332
325
333
### HDInsight .NET SDK
326
334
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.
329
337
330
-
> [!NOTE]
338
+
> [!NOTE]
331
339
> This example also demonstrates how to install an HDInsight application by using the .NET SDK.
0 commit comments