-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwait.json
258 lines (257 loc) · 10.7 KB
/
wait.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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01-preview/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"uniqueNamePrefix": {
"type": "string"
},
"instanceCount": {
"type": "string",
"metadata": {
"description": "Number of VM instances"
}
},
"adminUsername": {
"type": "string"
},
"adminPassword": {
"type": "securestring"
}
},
"variables": {
"newStorageAccountPrefix": "[concat(parameters('uniqueNamePrefix'), 'sa')]",
"addressPrefix": "10.0.0.0/16",
"subnetPrefix": "10.0.0.0/24",
"storageAccountType": "Standard_LRS",
"location": "[resourceGroup().location]",
"virtualNetworkName": "virtualNetwork1",
"publicIPAddressName": "publicIp1",
"subnetName": "subnet1",
"loadBalancerName": "loadBalancer1",
"nicName": "networkInterface1",
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
"publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]",
"lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadBalancerName'))]",
"nicId": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]",
"frontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontEnd')]",
"lbPoolID": "[concat(variables('lbID'),'/backendAddressPools/bepool1')]",
"lbProbeID": "[concat(variables('lbID'),'/probes/tcpProbe')]",
"osType": {
"publisher": "Canonical",
"offer": "UbuntuServer",
"sku": "15.04",
"version": "latest"
},
"imageReference": "[variables('osType')]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[concat(variables('newStorageAccountPrefix'), copyindex())]",
"apiVersion": "2015-05-01-preview",
"copy": {
"name": "storageLoop",
"count": 3
},
"location": "[variables('location')]",
"properties": {
"accountType": "[variables('storageAccountType')]"
}
},
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Network/virtualNetworks",
"name": "[variables('virtualNetworkName')]",
"location": "[variables('location')]",
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('addressPrefix')]"
]
},
"subnets": [
{
"name": "[variables('subnetName')]",
"properties": {
"addressPrefix": "[variables('subnetPrefix')]"
}
}
]
}
},
{
"apiVersion": "2015-05-01-preview",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[variables('publicIPAddressName')]",
"location": "[variables('location')]",
"properties": {
"publicIPAllocationMethod": "Dynamic",
"dnsSettings": {
"domainNameLabel": "[parameters('uniqueNamePrefix')]"
}
}
},
{
"apiVersion": "2015-05-01-preview",
"name": "[variables('loadBalancerName')]",
"type": "Microsoft.Network/loadBalancers",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]"
],
"properties": {
"frontendIPConfigurations": [
{
"name": "LoadBalancerFrontEnd",
"properties": {
"publicIPAddress": {
"id": "[variables('publicIPAddressID')]"
}
}
}
],
"backendAddressPools": [
{
"name": "bepool1"
}
],
"loadBalancingRules": [
{
"name": "LBRule",
"properties": {
"frontendIPConfiguration": {
"id": "[variables('frontEndIPConfigID')]"
},
"backendAddressPool": {
"id": "[variables('lbPoolID')]"
},
"protocol": "tcp",
"frontendPort": 80,
"backendPort": 80,
"enableFloatingIP": false,
"idleTimeoutInMinutes": 5,
"probe": {
"id": "[variables('lbProbeID')]"
}
}
}
],
"probes": [
{
"name": "tcpProbe",
"properties": {
"protocol": "tcp",
"port": 80,
"intervalInSeconds": "5",
"numberOfProbes": "2"
}
}
],
"inboundNatPools": [
{
"name": "natpool1",
"properties": {
"frontendIPConfiguration": {
"id": "[variables('frontEndIPConfigID')]"
},
"protocol": "tcp",
"frontendPortRangeStart": 50000,
"frontendPortRangeEnd": 50500,
"backendPort": 22
}
}
]
}
},
{
"type": "Microsoft.Compute/virtualMachineScaleSets",
"apiVersion": "2015-06-15",
"name": "[parameters('uniqueNamePrefix')]",
"location": "[variables('location')]",
"tags": {
"vmsstag1": "Myriad"
},
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountPrefix'), '0')]",
"[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountPrefix'), '1')]",
"[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountPrefix'), '2')]",
"[concat('Microsoft.Network/loadBalancers/', variables('loadBalancerName'))]",
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
],
"sku": {
"name": "Standard_A1",
"tier": "Standard",
"capacity": "[parameters('instanceCount')]"
},
"properties": {
"upgradePolicy": {
"mode": "Automatic"
},
"virtualMachineProfile": {
"storageProfile": {
"osDisk": {
"vhdContainers": [
"[concat('https://', variables('newStorageAccountPrefix'), '0.blob.core.windows.net/vmss')]",
"[concat('https://', variables('newStorageAccountPrefix'), '1.blob.core.windows.net/vmss')]",
"[concat('https://', variables('newStorageAccountPrefix'), '2.blob.core.windows.net/vmss')]"
],
"name": "vmssosdisk",
"caching": "ReadOnly",
"createOption": "FromImage"
},
"imageReference": "[variables('imageReference')]"
},
"osProfile": {
"computerNamePrefix": "[parameters('uniqueNamePrefix')]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]"
},
"networkProfile": {
"networkInterfaceConfigurations": [
{
"name": "nic1",
"properties": {
"primary": "true",
"ipConfigurations": [
{
"name": "ip1",
"properties": {
"subnet": {
"id": "[concat('/subscriptions/', subscription().subscriptionId,'/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'), '/subnets/', variables('subnetName'))]"
},
"loadBalancerBackendAddressPools": [
{ "id": "[concat('/subscriptions/', subscription().subscriptionId,'/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', variables('loadBalancerName'), '/backendAddressPools/bepool1')]" }
],
"loadBalancerInboundNatPools": [
{ "id": "[concat('/subscriptions/', subscription().subscriptionId,'/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/loadBalancers/', variables('loadBalancerName'), '/inboundNatPools/natpool1')]" }
]
}
}
]
}
}]
},
"extensionProfile": {
"extensions": [
{
"name": "negatapacheextension",
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.3",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"https://raw.githubusercontent.com/gatneil/scripts/master/wait.sh"
],
"commandToExecute": "sh wait.sh"
}
}
}
]
}
}
}
}
]
}