Skip to content

Commit afa0127

Browse files
author
Melony QIN
committed
initiating
1 parent dfc4525 commit afa0127

3 files changed

Lines changed: 283 additions & 0 deletions

File tree

samples/features/sql-big-data-cluster/platform-ops/Readme.md

Whitespace-only changes.
Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"resourceName": {
6+
"type": "string",
7+
"metadata": {
8+
"description": "The name of the Managed Cluster resource."
9+
}
10+
},
11+
"location": {
12+
"type": "string",
13+
"defaultValue": "[resourceGroup().location]",
14+
"metadata": {
15+
"description": "The Azure location of the AKS resource."
16+
}
17+
},
18+
"dnsPrefix": {
19+
"type": "string",
20+
"metadata": {
21+
"description": "Optional DNS prefix to use with hosted Kubernetes API server FQDN."
22+
}
23+
},
24+
"osDiskSizeGB": {
25+
"defaultValue": 0,
26+
"minValue": 0,
27+
"maxValue": 1023,
28+
"type": "int",
29+
"metadata": {
30+
"description": "Disk size (in GB) to provision for each of the agent pool nodes. This value ranges from 0 to 1023. Specifying 0 will apply the default disk size for that agentVMSize."
31+
}
32+
},
33+
"agentCount": {
34+
"defaultValue": 3,
35+
"minValue": 1,
36+
"maxValue": 50,
37+
"type": "int",
38+
"metadata": {
39+
"description": "The number of agent nodes for the cluster. Production workloads have a recommended minimum of 3."
40+
}
41+
},
42+
"agentVMSize": {
43+
"defaultValue": "Standard_D2_v3",
44+
"type": "string",
45+
"metadata": {
46+
"description": "The size of the Virtual Machine."
47+
}
48+
},
49+
"existingServicePrincipalObjectId": {
50+
"type": "string",
51+
"metadata": {
52+
"description": "Oject ID against which the Network Contributor roles will be assigned on the subnet"
53+
}
54+
},
55+
"existingServicePrincipalClientId": {
56+
"type": "string",
57+
"metadata": {
58+
"description": "Client ID (used by cloudprovider)"
59+
}
60+
},
61+
"existingServicePrincipalClientSecret": {
62+
"type": "securestring",
63+
"metadata": {
64+
"description": "The Service Principal Client Secret."
65+
}
66+
},
67+
"osType": {
68+
"defaultValue": "Linux",
69+
"allowedValues": [
70+
"Linux"
71+
],
72+
"type": "string",
73+
"metadata": {
74+
"description": "The type of operating system."
75+
}
76+
},
77+
"kubernetesVersion": {
78+
"defaultValue": "1.17.9",
79+
"type": "string",
80+
"metadata": {
81+
"description": "The version of Kubernetes."
82+
}
83+
},
84+
"enableHttpApplicationRouting": {
85+
"defaultValue": false,
86+
"type": "bool",
87+
"metadata": {
88+
"description": "boolean flag to turn on and off of http application routing"
89+
}
90+
},
91+
"networkPlugin": {
92+
"allowedValues": [
93+
"azure",
94+
"kubenet"
95+
],
96+
"defaultValue": "azure",
97+
"type": "string",
98+
"metadata": {
99+
"description": "Network plugin used for building Kubernetes network."
100+
}
101+
},
102+
"maxPods": {
103+
"defaultValue": 30,
104+
"type": "int",
105+
"metadata": {
106+
"description": "Maximum number of pods that can run on a node."
107+
}
108+
},
109+
"enableRBAC": {
110+
"defaultValue": true,
111+
"type": "bool",
112+
"metadata": {
113+
"description": "boolean flag to turn on and off of RBAC"
114+
}
115+
},
116+
"builtInRoleType": {
117+
"type": "string",
118+
"allowedValues": [
119+
"Owner",
120+
"Contributor",
121+
"Reader"
122+
],
123+
"metadata": {
124+
"description": "Built-in role to assign"
125+
}
126+
},
127+
"existingVirtualNetworkName": {
128+
"type": "string",
129+
"metadata": {
130+
"description": "Name of an existing VNET that will contain this AKS deployment."
131+
}
132+
},
133+
"existingVirtualNetworkResourceGroup": {
134+
"type": "string",
135+
"metadata": {
136+
"description": "Name of the existing VNET resource group"
137+
}
138+
},
139+
"existingSubnetName": {
140+
"type": "string",
141+
"metadata": {
142+
"description": "Subnet name that will contain the App Service Environment"
143+
}
144+
},
145+
"serviceCidr": {
146+
"type": "string",
147+
"defaultValue": "10.0.0.0/16",
148+
"metadata": {
149+
"description": "A CIDR notation IP range from which to assign service cluster IPs."
150+
}
151+
},
152+
"dnsServiceIP": {
153+
"type": "string",
154+
"defaultValue": "10.0.0.10",
155+
"metadata": {
156+
"description": "Containers DNS server IP address."
157+
}
158+
},
159+
"dockerBridgeCidr": {
160+
"type": "string",
161+
"defaultValue": "172.17.0.1/16",
162+
"metadata": {
163+
"description": "A CIDR notation IP for Docker bridge."
164+
}
165+
}
166+
},
167+
"variables": {
168+
"builtInRole":{
169+
"Owner":"[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
170+
"Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
171+
"Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]"
172+
},
173+
"vnetSubnetId": "[resourceId(parameters('existingVirtualNetworkResourceGroup'),'Microsoft.Network/virtualNetworks/subnets',parameters('existingVirtualNetworkName'),parameters('existingSubnetName'))]"
174+
},
175+
"resources": [
176+
{
177+
"type": "Microsoft.Resources/deployments",
178+
"name": "ClusterSubnetRoleAssignmentDeployment",
179+
"apiVersion": "2019-10-01",
180+
"resourceGroup": "[parameters('existingVirtualNetworkResourceGroup')]",
181+
"properties": {
182+
"mode": "Incremental",
183+
"template": {
184+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
185+
"contentVersion": "1.0.0.0",
186+
"resources": [
187+
{
188+
"type": "Microsoft.Network/virtualNetworks/subnets/providers/roleAssignments",
189+
"apiVersion": "2020-04-01-preview",
190+
"name": "[concat(parameters('existingVirtualNetworkName'), '/', parameters('existingSubnetName'), '/Microsoft.Authorization/', guid(resourceGroup().id, deployment().name))]",
191+
"properties": {
192+
"roleDefinitionId": "[variables('builtInRole')[parameters('builtInRoleType')]]",
193+
"principalId": "[parameters('existingServicePrincipalObjectId')]",
194+
"scope": "[variables('vnetSubnetId')]"
195+
}
196+
}
197+
]
198+
}
199+
}
200+
},
201+
{
202+
"type": "Microsoft.ContainerService/managedClusters",
203+
"name": "[parameters('resourceName')]",
204+
"apiVersion": "2020-07-01",
205+
"location": "[parameters('location')]",
206+
"dependsOn": [
207+
"ClusterSubnetRoleAssignmentDeployment"
208+
],
209+
"properties": {
210+
"kubernetesVersion": "[parameters('kubernetesVersion')]",
211+
"enableRBAC": "[parameters('enableRBAC')]",
212+
"dnsPrefix": "[parameters('dnsPrefix')]",
213+
"addonProfiles": {
214+
"httpApplicationRouting": {
215+
"enabled": "[parameters('enableHttpApplicationRouting')]"
216+
}
217+
},
218+
"agentPoolProfiles": [
219+
{
220+
"name": "agentpool",
221+
"osDiskSizeGB": "[parameters('osDiskSizeGB')]",
222+
"count": "[parameters('agentCount')]",
223+
"vmSize": "[parameters('agentVMSize')]",
224+
"osType": "[parameters('osType')]",
225+
"storageProfile": "ManagedDisks",
226+
"vnetSubnetID": "[variables('vnetSubnetID')]",
227+
"maxPods": "[parameters('maxPods')]",
228+
"mode" : "System"
229+
}
230+
],
231+
"servicePrincipalProfile": {
232+
"clientId": "[parameters('existingServicePrincipalClientId')]",
233+
"secret": "[parameters('existingServicePrincipalClientSecret')]"
234+
},
235+
"networkProfile": {
236+
"networkPlugin": "[parameters('networkPlugin')]",
237+
"serviceCidr": "[parameters('serviceCidr')]",
238+
"dnsServiceIP": "[parameters('dnsServiceIP')]",
239+
"dockerBridgeCidr": "[parameters('dockerBridgeCidr')]"
240+
}
241+
}
242+
}
243+
],
244+
"outputs": {
245+
"controlPlaneFQDN": {
246+
"type": "string",
247+
"value": "[reference(resourceId('Microsoft.ContainerService/managedClusters', parameters('resourceName'))).fqdn]"
248+
}
249+
}
250+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"resourceName": {
6+
"value": "GEN-UNIQUE"
7+
},
8+
"dnsPrefix": {
9+
"value": "GEN-UNIQUE"
10+
},
11+
"builtInRoleType":{
12+
"value": "Contributor"
13+
},
14+
"existingServicePrincipalObjectId": {
15+
"value": "GEN-AZUREAD-AKS-OBJID"
16+
},
17+
"existingServicePrincipalClientId": {
18+
"value": "GEN-AZUREAD-AKS-APPID"
19+
},
20+
"existingServicePrincipalClientSecret": {
21+
"value": "GEN-AZUREAD-AKS-APPID-SECRET"
22+
},
23+
"existingVirtualNetworkName": {
24+
"value": "GET-PREREQ-vnetName"
25+
},
26+
"existingVirtualNetworkResourceGroup": {
27+
"value": "GET-PREREQ-vnetResourceGroupName"
28+
},
29+
"existingSubnetName": {
30+
"value": "GET-PREREQ-subnetName"
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)