|
1 | 1 | ---
|
2 | 2 | title: Export ARM template in Azure HDInsight on AKS
|
3 |
| -description: How to create an ARM template to cluster using script in Azure HDInsight on AKS |
| 3 | +description: How to create an ARM template of a cluster in Azure HDInsight on AKS |
4 | 4 | ms.service: hdinsight-aks
|
5 | 5 | ms.custom: devx-track-arm-template
|
6 | 6 | ms.topic: how-to
|
7 |
| -ms.date: 08/29/2023 |
| 7 | +ms.date: 02/12/2024 |
8 | 8 | ---
|
9 | 9 |
|
10 |
| -# Export cluster ARM template using script |
| 10 | +# Export cluster ARM template - Azure portal |
11 | 11 |
|
12 | 12 | [!INCLUDE [feature-in-preview](includes/feature-in-preview.md)]
|
13 | 13 |
|
14 |
| -This article describes how to generate an ARM template for your cluster automatically using a script. You can use the ARM template to modify, clone, or recreate a cluster starting from the existing cluster's configurations. |
| 14 | +This article describes how to generate an ARM template for your cluster automatically. You can use the ARM template to modify, clone, or recreate a cluster starting from the existing cluster's configurations. |
15 | 15 |
|
16 | 16 | ## Prerequisites
|
17 | 17 |
|
18 | 18 | * An operational HDInsight on AKS cluster.
|
19 |
| -* Familiarity with [ARM template authoring and deployment](/azure/azure-resource-manager/templates/overview). |
20 | 19 |
|
21 | 20 | ## Steps to generate ARM template for the cluster
|
22 | 21 |
|
23 | 22 | 1. Sign in to [Azure portal](https://portal.azure.com).
|
24 | 23 |
|
25 |
| -2. In the Azure portal search bar, type "HDInsight on AKS cluster" and select "Azure HDInsight on AKS clusters" from the drop-down list. |
| 24 | +1. In the Azure portal search bar, type "HDInsight on AKS cluster" and select "Azure HDInsight on AKS clusters" from the drop-down list. |
26 | 25 |
|
27 | 26 | :::image type="content" source="./media/create-cluster-using-arm-template-script/cloud-portal-search.png" alt-text="Screenshot showing search option for getting started with HDInsight on AKS Cluster." border="true" lightbox="./media/create-cluster-using-arm-template-script/cloud-portal-search.png":::
|
28 | 27 |
|
29 |
| -6. Select your cluster name from the list page. |
| 28 | +1. Select your cluster name from the list page. |
30 | 29 |
|
31 | 30 | :::image type="content" source="./media/create-cluster-using-arm-template-script/cloud-portal-list-view.png" alt-text="Screenshot showing selecting the HDInsight on AKS Cluster you require from the list." border="true" lightbox="./media/create-cluster-using-arm-template-script/cloud-portal-list-view.png":::
|
32 | 31 |
|
33 |
| -2. Navigate to the overview blade of your cluster and click on *JSON View* at the top right. |
| 32 | +1. Navigate to the "Export template" blade of your cluster and click "Download" to export the template. |
34 | 33 |
|
35 |
| - :::image type="content" source="./media/create-cluster-using-arm-template-script/view-cost-json-view.png" alt-text="Screenshot showing how to view cost and JSON View buttons from the Azure portal." border="true" lightbox="./media/create-cluster-using-arm-template-script/view-cost-json-view.png"::: |
| 34 | + :::image type="content" source="./media/create-cluster-using-arm-template-script/export-template-download-view.png" alt-text="Screenshot showing export template option from the Azure portal." border="true" lightbox="./media/create-cluster-using-arm-template-script/export-template-download-view.png"::: |
36 | 35 |
|
37 |
| -2. Copy the "Resource JSON" and save it to a local JSON file. For example, `template.json`. |
38 |
| - |
39 |
| -3. Click the following button at the top right in the Azure portal to launch Azure Cloud Shell. |
40 |
| - |
41 |
| - :::image type="content" source="./media/create-cluster-using-arm-template-script/cloud-shell.png" alt-text="Screenshot screenshot showing Cloud Shell icon."::: |
42 |
| - |
43 |
| -5. Make sure Cloud Shell is set to "Bash" on the top left and upload your `template.json` file. |
44 |
| - |
45 |
| - :::image type="content" source="./media/create-cluster-using-arm-template-script/azure-cloud-shell-template-upload.png" alt-text="Screenshot showing how to upload your template.json file." border="true" lightbox="./media/create-cluster-using-arm-template-script/azure-cloud-shell-template-upload.png"::: |
46 |
| - |
47 |
| -2. Execute the following command to generate the ARM template. |
48 |
| - |
49 |
| - ```azurecli |
50 |
| - wget https://hdionaksresources.blob.core.windows.net/common/arm_transform.py |
51 |
| -
|
52 |
| - python arm_transform.py template.json |
53 |
| - ``` |
54 |
| - |
55 |
| - :::image type="content" source="./media/create-cluster-using-arm-template-script/azure-cloud-shell-script-output.png" alt-text="Screenshot showing results after running the script." border="true" lightbox="./media/create-cluster-using-arm-template-script/azure-cloud-shell-script-output.png"::: |
56 |
| - |
57 |
| -This script creates an ARM template with name `template-modified.json` for your cluster and generates a command to deploy the ARM template. |
58 |
| - |
59 |
| -Now, your cluster ARM template is ready. You can update the properties of the cluster and finally deploy the ARM template to refresh the resources. To redeploy, you can either use the Azure CLI command output by the script or [deploy an ARM template using Azure portal](/azure/azure-resource-manager/templates/deploy-portal#deploy-resources-from-custom-template). |
| 36 | +Now, your cluster ARM template is ready. You can update the properties of the cluster and finally deploy the ARM template to refresh the resources. To redeploy, you can either use the "Deploy" option in your cluster under "Export template" blade by replacing the existing template with the modified template or see [deploy an ARM template using Azure portal](/azure/azure-resource-manager/templates/deploy-portal#deploy-resources-from-custom-template). |
60 | 37 |
|
61 | 38 | > [!IMPORTANT]
|
62 | 39 | > If you're cloning the cluster or creating a new cluster, you'll need to modify the `name`, `location`, and `fqdn` (the fqdn must match the cluster name).
|
0 commit comments