From 9a678c4f6567cc3314da1d5274f9c7f43e5987ae Mon Sep 17 00:00:00 2001 From: Vanshika Reddy Date: Mon, 15 Apr 2024 14:36:02 -0400 Subject: [PATCH 1/7] adding arm templates --- aks-arc/aks-hci/armtemplate.json | 220 ++++++++++++++++++++++ aks-arc/aks-hci/azs.parameters.json | 65 +++++++ aks-arc/aks-vmware/armtemplateVmware.json | 203 ++++++++++++++++++++ aks-arc/aks-vmware/deploy.ps1 | 160 ++++++++++++++++ aks-arc/aks-vmware/getDeployStatus.ps1 | 51 +++++ aks-arc/aks-vmware/vmware.parameters.json | 62 ++++++ 6 files changed, 761 insertions(+) create mode 100644 aks-arc/aks-hci/armtemplate.json create mode 100644 aks-arc/aks-hci/azs.parameters.json create mode 100644 aks-arc/aks-vmware/armtemplateVmware.json create mode 100644 aks-arc/aks-vmware/deploy.ps1 create mode 100644 aks-arc/aks-vmware/getDeployStatus.ps1 create mode 100644 aks-arc/aks-vmware/vmware.parameters.json diff --git a/aks-arc/aks-hci/armtemplate.json b/aks-arc/aks-hci/armtemplate.json new file mode 100644 index 000000000000..b5e5a8c2487a --- /dev/null +++ b/aks-arc/aks-hci/armtemplate.json @@ -0,0 +1,220 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "provisionedClusterName": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "The name of the AKS Arc Cluster resource." + } + }, + "location": { + "type": "string", + "defaultValue": "eastus", + "metadata": { + "description": "The location of the AKS Arc Cluster resource." + } + }, + "resourceTags": { + "type": "object", + "defaultValue": {} + }, + "connectedClustersApiVersion": { + "type": "String", + "defaultValue": "" + }, + "provisionedClustersApiVersion": { + "type": "String", + "defaultValue": "" + }, + + "sshRSAPublicKey": { + "type": "string", + "metadata": { + "description": "Configure all linux machines with the SSH RSA public key string. Your key should include three parts, for example 'ssh-rsa AAAAB...snip...UcyupgH '" + } + }, + "enableAHUB": { + "type": "string", + "defaultValue": "NotApplicable", + "metadata": { + "description": "Azure Hybrid Benefit for Windows Server licenses. NotApplicable, True, False." + } + }, + "agentName": { + "type": "string", + "defaultValue": "nodepool", + "metadata": { + "description": "The name of the node pool." + } + }, + "agentVMSize": { + "type": "string", + "defaultValue": "Standard_A4_v2", + "metadata": { + "description": "The VM size for node pools." + } + }, + "agentCount": { + "type": "int", + "defaultValue": 1, + "minValue": 1, + "maxValue": 50, + "metadata": { + "description": "The number of nodes for the cluster." + } + }, + "agentOsType": { + "type": "string", + "defaultValue": "Linux", + "metadata": { + "description": "The OS Type for the agent pool. Values are Linux and Windows." + } + }, + "loadBalancerCount": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The number of load balancers." + } + }, + "kubernetesVersion": { + "type": "string", + "metadata": { + "description": "The version of Kubernetes." + } + }, + "controlPlaneNodeCount": { + "type": "int", + "defaultValue": 1, + "minValue": 1, + "maxValue": 5, + "metadata": { + "description": "The number of control plane nodes for the cluster." + } + }, + "controlPlaneIp": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Control plane IP address." + } + }, + "controlPlaneVMSize": { + "type": "string", + "defaultValue": "Standard_A4_v2", + "metadata": { + "description": "The VM size for control plane." + } + }, + "vnetSubnetIds": { + "type": "array", + "metadata": { + "description": "List of subnet Ids for the AKS cluster." + } + }, + "podCidr": { + "type": "string", + "defaultValue": "10.244.0.0/16", + "metadata": { + "description": "The VM size for control plane." + } + }, + "networkPolicy": { + "type": "string", + "defaultValue": "calico", + "metadata": { + "description": "Network policy to use for Kubernetes pods. Only options supported is calico." + } + }, + "customLocation": { + "type": "string", + "metadata": { + "description": "Fully qualified custom location ARM resource Id." + } + } + }, + "resources": [ + { + "apiVersion": "[parameters('connectedClustersApiVersion')]", + "type": "Microsoft.Kubernetes/ConnectedClusters", + "kind": "ProvisionedCluster", + "location": "[parameters('location')]", + "name": "[parameters('provisionedClusterName')]", + "tags": "[parameters('resourceTags')]", + "identity": { + "type": "SystemAssigned" + }, + "properties": { + "agentPublicKeyCertificate":"" , + "aadProfile": { + "enableAzureRBAC": false + } + } + }, + { + "apiVersion": "[parameters('provisionedClustersApiVersion')]", + "type": "microsoft.hybridcontainerservice/provisionedclusterinstances", + "name": "default", + "scope": "[concat('Microsoft.Kubernetes/ConnectedClusters', '/', parameters('provisionedClusterName'))]", + "dependsOn": [ + "[resourceId('Microsoft.Kubernetes/ConnectedClusters', parameters('provisionedClusterName'))]" + ], + "properties": { + "agentPoolProfiles": [ + { + "count": "[parameters('agentCount')]", + "name":"[parameters('agentName')]", + "osType": "[parameters('agentOsType')]", + "vmSize": "[parameters('agentVMSize')]" + } + ], + "cloudProviderProfile": { + "infraNetworkProfile": { + "vnetSubnetIds": "[parameters('vnetSubnetIds')]" + } + }, + "controlPlane": { + "count": "[parameters('controlPlaneNodeCount')]", + "controlPlaneEndpoint": { + "hostIP": "[parameters('controlPlaneIp')]" + }, + "vmSize": "[parameters('controlPlaneVMSize')]" + }, + "licenseProfile": { + "azureHybridBenefit": "[parameters('enableAHUB')]" + }, + "kubernetesVersion": "[parameters('kubernetesVersion')]", + "linuxProfile": { + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshRSAPublicKey')]" + } + ] + } + }, + "networkProfile": { + "loadBalancerProfile": { + "count": "[parameters('loadBalancerCount')]" + }, + "networkPolicy": "[parameters('networkPolicy')]", + "podCidr": "[parameters('podCidr')]" + }, + "storageProfile": { + "nfsCsiDriver": { + "enabled": false + }, + "smbCsiDriver": { + "enabled": false + } + } + } + // "extendedLocation": { + // "name": "[parameters('customLocation')]", + // "type": "CustomLocation" + // } + } + ] + } \ No newline at end of file diff --git a/aks-arc/aks-hci/azs.parameters.json b/aks-arc/aks-hci/azs.parameters.json new file mode 100644 index 000000000000..7c9b53539e60 --- /dev/null +++ b/aks-arc/aks-hci/azs.parameters.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "provisionedClusterName": { + "value": "TODO: Fill in parameter value" + }, + "location": { + "value": "eastus" + }, + "resourceTags": { + "value": {} + }, + "sshRSAPublicKey": { + "value": "TODO: Fill in parameter value" + }, + "enableAHUB": { + "value": "NotApplicable" + }, + "agentName": { + "value": "nodepool" + }, + "agentVMSize": { + "value": "Standard_A4_v2" + }, + "agentCount": { + "value": 1 + }, + "agentOsType": { + "value": "Linux" + }, + "loadBalancerCount": { + "value": 0 + }, + "kubernetesVersion": { + "value": "1.26.6" + }, + "apiversion":{ + "value": "2024-01-01" + }, + "controlPlaneNodeCount": { + "value": 1 + }, + "controlPlaneIp": { + "value": "TODO: Fill in parameter value" + }, + "controlPlaneVMSize": { + "value": "Standard_A4_v2" + }, + "vnetSubnetIds": { + "value": [ + "TODO: Fill in parameter value" + ] + }, + "podCidr": { + "value": "10.244.0.0/16" + }, + "networkPolicy": { + "value": "calico" + }, + "customLocation": { + "value": "TODO: Fill in parameter value" + } + } +} \ No newline at end of file diff --git a/aks-arc/aks-vmware/armtemplateVmware.json b/aks-arc/aks-vmware/armtemplateVmware.json new file mode 100644 index 000000000000..438b126f98d2 --- /dev/null +++ b/aks-arc/aks-vmware/armtemplateVmware.json @@ -0,0 +1,203 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "provisionedClusterName": { + "type": "string", + "defaultValue": "aksarc-armcluster", + "metadata": { + "description": "The name of the AKS Arc Cluster resource." + } + }, + "location": { + "type": "string", + "defaultValue": "eastus", + "metadata": { + "description": "The location of the AKS Arc Cluster resource." + } + }, + "resourceTags": { + "type": "object", + "defaultValue": {} + }, + "sshRSAPublicKey": { + "type": "string", + "metadata": { + "description": "Configure all linux machines with the SSH RSA public key string. Your key should include three parts, for example 'ssh-rsa AAAAB...snip...UcyupgH '" + } + }, + "enableAHUB": { + "type": "string", + "defaultValue": "NotApplicable", + "metadata": { + "description": "Azure Hybrid Benefit for Windows Server licenses. NotApplicable, True, False." + } + }, + "agentName": { + "type": "string", + "defaultValue": "nodepool", + "metadata": { + "description": "The name of the node pool." + } + }, + "agentVMSize": { + "type": "string", + "defaultValue": "Standard_A4_v2", + "metadata": { + "description": "The VM size for node pools." + } + }, + "agentCount": { + "type": "int", + "defaultValue": 1, + "minValue": 1, + "maxValue": 50, + "metadata": { + "description": "The number of nodes for the cluster." + } + }, + "agentOsType": { + "type": "string", + "defaultValue": "Linux", + "metadata": { + "description": "The OS Type for the agent pool. Values are Linux and Windows." + } + }, + "loadBalancerCount": { + "type": "int", + "defaultValue": 0, + "metadata": { + "description": "The number of load balancers." + } + }, + "kubernetesVersion": { + "type": "string", + "metadata": { + "description": "The version of Kubernetes." + } + }, + "controlPlaneNodeCount": { + "type": "int", + "defaultValue": 1, + "minValue": 1, + "maxValue": 5, + "metadata": { + "description": "The number of control plane nodes for the cluster." + } + }, + "controlPlaneIp": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "Control plane IP address." + } + }, + "controlPlaneVMSize": { + "type": "string", + "defaultValue": "Standard_A4_v2", + "metadata": { + "description": "The VM size for control plane." + } + }, + "vnetSubnetIds": { + "type": "array", + "metadata": { + "description": "List of subnet Ids for the AKS cluster." + } + }, + "podCidr": { + "type": "string", + "defaultValue": "10.244.0.0/16", + "metadata": { + "description": "The VM size for control plane." + } + }, + "networkPolicy": { + "type": "string", + "defaultValue": "calico", + "metadata": { + "description": "Network policy to use for Kubernetes pods. Only options supported is calico." + } + }, + "customLocation": { + "type": "string", + "metadata": { + "description": "Fully qualified custom location ARM resource Id." + } + } + }, + "resources": [ + { + "apiVersion": "2023-11-01-preview", + "type": "Microsoft.Kubernetes/ConnectedClusters", + "kind": "ProvisionedCluster", + "location": "[parameters('location')]", + "name": "[parameters('provisionedClusterName')]", + "tags": "[parameters('resourceTags')]", + "identity": { + "type": "SystemAssigned" + }, + "properties": { + "agentPublicKeyCertificate":"" , + "aadProfile": { + "enableAzureRBAC": false + } + } + }, + { + "apiVersion": "2023-11-15-preview", + "type": "microsoft.hybridcontainerservice/provisionedclusterinstances", + "name": "default", + "scope": "[concat('Microsoft.Kubernetes/ConnectedClusters', '/', parameters('provisionedClusterName'))]", + "dependsOn": [ + "[resourceId('Microsoft.Kubernetes/ConnectedClusters', parameters('provisionedClusterName'))]" + ], + "properties": { + "agentPoolProfiles": [ + { + "count": "[parameters('agentCount')]", + "name":"[parameters('agentName')]", + "osType": "[parameters('agentOsType')]", + "vmSize": "[parameters('agentVMSize')]" + } + ], + "cloudProviderProfile": { + "infraNetworkProfile": { + "vnetSubnetIds": "[parameters('vnetSubnetIds')]" + } + }, + "controlPlane": { + "count": "[parameters('controlPlaneNodeCount')]", + "controlPlaneEndpoint": { + "hostIP": "[parameters('controlPlaneIp')]" + }, + "vmSize": "[parameters('controlPlaneVMSize')]" + }, + "licenseProfile": { + "azureHybridBenefit": "[parameters('enableAHUB')]" + }, + "kubernetesVersion": "[parameters('kubernetesVersion')]", + "linuxProfile": { + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshRSAPublicKey')]" + } + ] + } + }, + "networkProfile": { + "loadBalancerProfile": { + "count": "[parameters('loadBalancerCount')]" + }, + "networkPolicy": "[parameters('networkPolicy')]", + "podCidr": "[parameters('podCidr')]" + } + }, + "extendedLocation": { + "name": "[parameters('customLocation')]", + "type": "CustomLocation" + } + } + ] + } diff --git a/aks-arc/aks-vmware/deploy.ps1 b/aks-arc/aks-vmware/deploy.ps1 new file mode 100644 index 000000000000..15f9bfd6b6e8 --- /dev/null +++ b/aks-arc/aks-vmware/deploy.ps1 @@ -0,0 +1,160 @@ +# Deploy AKS Arc clusters on vmware in batches +[CmdletBinding()] +param ( + [Parameter(Mandatory=$true)] + [string] + [ValidateScript({Test-Path $_ -PathType Leaf})] + $ControlplaneStaticIPfile = "availip.txt", + + [Parameter(Mandatory=$true)] + [ValidateScript({Test-Path $_ -PathType Leaf})] + [string] + $ArmTemplateFile = "armtemplate.json", + + [Parameter(Mandatory=$true)] + [string] + [ValidateScript({Test-Path $_ -PathType Leaf})] + $ArmTemplateParametersFile = "vmware.parameters.json", + + [Parameter(Mandatory=$true)] + [string] + $ResourceGroup = 'sarathys', + + [Parameter(Mandatory=$true)] + [string] + $ServicePrincipalId, + + [Parameter(Mandatory=$true)] + [securestring] + $ServicePrincipalSecret, + + [Parameter(Mandatory=$true)] + [string] + $TenantId = 'microsoft.onmicrosoft.com' +) + +# Path: ARMtemplates/deploy.ps1 + +function Login { + param ( + [Parameter(Mandatory=$true)] + [string] + $ServicePrincipalId, + + [Parameter(Mandatory=$true)] + [securestring] + $ServicePrincipalSecret, + + [Parameter(Mandatory=$true)] + [string] + $TenantId = 'microsoft.onmicrosoft.com' + ) + + $ErrorActionPreference = 'stop' + $ServicePrincipalSecret = ConvertFrom-SecureString -SecureString $ServicePrincipalSecret + az login --service-principal -u $ServicePrincipalId -p $ServicePrincipalSecret --tenant $TenantId +} + + +function Save-DeploymentInfo($deploymentName, $clusterName, $rg) +{ + $cluster = az aksarc show -n "$clusterName" -g $rg | ConvertFrom-Json + Write-Verbose -Message "az deployment show deployment: $deploymentName" -Verbose + $depInfo = az deployment group show -n $deploymentName -g $rg | ConvertFrom-Json + $errorInfo = $null + if($null -ne $depInfo) + { + if($cluster.properties.provisioningState -eq 'Failed') + { + Write-Verbose -Message "cluster $clusterName provisioning has failed" -Verbose + $errorInfo = @{ClusterName = "$clusterName" + Error = $cluster.properties.status.errorMessage + AddOnNotReady = ($c.properties.status.controlPlaneStatus | ? {$_.ready -ne 'True'} ) + ArmDeployment = $depInfo.name + ArmDeployError = ($depInfo.properties.error.details | select message).message + ArmDeployDuration = $depInfo.properties.duration + } + } + else + { + Write-Verbose -Message "cluster $clusterName provisioning has succeeded." -Verbose + } + } + + $deployInfo = @{DeploymentName = $deploymentName; ClusterName = $clusterName; ErrorInfo = $errorInfo} + + Write-Verbose -Message "Deployment info for deployment: $deploymentName clusterName: $clusterName saved to $resultsFile" -Verbose + $deployInfo | ConvertTo-Json | Out-File $resultsFile -Append +} + + +# main + +$ErrorActionPreference = 'continue' + +# get mmdd prefix +$prefix = (Get-Date).ToString("MMdd") +$armDeployPrefix = "a$prefix-" +$clusPrefix = "c$prefix-" + +$ips = Get-Content $ControlplaneStaticIPfile -ErrorAction Stop + +$batchSize = 10 +$batchNum = 0 +$r = [System.Random]::new() +$batchSize = $r.Next(1, 10) +$iteration = 0 +$rg = 'sarathys' + +mkdir c:\aksarc -Force +$resultsFile = "C:\aksarc\results.json" + +Login -ServicePrincipalId $ServicePrincipalId -ServicePrincipalSecret $ServicePrincipalSecret -TenantId $TenantId + +while($true) +{ + $iteration++ + Write-Verbose -Message "[$(Get-Date)] START iteration $iteration" -Verbose + for($i=0; $i -lt $ips.Count; $i = $i + $batchSize) + { + $batchNum++ + Write-Verbose -Message "[$(Get-Date)] START batch $batchNum deployment, batch size = $batchSize" -Verbose + for($j=$i; ($j -lt ($i + $batchSize)) -and ($j -lt $ips.Count - 1); $j++) + { + $controlPlaneIp = $ips[$j] + $controlPlaneIpRes = $controlPlaneIp.Replace('.','-') + $deploymentName = "$armDeployPrefix$controlPlaneIpRes" + $clusterName = "$clusPrefix$controlPlaneIpRes" + Write-Verbose -Message "[$(Get-Date)] Starting template deployment $deploymentName with control plane IP: $controlPlaneIp clusterName $clusterName" -Verbose + az deployment group create --name $deploymentName --resource-group sarathys --template-file .\armtemplate.json --parameters `@vmware.parametersLoop.json ` + --parameters controlPlaneIp=$controlPlaneIp --parameters provisionedClusterName=$clusterName --no-wait + } + + for($j=$i; ($j -lt ($i + $batchSize)) -and ($j -lt $ips.Count - 1); $j++) + { + $controlPlaneIp = $ips[$j] + $controlPlaneIpRes = $controlPlaneIp.Replace('.','-') + $deploymentName = "$armDeployPrefix$controlPlaneIpRes" + + Write-Verbose -Message "[$(Get-Date)] WAIT for deployment $deploymentName to be created, timeout 1h." -Verbose + az deployment group wait --name $deploymentName --resource-group sarathys --created + } + + + for($j=$i; ($j -lt ($i + $batchSize)) -and ($j -lt $ips.Count - 1); $j++) + { + $controlPlaneIp = $ips[$j] + $controlPlaneIpRes = $controlPlaneIp.Replace('.','-') + $deploymentName = "$armDeployPrefix$controlPlaneIpRes" + + Save-DeploymentInfo -deploymentName $deploymentName -clusterName $clusterName -rg $rg + Write-Verbose -Message "[$(Get-Date)] DELETE deployment $deploymentName to be created, timeout 1h." -Verbose + az deployment group delete --name $deploymentName --resource-group sarathys --no-wait + } + + + Write-Verbose -Message "[$(Get-Date)] END batch $batchNum" -Verbose + $batchSize = $r.Next(1, 10) + } + Write-Verbose -Message "[$(Get-Date)] END iteration $iteration" -Verbose +} diff --git a/aks-arc/aks-vmware/getDeployStatus.ps1 b/aks-arc/aks-vmware/getDeployStatus.ps1 new file mode 100644 index 000000000000..ecf7c412718a --- /dev/null +++ b/aks-arc/aks-vmware/getDeployStatus.ps1 @@ -0,0 +1,51 @@ +# script to obtain errors from ARM template deployments +# az login --service-principal -u adf4852b-132b-443d-81b0-c50493735ab9 -p ... --tenant microsoft.onmicrosoft.com +$ErrorActionPreference = 'continue' + +#todo parameterize +$start = 7 +$end = 206 +$armDeployPrefix = "armdep-0317-a" +$clusPrefix = "clus-0317-a" +$rg = 'sarathys' +$success = 0 +$fail = 0 +$errorInfo = @() + +for($i=$start; $i -lt $end; $i++) +{ + Write-Verbose -Message "AksArc show cluster: $clusPrefix$i " -Verbose + $cluster = az aksarc show -n "$clusPrefix$i" -g $rg | ConvertFrom-Json + Write-Verbose -Message "az deployment show deployment: $armDeployPrefix$i " -Verbose + $depInfo = az deployment group show -n "$armDeployPrefix$i" -g $rg | ConvertFrom-Json + if($null -ne $depInfo) + { + if($cluster.properties.provisioningState -eq 'Failed') + { + Write-Verbose -Message "cluster $clusPrefix$i provisioning has failed" -Verbose + $fail++ + $errorInfo += @{ClusterName = "$clusPrefix$i" + Error = $cluster.properties.status.errorMessage + AddOnNotReady = ($c.properties.status.controlPlaneStatus | ? {$_.ready -ne 'True'} ) + ArmDeployment = $depInfo.name + ArmDeployError = ($depInfo.properties.error.details | select message).message + ArmDeployDuration = $depInfo.properties.duration + } + } + else + { + Write-Verbose -Message "cluster $clusPrefix$i provisioning has succeeded." -Verbose + $success++ + } + } +} + +Write-Verbose -Message "Success: $success failed: $fail" -Verbose +mkdir c:\temp -Force +$errorLogFile = "c:\temp\aksvmwareerr2.txt" +$errorInfo | ConvertTo-Json | Out-File $errorLogFile -Force +Write-Verbose -Message "Error info written $errorLogFile" -Verbose + + + + diff --git a/aks-arc/aks-vmware/vmware.parameters.json b/aks-arc/aks-vmware/vmware.parameters.json new file mode 100644 index 000000000000..ebb432c61c05 --- /dev/null +++ b/aks-arc/aks-vmware/vmware.parameters.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "provisionedClusterName": { + "value": "TODO: Add cluster name here." + }, + "location": { + "value": "eastus" + }, + "resourceTags": { + "value": {} + }, + "sshRSAPublicKey": { + "value": "TODO: Add your SSH RSA public key here." + }, + "enableAHUB": { + "value": "NotApplicable" + }, + "agentName": { + "value": "nodepool" + }, + "agentVMSize": { + "value": "Standard_A4_v2" + }, + "agentCount": { + "value": 1 + }, + "agentOsType": { + "value": "Linux" + }, + "loadBalancerCount": { + "value": 0 + }, + "kubernetesVersion": { + "value": "1.26.6" + }, + "controlPlaneNodeCount": { + "value": 1 + }, + "controlPlaneIp": { + "value": "100.65.180.140" + }, + "controlPlaneVMSize": { + "value": "Standard_D4s_v3" + }, + "vnetSubnetIds": { + "value": [ + "TODO: Add your subnet ARM ID here." + ] + }, + "podCidr": { + "value": "10.244.0.0/16" + }, + "networkPolicy": { + "value": "calico" + }, + "customLocation": { + "value": "TODO: Add your custom location ARM ID here." + } + } +} \ No newline at end of file From 8f92e41900e356539b634610694f7db9b4f5e938 Mon Sep 17 00:00:00 2001 From: ReddyVanshika <110912436+ReddyVanshika@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:52:39 -0400 Subject: [PATCH 2/7] Create metadata.json added metadata.json for akshci --- aks-arc/aks-hci/metadata.json | 65 +++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 aks-arc/aks-hci/metadata.json diff --git a/aks-arc/aks-hci/metadata.json b/aks-arc/aks-hci/metadata.json new file mode 100644 index 000000000000..747b5a53641e --- /dev/null +++ b/aks-arc/aks-hci/metadata.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "provisionedClusterName": { + "value": "cluster1" + }, + "location": { + "value": "eastus" + }, + "resourceTags": { + "value": {} + }, + "sshRSAPublicKey": { + "value": "sshRSAPublicKey" + }, + "enableAHUB": { + "value": "NotApplicable" + }, + "agentName": { + "value": "nodepool" + }, + "agentVMSize": { + "value": "Standard_A4_v2" + }, + "agentCount": { + "value": 1 + }, + "agentOsType": { + "value": "Linux" + }, + "loadBalancerCount": { + "value": 0 + }, + "kubernetesVersion": { + "value": "1.26.6" + }, + "apiversion":{ + "value": "2024-01-01" + }, + "controlPlaneNodeCount": { + "value": 1 + }, + "controlPlaneIp": { + "value": "1.0.0.156" + }, + "controlPlaneVMSize": { + "value": "Standard_A4_v2" + }, + "vnetSubnetIds": { + "value": [ + "vnet1" + ] + }, + "podCidr": { + "value": "10.244.0.0/16" + }, + "networkPolicy": { + "value": "calico" + }, + "customLocation": { + "value": "houston" + } + } +} From 0bcfa867bf9f0eee9cb2807caee402433718d5a0 Mon Sep 17 00:00:00 2001 From: ReddyVanshika <110912436+ReddyVanshika@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:54:03 -0400 Subject: [PATCH 3/7] Create metadata.json --- aks-arc/aks-vmware/metadata.json | 62 ++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 aks-arc/aks-vmware/metadata.json diff --git a/aks-arc/aks-vmware/metadata.json b/aks-arc/aks-vmware/metadata.json new file mode 100644 index 000000000000..218b47028734 --- /dev/null +++ b/aks-arc/aks-vmware/metadata.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "provisionedClusterName": { + "value": "cluster1" + }, + "location": { + "value": "eastus" + }, + "resourceTags": { + "value": {} + }, + "sshRSAPublicKey": { + "value": "sshRSAPublicKey" + }, + "enableAHUB": { + "value": "NotApplicable" + }, + "agentName": { + "value": "nodepool" + }, + "agentVMSize": { + "value": "Standard_A4_v2" + }, + "agentCount": { + "value": 1 + }, + "agentOsType": { + "value": "Linux" + }, + "loadBalancerCount": { + "value": 0 + }, + "kubernetesVersion": { + "value": "1.26.6" + }, + "controlPlaneNodeCount": { + "value": 1 + }, + "controlPlaneIp": { + "value": "100.65.180.140" + }, + "controlPlaneVMSize": { + "value": "Standard_D4s_v3" + }, + "vnetSubnetIds": { + "value": [ + "hvnet" + ] + }, + "podCidr": { + "value": "10.244.0.0/16" + }, + "networkPolicy": { + "value": "calico" + }, + "customLocation": { + "value": "Houston" + } + } +} From eaa38c8a13989f1e926087036ba5212e7f8afa2d Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Wed, 23 Oct 2024 07:37:56 -0400 Subject: [PATCH 4/7] changed to have only one folder --- aks-arc/aks-hci/armtemplate.json | 220 ---------------------------- aks-arc/aks-hci/azs.parameters.json | 65 -------- aks-arc/aks-hci/metadata.json | 65 -------- 3 files changed, 350 deletions(-) delete mode 100644 aks-arc/aks-hci/armtemplate.json delete mode 100644 aks-arc/aks-hci/azs.parameters.json delete mode 100644 aks-arc/aks-hci/metadata.json diff --git a/aks-arc/aks-hci/armtemplate.json b/aks-arc/aks-hci/armtemplate.json deleted file mode 100644 index b5e5a8c2487a..000000000000 --- a/aks-arc/aks-hci/armtemplate.json +++ /dev/null @@ -1,220 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "provisionedClusterName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The name of the AKS Arc Cluster resource." - } - }, - "location": { - "type": "string", - "defaultValue": "eastus", - "metadata": { - "description": "The location of the AKS Arc Cluster resource." - } - }, - "resourceTags": { - "type": "object", - "defaultValue": {} - }, - "connectedClustersApiVersion": { - "type": "String", - "defaultValue": "" - }, - "provisionedClustersApiVersion": { - "type": "String", - "defaultValue": "" - }, - - "sshRSAPublicKey": { - "type": "string", - "metadata": { - "description": "Configure all linux machines with the SSH RSA public key string. Your key should include three parts, for example 'ssh-rsa AAAAB...snip...UcyupgH '" - } - }, - "enableAHUB": { - "type": "string", - "defaultValue": "NotApplicable", - "metadata": { - "description": "Azure Hybrid Benefit for Windows Server licenses. NotApplicable, True, False." - } - }, - "agentName": { - "type": "string", - "defaultValue": "nodepool", - "metadata": { - "description": "The name of the node pool." - } - }, - "agentVMSize": { - "type": "string", - "defaultValue": "Standard_A4_v2", - "metadata": { - "description": "The VM size for node pools." - } - }, - "agentCount": { - "type": "int", - "defaultValue": 1, - "minValue": 1, - "maxValue": 50, - "metadata": { - "description": "The number of nodes for the cluster." - } - }, - "agentOsType": { - "type": "string", - "defaultValue": "Linux", - "metadata": { - "description": "The OS Type for the agent pool. Values are Linux and Windows." - } - }, - "loadBalancerCount": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "The number of load balancers." - } - }, - "kubernetesVersion": { - "type": "string", - "metadata": { - "description": "The version of Kubernetes." - } - }, - "controlPlaneNodeCount": { - "type": "int", - "defaultValue": 1, - "minValue": 1, - "maxValue": 5, - "metadata": { - "description": "The number of control plane nodes for the cluster." - } - }, - "controlPlaneIp": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Control plane IP address." - } - }, - "controlPlaneVMSize": { - "type": "string", - "defaultValue": "Standard_A4_v2", - "metadata": { - "description": "The VM size for control plane." - } - }, - "vnetSubnetIds": { - "type": "array", - "metadata": { - "description": "List of subnet Ids for the AKS cluster." - } - }, - "podCidr": { - "type": "string", - "defaultValue": "10.244.0.0/16", - "metadata": { - "description": "The VM size for control plane." - } - }, - "networkPolicy": { - "type": "string", - "defaultValue": "calico", - "metadata": { - "description": "Network policy to use for Kubernetes pods. Only options supported is calico." - } - }, - "customLocation": { - "type": "string", - "metadata": { - "description": "Fully qualified custom location ARM resource Id." - } - } - }, - "resources": [ - { - "apiVersion": "[parameters('connectedClustersApiVersion')]", - "type": "Microsoft.Kubernetes/ConnectedClusters", - "kind": "ProvisionedCluster", - "location": "[parameters('location')]", - "name": "[parameters('provisionedClusterName')]", - "tags": "[parameters('resourceTags')]", - "identity": { - "type": "SystemAssigned" - }, - "properties": { - "agentPublicKeyCertificate":"" , - "aadProfile": { - "enableAzureRBAC": false - } - } - }, - { - "apiVersion": "[parameters('provisionedClustersApiVersion')]", - "type": "microsoft.hybridcontainerservice/provisionedclusterinstances", - "name": "default", - "scope": "[concat('Microsoft.Kubernetes/ConnectedClusters', '/', parameters('provisionedClusterName'))]", - "dependsOn": [ - "[resourceId('Microsoft.Kubernetes/ConnectedClusters', parameters('provisionedClusterName'))]" - ], - "properties": { - "agentPoolProfiles": [ - { - "count": "[parameters('agentCount')]", - "name":"[parameters('agentName')]", - "osType": "[parameters('agentOsType')]", - "vmSize": "[parameters('agentVMSize')]" - } - ], - "cloudProviderProfile": { - "infraNetworkProfile": { - "vnetSubnetIds": "[parameters('vnetSubnetIds')]" - } - }, - "controlPlane": { - "count": "[parameters('controlPlaneNodeCount')]", - "controlPlaneEndpoint": { - "hostIP": "[parameters('controlPlaneIp')]" - }, - "vmSize": "[parameters('controlPlaneVMSize')]" - }, - "licenseProfile": { - "azureHybridBenefit": "[parameters('enableAHUB')]" - }, - "kubernetesVersion": "[parameters('kubernetesVersion')]", - "linuxProfile": { - "ssh": { - "publicKeys": [ - { - "keyData": "[parameters('sshRSAPublicKey')]" - } - ] - } - }, - "networkProfile": { - "loadBalancerProfile": { - "count": "[parameters('loadBalancerCount')]" - }, - "networkPolicy": "[parameters('networkPolicy')]", - "podCidr": "[parameters('podCidr')]" - }, - "storageProfile": { - "nfsCsiDriver": { - "enabled": false - }, - "smbCsiDriver": { - "enabled": false - } - } - } - // "extendedLocation": { - // "name": "[parameters('customLocation')]", - // "type": "CustomLocation" - // } - } - ] - } \ No newline at end of file diff --git a/aks-arc/aks-hci/azs.parameters.json b/aks-arc/aks-hci/azs.parameters.json deleted file mode 100644 index 7c9b53539e60..000000000000 --- a/aks-arc/aks-hci/azs.parameters.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "provisionedClusterName": { - "value": "TODO: Fill in parameter value" - }, - "location": { - "value": "eastus" - }, - "resourceTags": { - "value": {} - }, - "sshRSAPublicKey": { - "value": "TODO: Fill in parameter value" - }, - "enableAHUB": { - "value": "NotApplicable" - }, - "agentName": { - "value": "nodepool" - }, - "agentVMSize": { - "value": "Standard_A4_v2" - }, - "agentCount": { - "value": 1 - }, - "agentOsType": { - "value": "Linux" - }, - "loadBalancerCount": { - "value": 0 - }, - "kubernetesVersion": { - "value": "1.26.6" - }, - "apiversion":{ - "value": "2024-01-01" - }, - "controlPlaneNodeCount": { - "value": 1 - }, - "controlPlaneIp": { - "value": "TODO: Fill in parameter value" - }, - "controlPlaneVMSize": { - "value": "Standard_A4_v2" - }, - "vnetSubnetIds": { - "value": [ - "TODO: Fill in parameter value" - ] - }, - "podCidr": { - "value": "10.244.0.0/16" - }, - "networkPolicy": { - "value": "calico" - }, - "customLocation": { - "value": "TODO: Fill in parameter value" - } - } -} \ No newline at end of file diff --git a/aks-arc/aks-hci/metadata.json b/aks-arc/aks-hci/metadata.json deleted file mode 100644 index 747b5a53641e..000000000000 --- a/aks-arc/aks-hci/metadata.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "provisionedClusterName": { - "value": "cluster1" - }, - "location": { - "value": "eastus" - }, - "resourceTags": { - "value": {} - }, - "sshRSAPublicKey": { - "value": "sshRSAPublicKey" - }, - "enableAHUB": { - "value": "NotApplicable" - }, - "agentName": { - "value": "nodepool" - }, - "agentVMSize": { - "value": "Standard_A4_v2" - }, - "agentCount": { - "value": 1 - }, - "agentOsType": { - "value": "Linux" - }, - "loadBalancerCount": { - "value": 0 - }, - "kubernetesVersion": { - "value": "1.26.6" - }, - "apiversion":{ - "value": "2024-01-01" - }, - "controlPlaneNodeCount": { - "value": 1 - }, - "controlPlaneIp": { - "value": "1.0.0.156" - }, - "controlPlaneVMSize": { - "value": "Standard_A4_v2" - }, - "vnetSubnetIds": { - "value": [ - "vnet1" - ] - }, - "podCidr": { - "value": "10.244.0.0/16" - }, - "networkPolicy": { - "value": "calico" - }, - "customLocation": { - "value": "houston" - } - } -} From a15f16fa6dc33fd243d58a3349fd424d660e789c Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Wed, 6 Nov 2024 04:53:15 -0500 Subject: [PATCH 5/7] updated PR with ReadMe and correct names. ReadMe needs a few more changes --- aks-arc/aks-vmware/metadata.json | 62 ------------------- .../microsoft.aksarc/aks-vmware/README.md | 30 +++++++++ .../aks-vmware/azuredeploy.json | 8 +-- .../aks-vmware/azuredeploy.parameters.json | 0 .../microsoft.aksarc}/aks-vmware/deploy.ps1 | 0 .../aks-vmware/getDeployStatus.ps1 | 0 .../microsoft.aksarc/aks-vmware/metadata.json | 10 +++ 7 files changed, 44 insertions(+), 66 deletions(-) delete mode 100644 aks-arc/aks-vmware/metadata.json create mode 100644 quickstarts/microsoft.aksarc/aks-vmware/README.md rename aks-arc/aks-vmware/armtemplateVmware.json => quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.json (97%) rename aks-arc/aks-vmware/vmware.parameters.json => quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.parameters.json (100%) rename {aks-arc => quickstarts/microsoft.aksarc}/aks-vmware/deploy.ps1 (100%) rename {aks-arc => quickstarts/microsoft.aksarc}/aks-vmware/getDeployStatus.ps1 (100%) create mode 100644 quickstarts/microsoft.aksarc/aks-vmware/metadata.json diff --git a/aks-arc/aks-vmware/metadata.json b/aks-arc/aks-vmware/metadata.json deleted file mode 100644 index 218b47028734..000000000000 --- a/aks-arc/aks-vmware/metadata.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "provisionedClusterName": { - "value": "cluster1" - }, - "location": { - "value": "eastus" - }, - "resourceTags": { - "value": {} - }, - "sshRSAPublicKey": { - "value": "sshRSAPublicKey" - }, - "enableAHUB": { - "value": "NotApplicable" - }, - "agentName": { - "value": "nodepool" - }, - "agentVMSize": { - "value": "Standard_A4_v2" - }, - "agentCount": { - "value": 1 - }, - "agentOsType": { - "value": "Linux" - }, - "loadBalancerCount": { - "value": 0 - }, - "kubernetesVersion": { - "value": "1.26.6" - }, - "controlPlaneNodeCount": { - "value": 1 - }, - "controlPlaneIp": { - "value": "100.65.180.140" - }, - "controlPlaneVMSize": { - "value": "Standard_D4s_v3" - }, - "vnetSubnetIds": { - "value": [ - "hvnet" - ] - }, - "podCidr": { - "value": "10.244.0.0/16" - }, - "networkPolicy": { - "value": "calico" - }, - "customLocation": { - "value": "Houston" - } - } -} diff --git a/quickstarts/microsoft.aksarc/aks-vmware/README.md b/quickstarts/microsoft.aksarc/aks-vmware/README.md new file mode 100644 index 000000000000..755878d37cc8 --- /dev/null +++ b/quickstarts/microsoft.aksarc/aks-vmware/README.md @@ -0,0 +1,30 @@ +--- +description: This template creates an AKS ARC provision cluster. +page_type: sample +products: +- azure +- azure-resource-manager +urlFragment: AKS-VMWare +languages: +- json +- bicep +--- +# Create an AKS ARC Provision cluster using a template + +![Azure Public Test Date]() +![Azure Public Test Result]() + +![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/BestPracticeResult.svg) +![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/CredScanResult.svg) + +![Bicep Version](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/BicepVersion.svg) + +[![Deploy To Azure](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazure.svg?sanitize=true)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.analysisservices%2Fanalysis-services-create%2Fazuredeploy.json) + +[![Visualize](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/visualizebutton.svg?sanitize=true)](http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.analysisservices%2Fanalysis-services-create%2Fazuredeploy.json) + +This template allows you to deploy a new Azure Analysis Services server with a simple firewall rule. The [quickstart]() article describes how to deploy the template. + +For more information about Azure Analysis Services, see [What is Azure Analysis Services?](https://docs.microsoft.com/azure/analysis-services/analysis-services-overview). + +`Tags: Microsoft.aksarc/aks-vmware` diff --git a/aks-arc/aks-vmware/armtemplateVmware.json b/quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.json similarity index 97% rename from aks-arc/aks-vmware/armtemplateVmware.json rename to quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.json index 438b126f98d2..174ac66c30a0 100644 --- a/aks-arc/aks-vmware/armtemplateVmware.json +++ b/quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.json @@ -193,11 +193,11 @@ "networkPolicy": "[parameters('networkPolicy')]", "podCidr": "[parameters('podCidr')]" } - }, - "extendedLocation": { - "name": "[parameters('customLocation')]", - "type": "CustomLocation" } + // "extendedLocation": { + // "name": "[parameters('customLocation')]", + // "type": "CustomLocation" + // } } ] } diff --git a/aks-arc/aks-vmware/vmware.parameters.json b/quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.parameters.json similarity index 100% rename from aks-arc/aks-vmware/vmware.parameters.json rename to quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.parameters.json diff --git a/aks-arc/aks-vmware/deploy.ps1 b/quickstarts/microsoft.aksarc/aks-vmware/deploy.ps1 similarity index 100% rename from aks-arc/aks-vmware/deploy.ps1 rename to quickstarts/microsoft.aksarc/aks-vmware/deploy.ps1 diff --git a/aks-arc/aks-vmware/getDeployStatus.ps1 b/quickstarts/microsoft.aksarc/aks-vmware/getDeployStatus.ps1 similarity index 100% rename from aks-arc/aks-vmware/getDeployStatus.ps1 rename to quickstarts/microsoft.aksarc/aks-vmware/getDeployStatus.ps1 diff --git a/quickstarts/microsoft.aksarc/aks-vmware/metadata.json b/quickstarts/microsoft.aksarc/aks-vmware/metadata.json new file mode 100644 index 000000000000..d648f90cf72b --- /dev/null +++ b/quickstarts/microsoft.aksarc/aks-vmware/metadata.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://aka.ms/azure-quickstart-templates-metadata-schema#", + "type": "QuickStart", + "itemDisplayName": "Create an AKS ARC cluster", + "description": "This template creates an AKS ARC cluster with an assiciated control plane IP and Vnet", + "summary": "Create an AKS ARC cluster instance using a template", + "githubUsername": "ReddyVanshika", + "docOwner": "ReddyVanshika", + "dateUpdated": "2024-11-05" + } \ No newline at end of file From a4b19db7d4762a977e58a115288d6c18c5069d40 Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Thu, 7 Nov 2024 07:03:19 -0500 Subject: [PATCH 6/7] updated readme --- .../microsoft.aksarc/aks-vmware/README.md | 8 +- .../microsoft.aksarc/aks-vmware/deploy.ps1 | 160 ------------------ .../aks-vmware/getDeployStatus.ps1 | 51 ------ 3 files changed, 3 insertions(+), 216 deletions(-) delete mode 100644 quickstarts/microsoft.aksarc/aks-vmware/deploy.ps1 delete mode 100644 quickstarts/microsoft.aksarc/aks-vmware/getDeployStatus.ps1 diff --git a/quickstarts/microsoft.aksarc/aks-vmware/README.md b/quickstarts/microsoft.aksarc/aks-vmware/README.md index 755878d37cc8..e01870eeed0f 100644 --- a/quickstarts/microsoft.aksarc/aks-vmware/README.md +++ b/quickstarts/microsoft.aksarc/aks-vmware/README.md @@ -12,19 +12,17 @@ languages: # Create an AKS ARC Provision cluster using a template ![Azure Public Test Date]() -![Azure Public Test Result]() +![Azure Public Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/PublicDeployment.svg) ![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/BestPracticeResult.svg) ![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/CredScanResult.svg) -![Bicep Version](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/BicepVersion.svg) - [![Deploy To Azure](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazure.svg?sanitize=true)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.analysisservices%2Fanalysis-services-create%2Fazuredeploy.json) [![Visualize](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/visualizebutton.svg?sanitize=true)](http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.analysisservices%2Fanalysis-services-create%2Fazuredeploy.json) -This template allows you to deploy a new Azure Analysis Services server with a simple firewall rule. The [quickstart]() article describes how to deploy the template. +This template allows you to deploy a new AKS ARC cluster. -For more information about Azure Analysis Services, see [What is Azure Analysis Services?](https://docs.microsoft.com/azure/analysis-services/analysis-services-overview). +For more information about Azure Analysis Services, see [What is Azure Arc enabled Kuberneties](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/overview). `Tags: Microsoft.aksarc/aks-vmware` diff --git a/quickstarts/microsoft.aksarc/aks-vmware/deploy.ps1 b/quickstarts/microsoft.aksarc/aks-vmware/deploy.ps1 deleted file mode 100644 index 15f9bfd6b6e8..000000000000 --- a/quickstarts/microsoft.aksarc/aks-vmware/deploy.ps1 +++ /dev/null @@ -1,160 +0,0 @@ -# Deploy AKS Arc clusters on vmware in batches -[CmdletBinding()] -param ( - [Parameter(Mandatory=$true)] - [string] - [ValidateScript({Test-Path $_ -PathType Leaf})] - $ControlplaneStaticIPfile = "availip.txt", - - [Parameter(Mandatory=$true)] - [ValidateScript({Test-Path $_ -PathType Leaf})] - [string] - $ArmTemplateFile = "armtemplate.json", - - [Parameter(Mandatory=$true)] - [string] - [ValidateScript({Test-Path $_ -PathType Leaf})] - $ArmTemplateParametersFile = "vmware.parameters.json", - - [Parameter(Mandatory=$true)] - [string] - $ResourceGroup = 'sarathys', - - [Parameter(Mandatory=$true)] - [string] - $ServicePrincipalId, - - [Parameter(Mandatory=$true)] - [securestring] - $ServicePrincipalSecret, - - [Parameter(Mandatory=$true)] - [string] - $TenantId = 'microsoft.onmicrosoft.com' -) - -# Path: ARMtemplates/deploy.ps1 - -function Login { - param ( - [Parameter(Mandatory=$true)] - [string] - $ServicePrincipalId, - - [Parameter(Mandatory=$true)] - [securestring] - $ServicePrincipalSecret, - - [Parameter(Mandatory=$true)] - [string] - $TenantId = 'microsoft.onmicrosoft.com' - ) - - $ErrorActionPreference = 'stop' - $ServicePrincipalSecret = ConvertFrom-SecureString -SecureString $ServicePrincipalSecret - az login --service-principal -u $ServicePrincipalId -p $ServicePrincipalSecret --tenant $TenantId -} - - -function Save-DeploymentInfo($deploymentName, $clusterName, $rg) -{ - $cluster = az aksarc show -n "$clusterName" -g $rg | ConvertFrom-Json - Write-Verbose -Message "az deployment show deployment: $deploymentName" -Verbose - $depInfo = az deployment group show -n $deploymentName -g $rg | ConvertFrom-Json - $errorInfo = $null - if($null -ne $depInfo) - { - if($cluster.properties.provisioningState -eq 'Failed') - { - Write-Verbose -Message "cluster $clusterName provisioning has failed" -Verbose - $errorInfo = @{ClusterName = "$clusterName" - Error = $cluster.properties.status.errorMessage - AddOnNotReady = ($c.properties.status.controlPlaneStatus | ? {$_.ready -ne 'True'} ) - ArmDeployment = $depInfo.name - ArmDeployError = ($depInfo.properties.error.details | select message).message - ArmDeployDuration = $depInfo.properties.duration - } - } - else - { - Write-Verbose -Message "cluster $clusterName provisioning has succeeded." -Verbose - } - } - - $deployInfo = @{DeploymentName = $deploymentName; ClusterName = $clusterName; ErrorInfo = $errorInfo} - - Write-Verbose -Message "Deployment info for deployment: $deploymentName clusterName: $clusterName saved to $resultsFile" -Verbose - $deployInfo | ConvertTo-Json | Out-File $resultsFile -Append -} - - -# main - -$ErrorActionPreference = 'continue' - -# get mmdd prefix -$prefix = (Get-Date).ToString("MMdd") -$armDeployPrefix = "a$prefix-" -$clusPrefix = "c$prefix-" - -$ips = Get-Content $ControlplaneStaticIPfile -ErrorAction Stop - -$batchSize = 10 -$batchNum = 0 -$r = [System.Random]::new() -$batchSize = $r.Next(1, 10) -$iteration = 0 -$rg = 'sarathys' - -mkdir c:\aksarc -Force -$resultsFile = "C:\aksarc\results.json" - -Login -ServicePrincipalId $ServicePrincipalId -ServicePrincipalSecret $ServicePrincipalSecret -TenantId $TenantId - -while($true) -{ - $iteration++ - Write-Verbose -Message "[$(Get-Date)] START iteration $iteration" -Verbose - for($i=0; $i -lt $ips.Count; $i = $i + $batchSize) - { - $batchNum++ - Write-Verbose -Message "[$(Get-Date)] START batch $batchNum deployment, batch size = $batchSize" -Verbose - for($j=$i; ($j -lt ($i + $batchSize)) -and ($j -lt $ips.Count - 1); $j++) - { - $controlPlaneIp = $ips[$j] - $controlPlaneIpRes = $controlPlaneIp.Replace('.','-') - $deploymentName = "$armDeployPrefix$controlPlaneIpRes" - $clusterName = "$clusPrefix$controlPlaneIpRes" - Write-Verbose -Message "[$(Get-Date)] Starting template deployment $deploymentName with control plane IP: $controlPlaneIp clusterName $clusterName" -Verbose - az deployment group create --name $deploymentName --resource-group sarathys --template-file .\armtemplate.json --parameters `@vmware.parametersLoop.json ` - --parameters controlPlaneIp=$controlPlaneIp --parameters provisionedClusterName=$clusterName --no-wait - } - - for($j=$i; ($j -lt ($i + $batchSize)) -and ($j -lt $ips.Count - 1); $j++) - { - $controlPlaneIp = $ips[$j] - $controlPlaneIpRes = $controlPlaneIp.Replace('.','-') - $deploymentName = "$armDeployPrefix$controlPlaneIpRes" - - Write-Verbose -Message "[$(Get-Date)] WAIT for deployment $deploymentName to be created, timeout 1h." -Verbose - az deployment group wait --name $deploymentName --resource-group sarathys --created - } - - - for($j=$i; ($j -lt ($i + $batchSize)) -and ($j -lt $ips.Count - 1); $j++) - { - $controlPlaneIp = $ips[$j] - $controlPlaneIpRes = $controlPlaneIp.Replace('.','-') - $deploymentName = "$armDeployPrefix$controlPlaneIpRes" - - Save-DeploymentInfo -deploymentName $deploymentName -clusterName $clusterName -rg $rg - Write-Verbose -Message "[$(Get-Date)] DELETE deployment $deploymentName to be created, timeout 1h." -Verbose - az deployment group delete --name $deploymentName --resource-group sarathys --no-wait - } - - - Write-Verbose -Message "[$(Get-Date)] END batch $batchNum" -Verbose - $batchSize = $r.Next(1, 10) - } - Write-Verbose -Message "[$(Get-Date)] END iteration $iteration" -Verbose -} diff --git a/quickstarts/microsoft.aksarc/aks-vmware/getDeployStatus.ps1 b/quickstarts/microsoft.aksarc/aks-vmware/getDeployStatus.ps1 deleted file mode 100644 index ecf7c412718a..000000000000 --- a/quickstarts/microsoft.aksarc/aks-vmware/getDeployStatus.ps1 +++ /dev/null @@ -1,51 +0,0 @@ -# script to obtain errors from ARM template deployments -# az login --service-principal -u adf4852b-132b-443d-81b0-c50493735ab9 -p ... --tenant microsoft.onmicrosoft.com -$ErrorActionPreference = 'continue' - -#todo parameterize -$start = 7 -$end = 206 -$armDeployPrefix = "armdep-0317-a" -$clusPrefix = "clus-0317-a" -$rg = 'sarathys' -$success = 0 -$fail = 0 -$errorInfo = @() - -for($i=$start; $i -lt $end; $i++) -{ - Write-Verbose -Message "AksArc show cluster: $clusPrefix$i " -Verbose - $cluster = az aksarc show -n "$clusPrefix$i" -g $rg | ConvertFrom-Json - Write-Verbose -Message "az deployment show deployment: $armDeployPrefix$i " -Verbose - $depInfo = az deployment group show -n "$armDeployPrefix$i" -g $rg | ConvertFrom-Json - if($null -ne $depInfo) - { - if($cluster.properties.provisioningState -eq 'Failed') - { - Write-Verbose -Message "cluster $clusPrefix$i provisioning has failed" -Verbose - $fail++ - $errorInfo += @{ClusterName = "$clusPrefix$i" - Error = $cluster.properties.status.errorMessage - AddOnNotReady = ($c.properties.status.controlPlaneStatus | ? {$_.ready -ne 'True'} ) - ArmDeployment = $depInfo.name - ArmDeployError = ($depInfo.properties.error.details | select message).message - ArmDeployDuration = $depInfo.properties.duration - } - } - else - { - Write-Verbose -Message "cluster $clusPrefix$i provisioning has succeeded." -Verbose - $success++ - } - } -} - -Write-Verbose -Message "Success: $success failed: $fail" -Verbose -mkdir c:\temp -Force -$errorLogFile = "c:\temp\aksvmwareerr2.txt" -$errorInfo | ConvertTo-Json | Out-File $errorLogFile -Force -Write-Verbose -Message "Error info written $errorLogFile" -Verbose - - - - From 482687394e6a7511b8eb9b9912b3a33f8a52421b Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Mon, 11 Nov 2024 05:40:04 -0500 Subject: [PATCH 7/7] attempting to fix badge issue --- quickstarts/microsoft.aksarc/aks-vmware/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstarts/microsoft.aksarc/aks-vmware/README.md b/quickstarts/microsoft.aksarc/aks-vmware/README.md index e01870eeed0f..670ec7f978c5 100644 --- a/quickstarts/microsoft.aksarc/aks-vmware/README.md +++ b/quickstarts/microsoft.aksarc/aks-vmware/README.md @@ -11,7 +11,7 @@ languages: --- # Create an AKS ARC Provision cluster using a template -![Azure Public Test Date]() +![Azure Public Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/PublicLastTestDate.svg) ![Azure Public Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/PublicDeployment.svg) ![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/BestPracticeResult.svg)