From 8a33cb3a440daefa29bf732281c6f84120166c70 Mon Sep 17 00:00:00 2001 From: KonstPass <100218817+telelogic@users.noreply.github.com> Date: Sun, 6 Nov 2022 11:11:36 +0200 Subject: [PATCH 1/3] Kusto Cluster Create & Delete --- data explorer/create/cluster-create.azcli | 37 +++++++++++++++++++++++ data explorer/delete/cluster-delete.azcli | 21 +++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 data explorer/create/cluster-create.azcli create mode 100644 data explorer/delete/cluster-delete.azcli diff --git a/data explorer/create/cluster-create.azcli b/data explorer/create/cluster-create.azcli new file mode 100644 index 0000000..dba4229 --- /dev/null +++ b/data explorer/create/cluster-create.azcli @@ -0,0 +1,37 @@ +#!/bin/bash +################################################################################# +# project: az-kung-fu +# http://www.build5nines.com/az-kung-fu +# MIT License - https://github.com/Build5Nines/az-kung-fu +# WARNING: These scripts could either cause resume generating events or get you promoted. +# Please, proceed with extreme caution! +################################################################################# +# Script Purpose +# - Create a Data Explorer Cluster with System Assigned Managed Identity +# Script Usage +# - Update the variables including SKU, cluster name, capacity, tier to create the Data Explorer Cluster +########################################################################################### +########### IMPORTANT DETAIL ############################################################## +# Until this time the kusto extension is recommended to be installed ##################### +# az extension add -n kusto + +## Assign your Azure subscription name or id +az account set -s "[subscription_name_here]" + +## Assign variables +# No commas in Availablity zones (Optional) just plain numbers (1 2 3) with spaces in single quotes +rg=[resource_group_name] +location=[azure_region_name] +name=[cluster_name] +Capacity=[number_of_nodes] +tier=['Basic'_or_'Standard'] +zones=['1 2 3'] +type="SystemAssigned" +#Create the cluster +#Watch the Cluster Name : Allowed values: Standard_DS13_v2+1TB_PS, Standard_DS13_v2+2TB_PS, Standard_DS14_v2+3TB_PS, Standard_DS14_v2+4TB_PS, Standard_D13_v2, Standard_D14_v2, Standard_L8s, Standard_L16s, Standard_D11_v2, Standard_D12_v2, Standard_L4s, Dev(No SLA)_Standard_D11_v2, Standard_E2a_v4, Standard_E4a_v4, Standard_E8a_v4, Standard_E16a_v4, Standard_E8as_v4+1TB_PS, Standard_E8as_v4+2TB_PS, Standard_E16as_v4+3TB_PS, Standard_E16as_v4+4TB_PS, Dev(No SLA)_Standard_E2a_v4 +az kusto cluster create -g $rg \ + -l $location \ + -n $name \ + --sku name='allowed_value' capacity=$Capacity tier=$tier \ + --zones $zones \ + --type $type \ No newline at end of file diff --git a/data explorer/delete/cluster-delete.azcli b/data explorer/delete/cluster-delete.azcli new file mode 100644 index 0000000..beeb01b --- /dev/null +++ b/data explorer/delete/cluster-delete.azcli @@ -0,0 +1,21 @@ +#!/bin/bash +################################################################################# +# project: az-kung-fu +# http://www.build5nines.com/az-kung-fu +# MIT License - https://github.com/Build5Nines/az-kung-fu +# WARNING: These scripts could either cause resume generating events or get you promoted. +# Please, proceed with extreme caution! +################################################################################# +# Script Purpose +# - Delete a Data Explorer Cluster in an Azure Subscription +# The -y would not ask for confirmation , use carefully +#******************************************************************************** +## Assign variables +rg=[resource_group_name] +name=[kusto-cluster_name] + + +## Delete Kusto Cluster +az kusto cluster delete -g $rg \ + -n $name\ + -y \ No newline at end of file From 0f0d008d5ca248011a93aebef9e8b1c2252fa770 Mon Sep 17 00:00:00 2001 From: KonstPass <100218817+telelogic@users.noreply.github.com> Date: Mon, 7 Nov 2022 19:27:32 +0200 Subject: [PATCH 2/3] List Kusto Cluster --- data explorer/list/sampe.azcli | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 data explorer/list/sampe.azcli diff --git a/data explorer/list/sampe.azcli b/data explorer/list/sampe.azcli new file mode 100644 index 0000000..d961ed1 --- /dev/null +++ b/data explorer/list/sampe.azcli @@ -0,0 +1,29 @@ +#!/bin/bash +################################################################################# +# project: az-kung-fu +# http://www.build5nines.com/az-kung-fu +# MIT License - https://github.com/Build5Nines/az-kung-fu +# WARNING: These scripts could either cause resume generating events or get you promoted. +# Please, proceed with extreme caution! +################################################################################# +# Script Purpose +# - List resource groups +# Script Usage +# - Update variables to list resource groups +# - Query for resource groups by region name +################################################################################## + +## Assign your Azure subscription name or id +az account set -s "[subscription_name_here]" + +## Assign variables +rg="[resource_group_name]" +location=[azure_region_name] + +# List Kusto Clusters in Subsciption in Table format +az kusto cluster list -o table + +# List the Kusto Cluters in a resource gorup in Table format +az kusto cluster list -g $rg \ + -o table + From b2f5c5ae492b147bf94dbfcfa647d24b44957496 Mon Sep 17 00:00:00 2001 From: "K.Passadis" Date: Mon, 7 Nov 2022 19:48:52 +0200 Subject: [PATCH 3/3] Corrections --- data explorer/list/{sampe.azcli => cluster-list.azcli} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename data explorer/list/{sampe.azcli => cluster-list.azcli} (94%) diff --git a/data explorer/list/sampe.azcli b/data explorer/list/cluster-list.azcli similarity index 94% rename from data explorer/list/sampe.azcli rename to data explorer/list/cluster-list.azcli index d961ed1..26d6db9 100644 --- a/data explorer/list/sampe.azcli +++ b/data explorer/list/cluster-list.azcli @@ -20,7 +20,7 @@ az account set -s "[subscription_name_here]" rg="[resource_group_name]" location=[azure_region_name] -# List Kusto Clusters in Subsciption in Table format +# List Kusto Clusters in Subsrciption in Table format az kusto cluster list -o table # List the Kusto Cluters in a resource gorup in Table format