From 9a678c4f6567cc3314da1d5274f9c7f43e5987ae Mon Sep 17 00:00:00 2001 From: Vanshika Reddy Date: Mon, 15 Apr 2024 14:36:02 -0400 Subject: [PATCH 01/19] 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 02/19] 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 03/19] 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 04/19] 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 05/19] 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 06/19] 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 e6390a425310ab4d5de9e237315ad6217de1b387 Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Thu, 7 Nov 2024 07:14:37 -0500 Subject: [PATCH 07/19] added akshci --- .../microsoft.aksarc/aks-hci/README.md | 28 +++ .../microsoft.aksarc/aks-hci/azuredeploy.json | 220 ++++++++++++++++++ .../aks-hci/azuredeploy.parameters.json | 65 ++++++ .../microsoft.aksarc/aks-hci/metadata.json | 10 + 4 files changed, 323 insertions(+) create mode 100644 quickstarts/microsoft.aksarc/aks-hci/README.md create mode 100644 quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json create mode 100644 quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json create mode 100644 quickstarts/microsoft.aksarc/aks-hci/metadata.json diff --git a/quickstarts/microsoft.aksarc/aks-hci/README.md b/quickstarts/microsoft.aksarc/aks-hci/README.md new file mode 100644 index 000000000000..e01870eeed0f --- /dev/null +++ b/quickstarts/microsoft.aksarc/aks-hci/README.md @@ -0,0 +1,28 @@ +--- +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](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) + +[![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 AKS ARC cluster. + +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-hci/azuredeploy.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json new file mode 100644 index 000000000000..b5e5a8c2487a --- /dev/null +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.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/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json new file mode 100644 index 000000000000..7c9b53539e60 --- /dev/null +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.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/quickstarts/microsoft.aksarc/aks-hci/metadata.json b/quickstarts/microsoft.aksarc/aks-hci/metadata.json new file mode 100644 index 000000000000..88d706bc40f7 --- /dev/null +++ b/quickstarts/microsoft.aksarc/aks-hci/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 on HCI", + "githubUsername": "ReddyVanshika", + "docOwner": "ReddyVanshika", + "dateUpdated": "2024-11-05" + } \ No newline at end of file From 491e16e0a7f4e4a542f95f6091379dc37b43b5d3 Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Mon, 11 Nov 2024 05:30:44 -0500 Subject: [PATCH 08/19] one folder per commit --- .../{aks-vmware => aks-nodepool}/README.md | 0 .../aks-nodepool/azuredeploy.json | 53 +++++ .../azuredeploy.parameters.json | 20 +- .../metadata.json | 0 .../aks-vmware/azuredeploy.json | 203 ------------------ 5 files changed, 66 insertions(+), 210 deletions(-) rename quickstarts/microsoft.aksarc/{aks-vmware => aks-nodepool}/README.md (100%) create mode 100644 quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.json rename quickstarts/microsoft.aksarc/{aks-vmware => aks-nodepool}/azuredeploy.parameters.json (72%) rename quickstarts/microsoft.aksarc/{aks-vmware => aks-nodepool}/metadata.json (100%) delete mode 100644 quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.json diff --git a/quickstarts/microsoft.aksarc/aks-vmware/README.md b/quickstarts/microsoft.aksarc/aks-nodepool/README.md similarity index 100% rename from quickstarts/microsoft.aksarc/aks-vmware/README.md rename to quickstarts/microsoft.aksarc/aks-nodepool/README.md diff --git a/quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.json b/quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.json new file mode 100644 index 000000000000..413575aa6765 --- /dev/null +++ b/quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters" : { + "provisionedClusterName": { + "type": "string" + }, + "connectedClustersApiVersion": { + "type": "string" + }, + "provisionedClustersApiVersion": { + "type": "string" + }, + "agentName": { + "type": "string" + }, + "agentVMSize": { + "type": "string" + }, + "agentCount": { + "type": "int" + }, + "agentOsType": { + "type": "string" + }, + "location": { + "type": "string" + } + }, + "resources" : [ + { + "type": "Microsoft.Kubernetes/connectedClusters", + "apiVersion": "[parameters('connectedClustersApiVersion')]", + "name": "[parameters('provisionedClusterName')]", + "location": "[parameters('location')]", + "condition" : false + }, + { + "type": "microsoft.hybridcontainerservice/provisionedclusterinstances/agentpools", + "apiVersion": "[parameters('provisionedClustersApiVersion')]", + "name": "[concat('default/', parameters('agentName'))]", + "scope": "[resourceId('microsoft.Kubernetes/connectedClusters', parameters('provisionedClusterName'))]", + "dependsOn": [ + "[resourceId('microsoft.Kubernetes/connectedClusters', parameters('provisionedClusterName'))]" + ], + "properties": { + "count": "[parameters('agentCount')]", + "osType": "[parameters('agentOsType')]", + "vmSize": "[parameters('agentVMSize')]" + } + } + ] +} \ No newline at end of file diff --git a/quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.parameters.json b/quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.parameters.json similarity index 72% rename from quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.parameters.json rename to quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.parameters.json index ebb432c61c05..d6fd335c01f0 100644 --- a/quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.parameters.json +++ b/quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.parameters.json @@ -3,7 +3,7 @@ "contentVersion": "1.0.0.0", "parameters": { "provisionedClusterName": { - "value": "TODO: Add cluster name here." + "value": "TODO: AKS Arc Cluster Name" }, "location": { "value": "eastus" @@ -12,7 +12,7 @@ "value": {} }, "sshRSAPublicKey": { - "value": "TODO: Add your SSH RSA public key here." + "value": "TODO: SSH RSA Public Key" }, "enableAHUB": { "value": "NotApplicable" @@ -33,20 +33,26 @@ "value": 0 }, "kubernetesVersion": { - "value": "1.26.6" + "value": "1.29.4" }, + "provisionedClustersApiVersion":{ + "value": "2024-01-01" + }, + "connectedClustersApiVersion" : { + "value": "2024-07-15-preview" + }, "controlPlaneNodeCount": { "value": 1 }, "controlPlaneIp": { - "value": "100.65.180.140" + "value": "TODO: Control Plane IP" }, "controlPlaneVMSize": { - "value": "Standard_D4s_v3" + "value": "Standard_A4_v2" }, "vnetSubnetIds": { "value": [ - "TODO: Add your subnet ARM ID here." + "TODO: VNET Subnet ARM ID" ] }, "podCidr": { @@ -56,7 +62,7 @@ "value": "calico" }, "customLocation": { - "value": "TODO: Add your custom location ARM ID here." + "value": "TODO: Custom Location ARM ID" } } } \ No newline at end of file diff --git a/quickstarts/microsoft.aksarc/aks-vmware/metadata.json b/quickstarts/microsoft.aksarc/aks-nodepool/metadata.json similarity index 100% rename from quickstarts/microsoft.aksarc/aks-vmware/metadata.json rename to quickstarts/microsoft.aksarc/aks-nodepool/metadata.json diff --git a/quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.json b/quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.json deleted file mode 100644 index 174ac66c30a0..000000000000 --- a/quickstarts/microsoft.aksarc/aks-vmware/azuredeploy.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "$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" - // } - } - ] - } From b95e290574606c6734d708b976f43eb52561e86b Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Mon, 11 Nov 2024 12:00:31 -0500 Subject: [PATCH 09/19] allowing only one scenario --- .../microsoft.aksarc/aks-nodepool/README.md | 28 -------- .../aks-nodepool/azuredeploy.json | 53 --------------- .../aks-nodepool/azuredeploy.parameters.json | 68 ------------------- .../aks-nodepool/metadata.json | 10 --- 4 files changed, 159 deletions(-) delete mode 100644 quickstarts/microsoft.aksarc/aks-nodepool/README.md delete mode 100644 quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.json delete mode 100644 quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.parameters.json delete mode 100644 quickstarts/microsoft.aksarc/aks-nodepool/metadata.json diff --git a/quickstarts/microsoft.aksarc/aks-nodepool/README.md b/quickstarts/microsoft.aksarc/aks-nodepool/README.md deleted file mode 100644 index e01870eeed0f..000000000000 --- a/quickstarts/microsoft.aksarc/aks-nodepool/README.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -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](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) - -[![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 AKS ARC cluster. - -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-nodepool/azuredeploy.json b/quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.json deleted file mode 100644 index 413575aa6765..000000000000 --- a/quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters" : { - "provisionedClusterName": { - "type": "string" - }, - "connectedClustersApiVersion": { - "type": "string" - }, - "provisionedClustersApiVersion": { - "type": "string" - }, - "agentName": { - "type": "string" - }, - "agentVMSize": { - "type": "string" - }, - "agentCount": { - "type": "int" - }, - "agentOsType": { - "type": "string" - }, - "location": { - "type": "string" - } - }, - "resources" : [ - { - "type": "Microsoft.Kubernetes/connectedClusters", - "apiVersion": "[parameters('connectedClustersApiVersion')]", - "name": "[parameters('provisionedClusterName')]", - "location": "[parameters('location')]", - "condition" : false - }, - { - "type": "microsoft.hybridcontainerservice/provisionedclusterinstances/agentpools", - "apiVersion": "[parameters('provisionedClustersApiVersion')]", - "name": "[concat('default/', parameters('agentName'))]", - "scope": "[resourceId('microsoft.Kubernetes/connectedClusters', parameters('provisionedClusterName'))]", - "dependsOn": [ - "[resourceId('microsoft.Kubernetes/connectedClusters', parameters('provisionedClusterName'))]" - ], - "properties": { - "count": "[parameters('agentCount')]", - "osType": "[parameters('agentOsType')]", - "vmSize": "[parameters('agentVMSize')]" - } - } - ] -} \ No newline at end of file diff --git a/quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.parameters.json b/quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.parameters.json deleted file mode 100644 index d6fd335c01f0..000000000000 --- a/quickstarts/microsoft.aksarc/aks-nodepool/azuredeploy.parameters.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "provisionedClusterName": { - "value": "TODO: AKS Arc Cluster Name" - }, - "location": { - "value": "eastus" - }, - "resourceTags": { - "value": {} - }, - "sshRSAPublicKey": { - "value": "TODO: SSH RSA Public Key" - }, - "enableAHUB": { - "value": "NotApplicable" - }, - "agentName": { - "value": "nodepool" - }, - "agentVMSize": { - "value": "Standard_A4_v2" - }, - "agentCount": { - "value": 1 - }, - "agentOsType": { - "value": "Linux" - }, - "loadBalancerCount": { - "value": 0 - }, - "kubernetesVersion": { - "value": "1.29.4" - }, - "provisionedClustersApiVersion":{ - "value": "2024-01-01" - }, - "connectedClustersApiVersion" : { - "value": "2024-07-15-preview" - }, - "controlPlaneNodeCount": { - "value": 1 - }, - "controlPlaneIp": { - "value": "TODO: Control Plane IP" - }, - "controlPlaneVMSize": { - "value": "Standard_A4_v2" - }, - "vnetSubnetIds": { - "value": [ - "TODO: VNET Subnet ARM ID" - ] - }, - "podCidr": { - "value": "10.244.0.0/16" - }, - "networkPolicy": { - "value": "calico" - }, - "customLocation": { - "value": "TODO: Custom Location ARM ID" - } - } -} \ No newline at end of file diff --git a/quickstarts/microsoft.aksarc/aks-nodepool/metadata.json b/quickstarts/microsoft.aksarc/aks-nodepool/metadata.json deleted file mode 100644 index d648f90cf72b..000000000000 --- a/quickstarts/microsoft.aksarc/aks-nodepool/metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$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 c6491e61a552354f91d276abb0f250c6c3ae8499 Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Tue, 12 Nov 2024 12:50:47 -0500 Subject: [PATCH 10/19] fixed ReadMe.md --- quickstarts/microsoft.aksarc/aks-hci/README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/quickstarts/microsoft.aksarc/aks-hci/README.md b/quickstarts/microsoft.aksarc/aks-hci/README.md index e01870eeed0f..ae1255068ed3 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/README.md +++ b/quickstarts/microsoft.aksarc/aks-hci/README.md @@ -11,18 +11,21 @@ languages: --- # Create an AKS ARC Provision cluster using a template -![Azure Public Test Date]() -![Azure Public Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.analysisservices/analysis-services-create/PublicDeployment.svg) +![Azure Public Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/PublicLastTestDate.svg) +![Azure Public Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/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) +![Azure US Gov Last Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/FairfaxLastTestDate.svg) +![Azure US Gov Last Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/FairfaxDeployment.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) +![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci//BestPracticeResult.svg) +![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci//CredScanResult.svg) -[![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) +[![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.aksarc%2Faks-hci%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.aksarc%2Faks-hci%2Fazuredeploy.json) This template allows you to deploy a new AKS ARC cluster. 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` +`Tags: Microsoft.aksarc/aks-hci` From 6fec851fbe37b7b2eea2d91915f992c849b614c3 Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Tue, 12 Nov 2024 13:25:07 -0500 Subject: [PATCH 11/19] fixed ReadMe.md --- quickstarts/microsoft.aksarc/aks-hci/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickstarts/microsoft.aksarc/aks-hci/README.md b/quickstarts/microsoft.aksarc/aks-hci/README.md index ae1255068ed3..5005b7fea3d4 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/README.md +++ b/quickstarts/microsoft.aksarc/aks-hci/README.md @@ -17,8 +17,8 @@ languages: ![Azure US Gov Last Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/FairfaxLastTestDate.svg) ![Azure US Gov Last Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/FairfaxDeployment.svg) -![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci//BestPracticeResult.svg) -![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci//CredScanResult.svg) +![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/BestPracticeResult.svg) +![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/CredScanResult.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.aksarc%2Faks-hci%2Fazuredeploy.json) From 3c64b29efe6d7a91317f53b28199b56480991204 Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Tue, 12 Nov 2024 13:47:53 -0500 Subject: [PATCH 12/19] fixed ReadMe.md --- quickstarts/microsoft.aksarc/aks-hci/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstarts/microsoft.aksarc/aks-hci/README.md b/quickstarts/microsoft.aksarc/aks-hci/README.md index 5005b7fea3d4..7f6fb0c0c97d 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/README.md +++ b/quickstarts/microsoft.aksarc/aks-hci/README.md @@ -21,7 +21,7 @@ languages: ![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/CredScanResult.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.aksarc%2Faks-hci%2Fazuredeploy.json) - +[![Deploy To Azure US Gov](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazuregov.svg?sanitize=true)](https://portal.azure.us/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.aksarc%2Faks-hci%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.aksarc%2Faks-hci%2Fazuredeploy.json) This template allows you to deploy a new AKS ARC cluster. From 39ccbcfd37b79202870cfd4dab9c7dbcfe2462c8 Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Wed, 13 Nov 2024 13:25:04 -0500 Subject: [PATCH 13/19] modified ReadMe --- quickstarts/microsoft.aksarc/aks-hci/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quickstarts/microsoft.aksarc/aks-hci/README.md b/quickstarts/microsoft.aksarc/aks-hci/README.md index 7f6fb0c0c97d..516907e9df1a 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/README.md +++ b/quickstarts/microsoft.aksarc/aks-hci/README.md @@ -20,6 +20,8 @@ languages: ![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/BestPracticeResult.svg) ![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/CredScanResult.svg) +![Bicep Version](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.aksarc/aks-hci/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.aksarc%2Faks-hci%2Fazuredeploy.json) [![Deploy To Azure US Gov](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazuregov.svg?sanitize=true)](https://portal.azure.us/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.aksarc%2Faks-hci%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.aksarc%2Faks-hci%2Fazuredeploy.json) From 184348e1cb0cfb6fb73da3faec4393b02f20c81a Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Wed, 13 Nov 2024 17:11:53 -0500 Subject: [PATCH 14/19] fixinf Best practice --- .../microsoft.aksarc/aks-hci/azuredeploy.json | 45 ++++--------------- .../aks-hci/azuredeploy.parameters.json | 3 -- 2 files changed, 8 insertions(+), 40 deletions(-) diff --git a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json index b5e5a8c2487a..4e28b9e9d4ff 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json @@ -4,31 +4,19 @@ "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": {} + "type": "object" }, - "connectedClustersApiVersion": { - "type": "String", - "defaultValue": "" - }, - "provisionedClustersApiVersion": { - "type": "String", - "defaultValue": "" - }, - "sshRSAPublicKey": { "type": "string", "metadata": { @@ -37,28 +25,24 @@ }, "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": { @@ -67,14 +51,12 @@ }, "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." } @@ -87,7 +69,6 @@ }, "controlPlaneNodeCount": { "type": "int", - "defaultValue": 1, "minValue": 1, "maxValue": 5, "metadata": { @@ -96,14 +77,12 @@ }, "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." } @@ -116,14 +95,12 @@ }, "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." } @@ -137,7 +114,7 @@ }, "resources": [ { - "apiVersion": "[parameters('connectedClustersApiVersion')]", + "apiVersion": "2024-01-01", "type": "Microsoft.Kubernetes/ConnectedClusters", "kind": "ProvisionedCluster", "location": "[parameters('location')]", @@ -145,16 +122,10 @@ "tags": "[parameters('resourceTags')]", "identity": { "type": "SystemAssigned" - }, - "properties": { - "agentPublicKeyCertificate":"" , - "aadProfile": { - "enableAzureRBAC": false - } } }, { - "apiVersion": "[parameters('provisionedClustersApiVersion')]", + "apiVersion": "2024-01-01", "type": "microsoft.hybridcontainerservice/provisionedclusterinstances", "name": "default", "scope": "[concat('Microsoft.Kubernetes/ConnectedClusters', '/', parameters('provisionedClusterName'))]", @@ -209,12 +180,12 @@ "smbCsiDriver": { "enabled": false } + }, + "extendedLocation": { + "name": "[parameters('customLocation')]", + "type": "CustomLocation" } - } - // "extendedLocation": { - // "name": "[parameters('customLocation')]", - // "type": "CustomLocation" - // } + } } ] } \ No newline at end of file diff --git a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json index 7c9b53539e60..29b2b74c0bb7 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json @@ -35,9 +35,6 @@ "kubernetesVersion": { "value": "1.26.6" }, - "apiversion":{ - "value": "2024-01-01" - }, "controlPlaneNodeCount": { "value": 1 }, From a83f63b44e90a297fc010237e0d0265e308a794f Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Tue, 19 Nov 2024 15:15:27 -0500 Subject: [PATCH 15/19] changed variables --- .../aks-hci/azuredeploy.parameters.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json index 29b2b74c0bb7..fb13e4047576 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json @@ -3,7 +3,7 @@ "contentVersion": "1.0.0.0", "parameters": { "provisionedClusterName": { - "value": "TODO: Fill in parameter value" + "value": "GEN-UNIQUE" }, "location": { "value": "eastus" @@ -12,13 +12,13 @@ "value": {} }, "sshRSAPublicKey": { - "value": "TODO: Fill in parameter value" + "value": "ssh-rsa AAAAB3...==" }, "enableAHUB": { "value": "NotApplicable" }, "agentName": { - "value": "nodepool" + "value": "GEN-UNIQUE" }, "agentVMSize": { "value": "Standard_A4_v2" @@ -39,14 +39,14 @@ "value": 1 }, "controlPlaneIp": { - "value": "TODO: Fill in parameter value" + "value": "x.x.x.x" }, "controlPlaneVMSize": { "value": "Standard_A4_v2" }, "vnetSubnetIds": { "value": [ - "TODO: Fill in parameter value" + "GEN_UNIQUE" ] }, "podCidr": { @@ -56,7 +56,7 @@ "value": "calico" }, "customLocation": { - "value": "TODO: Fill in parameter value" + "value": "GEN_UNIQUE" } } } \ No newline at end of file From 3abcb72fd92af3b0031fa629c5fb2781f7d6964c Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Mon, 9 Dec 2024 12:01:35 -0500 Subject: [PATCH 16/19] changed akshci with WIF --- .../microsoft.aksarc/aks-hci/azuredeploy.json | 321 ++++++++---------- .../aks-hci/azuredeploy.parameters.json | 104 +++--- 2 files changed, 197 insertions(+), 228 deletions(-) diff --git a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json index 4e28b9e9d4ff..7dcbf486cf35 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json @@ -1,177 +1,157 @@ { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "provisionedClusterName": { - "type": "string", - "metadata": { - "description": "The name of the AKS Arc Cluster resource." - } + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "aksClusterName": { + "type": "string" + }, + "aksAdminGroupObjectId": { + "type": "string", + "defaultValue": "" + }, + "aksControlPlaneIP": { + "type": "string" + }, + "aksControlPlaneNodeCount": { + "type": "int", + "defaultValue": 1, + "maxValue": 5 + }, + "aksControlPlaneNodeSize": { + "type": "string", + "defaultValue": "Standard_A4_v2" + }, + "aksPodCidr": { + "type": "string", + "defaultValue": "10.244.0.0/16" + }, + "aksKubernetesVersion": { + "type": "string", + "defaultValue": "v1.26.6" + }, + "aksNodePoolName": { + "type": "string" + }, + "aksNodePoolNodeCount": { + "type": "int", + "defaultValue": 1 + }, + "aksNodePoolNodeSize": { + "type": "string", + "defaultValue": "Standard_A4_v2" + }, + "aksNodePoolOSType": { + "type": "string", + "defaultValue": "Linux", + "allowedValues": ["Linux", "Windows"] + }, + "sshPublicKey": { + "type": "string" + }, + "hciLogicalNetworkName": { + "type": "string" + }, + "hciCustomLocationName": { + "type": "string" + } + }, + "variables": { + "customLocationId": "[resourceId('Microsoft.ExtendedLocation/customLocations', parameters('hciCustomLocationName'))]" + }, + "resources": [ + { + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "apiVersion": "2018-11-30", + "name": "aksManagedIdentity", + "location": "[parameters('location')]", + "properties": {} + }, + + { + "type": "Microsoft.Kubernetes/connectedClusters", + "apiVersion": "2024-01-01", + "name": "[parameters('aksClusterName')]", + "location": "[parameters('location')]", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', 'aksManagedIdentity')]": {} + } }, - "location": { - "type": "string", - "metadata": { - "description": "The location of the AKS Arc Cluster resource." - } + "kind": "ProvisionedCluster", + "properties": { + "agentPublicKeyCertificate": "", + "aadProfile": { + "enableAzureRBAC": false, + "adminGroupObjectIDs": ["[parameters('aksAdminGroupObjectId')]"] + } + } + }, + { + "type": "Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials", + "apiVersion": "2021-09-30-preview", + "name": "aksManagedIdentity/aksFederatedCredential", + "dependsOn": [ + "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', 'aksManagedIdentity')]", + "[resourceId('Microsoft.Kubernetes/connectedClusters', parameters('aksClusterName'))]" + ], + "properties": { + "issuer": "https://issuer.example.com", + "subject": "subject-identifier", + "audiences": ["api://AzureADTokenExchange"] + } + }, + { + "type": "Microsoft.HybridContainerService/provisionedClusterInstances", + "apiVersion": "2024-01-01", + "scope": "[format('Microsoft.Kubernetes/connectedClusters/{0}', parameters('aksClusterName'))]", + "name": "default", + "extendedLocation": { + "type": "CustomLocation", + "name": "[variables('customLocationId')]" }, - "resourceTags": { - "type": "object" - }, - "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 '" + "properties": { + "linuxProfile": { + "ssh": { + "publicKeys": [ + { + "keyData": "[parameters('sshPublicKey')]" + } + ] } - }, - "enableAHUB": { - "type": "string", - "metadata": { - "description": "Azure Hybrid Benefit for Windows Server licenses. NotApplicable, True, False." - } }, - "agentName": { - "type": "string", - "metadata": { - "description": "The name of the node pool." - } + "controlPlane": { + "count": "[parameters('aksControlPlaneNodeCount')]", + "controlPlaneEndpoint": { + "hostIP": "[parameters('aksControlPlaneIP')]" }, - "agentVMSize": { - "type": "string", - "metadata": { - "description": "The VM size for node pools." - } + "vmSize": "[parameters('aksControlPlaneNodeSize')]" }, - "agentCount": { - "type": "int", - "minValue": 1, - "maxValue": 50, - "metadata": { - "description": "The number of nodes for the cluster." - } - }, - "agentOsType": { - "type": "string", - "metadata": { - "description": "The OS Type for the agent pool. Values are Linux and Windows." - } + "kubernetesVersion": "[parameters('aksKubernetesVersion')]", + "networkProfile": { + "loadBalancerProfile": { + "count": 0 }, - "loadBalancerCount": { - "type": "int", - "metadata": { - "description": "The number of load balancers." - } + "networkPolicy": "calico", + "podCidr": "[parameters('aksPodCidr')]" }, - "kubernetesVersion": { - "type": "string", - "metadata": { - "description": "The version of Kubernetes." - } - }, - "controlPlaneNodeCount": { - "type": "int", - "minValue": 1, - "maxValue": 5, - "metadata": { - "description": "The number of control plane nodes for the cluster." - } - }, - "controlPlaneIp": { - "type": "string", - "metadata": { - "description": "Control plane IP address." - } - }, - "controlPlaneVMSize": { - "type": "string", - "metadata": { - "description": "The VM size for control plane." - } - }, - "vnetSubnetIds": { - "type": "array", - "metadata": { - "description": "List of subnet Ids for the AKS cluster." - } - }, - "podCidr": { - "type": "string", - "metadata": { - "description": "The VM size for control plane." - } - }, - "networkPolicy": { - "type": "string", - "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." - } + "agentPoolProfiles": [ + { + "name": "[parameters('aksNodePoolName')]", + "count": "[parameters('aksNodePoolNodeCount')]", + "vmSize": "[parameters('aksNodePoolNodeSize')]", + "osType": "[parameters('aksNodePoolOSType')]" } - }, - "resources": [ - { - "apiVersion": "2024-01-01", - "type": "Microsoft.Kubernetes/ConnectedClusters", - "kind": "ProvisionedCluster", - "location": "[parameters('location')]", - "name": "[parameters('provisionedClusterName')]", - "tags": "[parameters('resourceTags')]", - "identity": { - "type": "SystemAssigned" + ], + "cloudProviderProfile": { + "infraNetworkProfile": { + "vnetSubnetIds": [ + "[resourceId('Microsoft.AzureStackHCI/logicalNetworks', parameters('hciLogicalNetworkName'))]" + ] } - }, - { - "apiVersion": "2024-01-01", - "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": { @@ -180,12 +160,11 @@ "smbCsiDriver": { "enabled": false } - }, - "extendedLocation": { - "name": "[parameters('customLocation')]", - "type": "CustomLocation" } - } - } - ] - } \ No newline at end of file + }, + "dependsOn": [ + "[resourceId('Microsoft.Kubernetes/connectedClusters', parameters('aksClusterName'))]" + ] + } + ] +} \ No newline at end of file diff --git a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json index fb13e4047576..8b68347f62e3 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json @@ -2,61 +2,51 @@ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", "parameters": { - "provisionedClusterName": { - "value": "GEN-UNIQUE" - }, - "location": { - "value": "eastus" - }, - "resourceTags": { - "value": {} - }, - "sshRSAPublicKey": { - "value": "ssh-rsa AAAAB3...==" - }, - "enableAHUB": { - "value": "NotApplicable" - }, - "agentName": { - "value": "GEN-UNIQUE" - }, - "agentVMSize": { - "value": "Standard_A4_v2" - }, - "agentCount": { - "value": 1 - }, - "agentOsType": { - "value": "Linux" - }, - "loadBalancerCount": { - "value": 0 - }, - "kubernetesVersion": { - "value": "1.26.6" - }, - "controlPlaneNodeCount": { - "value": 1 - }, - "controlPlaneIp": { - "value": "x.x.x.x" - }, - "controlPlaneVMSize": { - "value": "Standard_A4_v2" - }, - "vnetSubnetIds": { - "value": [ - "GEN_UNIQUE" - ] - }, - "podCidr": { - "value": "10.244.0.0/16" - }, - "networkPolicy": { - "value": "calico" - }, - "customLocation": { - "value": "GEN_UNIQUE" - } + "location": { + "value": "eastus" + }, + "aksClusterName": { + "value": "GEN-UNIQUE" + }, + "aksAdminGroupObjectId": { + "value": "00000000-0000-0000-0000-000000000000" + }, + "aksControlPlaneIP": { + "value": "x.x.x.x" + }, + "aksControlPlaneNodeCount": { + "value": 1 + }, + "aksControlPlaneNodeSize": { + "value": "Standard_A4_v2" + }, + "aksPodCidr": { + "value": "10.244.0.0/16" + }, + "aksKubernetesVersion": { + "value": "v1.26.6" + }, + "aksNodePoolName": { + "value": "GEN-UNIQUE" + }, + "aksNodePoolNodeCount": { + "value": 1 + }, + "aksNodePoolNodeSize": { + "value": "Standard_A4_v2" + }, + "aksNodePoolOSType": { + "value": "Linux" + }, + "sshPublicKey": { + "value": "ssh-rsa AAAAB3...==" + }, + "hciLogicalNetworkName": { + "value": "GEN-UNIQUE" + }, + "hciCustomLocationName": { + "value": "GEN_UNIQUE" + } } -} \ No newline at end of file + } + \ No newline at end of file From 7bb912d7dd6ee7d11ccdbf525a7d0d5a52a10013 Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Mon, 9 Dec 2024 13:24:09 -0500 Subject: [PATCH 17/19] using system assigned --- .../microsoft.aksarc/aks-hci/azuredeploy.json | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json index 7dcbf486cf35..73f7a8667a83 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json @@ -62,24 +62,20 @@ "customLocationId": "[resourceId('Microsoft.ExtendedLocation/customLocations', parameters('hciCustomLocationName'))]" }, "resources": [ - { - "type": "Microsoft.ManagedIdentity/userAssignedIdentities", - "apiVersion": "2018-11-30", - "name": "aksManagedIdentity", - "location": "[parameters('location')]", - "properties": {} - }, - + // { + // "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + // "apiVersion": "2018-11-30", + // "name": "aksManagedIdentity", + // "location": "[parameters('location')]", + // "properties": {} + // }, { "type": "Microsoft.Kubernetes/connectedClusters", "apiVersion": "2024-01-01", "name": "[parameters('aksClusterName')]", "location": "[parameters('location')]", "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', 'aksManagedIdentity')]": {} - } + "type": "systemAssigned" }, "kind": "ProvisionedCluster", "properties": { @@ -93,9 +89,8 @@ { "type": "Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials", "apiVersion": "2021-09-30-preview", - "name": "aksManagedIdentity/aksFederatedCredential", + "name": "aksFederatedCredential", "dependsOn": [ - "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', 'aksManagedIdentity')]", "[resourceId('Microsoft.Kubernetes/connectedClusters', parameters('aksClusterName'))]" ], "properties": { From c0ee211a6b3ffd204f08888ca61ecc5bc4ab047f Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Tue, 10 Dec 2024 13:27:20 -0500 Subject: [PATCH 18/19] modified to include WIF --- .../microsoft.aksarc/aks-hci/azuredeploy.json | 41 ++++---- .../aks-hci/azuredeploy.parameters.json | 97 +++++++++---------- 2 files changed, 68 insertions(+), 70 deletions(-) diff --git a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json index 73f7a8667a83..fb3d7488ac92 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json @@ -18,6 +18,7 @@ "aksControlPlaneNodeCount": { "type": "int", "defaultValue": 1, + "minValue": 1, "maxValue": 5 }, "aksControlPlaneNodeSize": { @@ -62,20 +63,20 @@ "customLocationId": "[resourceId('Microsoft.ExtendedLocation/customLocations', parameters('hciCustomLocationName'))]" }, "resources": [ - // { - // "type": "Microsoft.ManagedIdentity/userAssignedIdentities", - // "apiVersion": "2018-11-30", - // "name": "aksManagedIdentity", - // "location": "[parameters('location')]", - // "properties": {} - // }, + { + "type": "Microsoft.ManagedIdentity/userAssignedIdentities", + "apiVersion": "2018-11-30", + "name": "aksManagedIdentity", + "location": "[parameters('location')]", + "properties": {} + }, { "type": "Microsoft.Kubernetes/connectedClusters", "apiVersion": "2024-01-01", "name": "[parameters('aksClusterName')]", "location": "[parameters('location')]", "identity": { - "type": "systemAssigned" + "type": "SystemAssigned" }, "kind": "ProvisionedCluster", "properties": { @@ -83,22 +84,20 @@ "aadProfile": { "enableAzureRBAC": false, "adminGroupObjectIDs": ["[parameters('aksAdminGroupObjectId')]"] + }, + "addonProfiles": { + "azureKeyvaultSecretsProvider": { + "enabled": true, + "config": { + "usePodIdentity": "true", + "userAssignedIdentityID": [ + "[parameters('aksAdminGroupObjectId')]" + ] + } + } } } }, - { - "type": "Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials", - "apiVersion": "2021-09-30-preview", - "name": "aksFederatedCredential", - "dependsOn": [ - "[resourceId('Microsoft.Kubernetes/connectedClusters', parameters('aksClusterName'))]" - ], - "properties": { - "issuer": "https://issuer.example.com", - "subject": "subject-identifier", - "audiences": ["api://AzureADTokenExchange"] - } - }, { "type": "Microsoft.HybridContainerService/provisionedClusterInstances", "apiVersion": "2024-01-01", diff --git a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json index 8b68347f62e3..eee12c677773 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.parameters.json @@ -1,52 +1,51 @@ { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "location": { - "value": "eastus" - }, - "aksClusterName": { - "value": "GEN-UNIQUE" - }, - "aksAdminGroupObjectId": { - "value": "00000000-0000-0000-0000-000000000000" - }, - "aksControlPlaneIP": { - "value": "x.x.x.x" - }, - "aksControlPlaneNodeCount": { - "value": 1 - }, - "aksControlPlaneNodeSize": { - "value": "Standard_A4_v2" - }, - "aksPodCidr": { - "value": "10.244.0.0/16" - }, - "aksKubernetesVersion": { - "value": "v1.26.6" - }, - "aksNodePoolName": { - "value": "GEN-UNIQUE" - }, - "aksNodePoolNodeCount": { - "value": 1 - }, - "aksNodePoolNodeSize": { - "value": "Standard_A4_v2" - }, - "aksNodePoolOSType": { - "value": "Linux" - }, - "sshPublicKey": { - "value": "ssh-rsa AAAAB3...==" - }, - "hciLogicalNetworkName": { - "value": "GEN-UNIQUE" - }, - "hciCustomLocationName": { - "value": "GEN_UNIQUE" - } + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "value": "eastus" + }, + "aksClusterName": { + "value": "GEN-UNIQUE" + }, + "aksAdminGroupObjectId": { + "value": "00000000-0000-0000-0000-000000000000" + }, + "aksControlPlaneIP": { + "value": "x.x.x.x" + }, + "aksControlPlaneNodeCount": { + "value": 1 + }, + "aksControlPlaneNodeSize": { + "value": "Standard_A4_v2" + }, + "aksPodCidr": { + "value": "10.244.0.0/16" + }, + "aksKubernetesVersion": { + "value": "v1.26.6" + }, + "aksNodePoolName": { + "value": "GEN-UNIQUE" + }, + "aksNodePoolNodeCount": { + "value": 1 + }, + "aksNodePoolNodeSize": { + "value": "Standard_A4_v2" + }, + "aksNodePoolOSType": { + "value": "Linux" + }, + "sshPublicKey": { + "value": "ssh-rsa AAAAB3...==" + }, + "hciLogicalNetworkName": { + "value": "GEN-UNIQUE" + }, + "hciCustomLocationName": { + "value": "GEN_UNIQUE" } } - \ No newline at end of file +} \ No newline at end of file From f86e074cc1a2839d01c389eca9fd7ef2a3c34306 Mon Sep 17 00:00:00 2001 From: ReddyVanshika Date: Tue, 10 Dec 2024 14:15:38 -0500 Subject: [PATCH 19/19] enabled Workload Identity --- .../microsoft.aksarc/aks-hci/azuredeploy.json | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json index fb3d7488ac92..644224ab13a0 100644 --- a/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json +++ b/quickstarts/microsoft.aksarc/aks-hci/azuredeploy.json @@ -85,15 +85,9 @@ "enableAzureRBAC": false, "adminGroupObjectIDs": ["[parameters('aksAdminGroupObjectId')]"] }, - "addonProfiles": { - "azureKeyvaultSecretsProvider": { - "enabled": true, - "config": { - "usePodIdentity": "true", - "userAssignedIdentityID": [ - "[parameters('aksAdminGroupObjectId')]" - ] - } + "securityProfile": { + "workloadIdentity": { + "enabled": true } } }