forked from microsoft/azure_arc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazuredeploy.json
219 lines (219 loc) · 6.46 KB
/
azuredeploy.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"windowsAdminUsername": {
"type": "string",
"metadata": {
"description": "Username for Windows account"
}
},
"windowsAdminPassword": {
"type": "securestring",
"minLength": 12,
"maxLength": 123,
"metadata": {
"description": "Password for Windows account. Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character. The value must be between 12 and 123 characters long."
}
},
"myIpAddress": {
"type": "string",
"metadata": {
"description": "IP address allowed SSH and RDP access to Azure resources. Usually this is your home or office public IP address."
}
},
"sshRSAPublicKey": {
"type": "securestring",
"metadata": {
"description": "RSA public key used for securing SSH access to Azure resources."
}
},
"spnClientId": {
"type": "string",
"metadata": {
"description": "Azure service principal client id"
}
},
"spnClientSecret": {
"type": "securestring",
"metadata": {
"description": "Azure service principal client secret"
}
},
"spnTenantId": {
"type": "string",
"metadata": {
"description": "Azure AD tenant id for your service principal"
}
},
"logAnalyticsWorkspaceName": {
"type": "string",
"metadata": {
"description": "Name for your log analytics workspace"
}
},
"kubernetesVersion": {
"defaultValue": "1.28.5",
"type": "string",
"metadata": {
"description": "The version of Kubernetes."
}
},
"clusterName": {
"type": "string",
"defaultValue": "Arc-ML",
"metadata": {
"description": "The name of the Kubernetes cluster resource."
}
},
"dnsPrefix": {
"type": "string",
"metadata": {
"description": "Optional DNS prefix to use with hosted Kubernetes API server FQDN."
}
},
"templateBaseUrl": {
"type": "string",
"metadata": {
"description": "Base URL for ARM template"
}
}
},
"variables": {
"clientVmTemplateUrl": "[uri(parameters('templateBaseUrl'), 'clientVm.json')]",
"aksTemplateUrl": "[uri(parameters('templateBaseUrl'), 'aks.json')]",
"logAnalyticsUrl": "[uri(parameters('templateBaseUrl'), 'logAnalytics.json')]",
"VNETUrl": "[uri(parameters('templateBaseUrl'), 'VNET.json')]",
// Virtual Network configuration
"virtualNetworkName": "Arc-ML-VNet",
"subnetName": "Arc-ML-Subnet",
"addressPrefix": "172.16.0.0/16",
"subnetAddressPrefix": "172.16.1.0/24"
},
"resources": [
{
"type": "Microsoft.Resources/deployments",
"comments": "Deploys a VNET and Subnet for Client VM",
"apiVersion": "2019-10-01",
"name": "VNETDeployment",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('VNETUrl')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"virtualNetworkName": {
"value": "[variables('virtualNetworkName')]"
},
"subnetName": {
"value": "[variables('subnetName')]"
},
"addressPrefix": {
"value": "[variables('addressPrefix')]"
},
"subnetAddressPrefix": {
"value": "[variables('subnetAddressPrefix')]"
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"comments": "Deploys an AKS Cluster",
"apiVersion": "2019-10-01",
"name": "aksDeployment",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('aksTemplateUrl')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"sshRSAPublicKey": {
"value": "[parameters('sshRSAPublicKey')]"
},
"spnClientId": {
"value": "[parameters('spnClientId')]"
},
"spnClientSecret": {
"value": "[parameters('spnClientSecret')]"
},
"kubernetesVersion": {
"value": "[parameters('kubernetesVersion')]"
},
"dnsPrefix": {
"value": "[parameters('dnsPrefix')]"
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"comments": "Deploys the Client Windows VM",
"apiVersion": "2019-10-01",
"name": "clientVmDeployment",
"dependsOn": ["VNETDeployment"],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('clientVmTemplateUrl')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"windowsAdminUsername": {
"value": "[parameters('windowsAdminUsername')]"
},
"windowsAdminPassword": {
"value": "[parameters('windowsAdminPassword')]"
},
"spnClientId": {
"value": "[parameters('spnClientId')]"
},
"spnClientSecret": {
"value": "[parameters('spnClientSecret')]"
},
"spnTenantId": {
"value": "[parameters('spnTenantId')]"
},
"myIpAddress": {
"value": "[parameters('myIpAddress')]"
},
"workspaceName": {
"value": "[parameters('logAnalyticsWorkspaceName')]"
},
"clusterName": {
"value": "[parameters('clusterName')]"
},
"templateBaseUrl": {
"value": "[parameters('templateBaseUrl')]"
},
"virtualNetworkName": {
"value": "[variables('virtualNetworkName')]"
},
"subnetName": {
"value": "[variables('subnetName')]"
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"comments": "Deploys Azure Log Analytics workspace to support Azure Arc logs upload",
"apiVersion": "2019-10-01",
"name": "logAnalyticsDeployment",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('logAnalyticsUrl')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"workspaceName": {
"value": "[parameters('logAnalyticsWorkspaceName')]"
}
}
}
}
]
}