forked from kuharan/Azure-Button-Test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azuredeploy.json
202 lines (199 loc) · 6.94 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
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"defaultValue": "west us 2",
"type": "string"
},
"ASAdmin": {
"type": "string"
}
},
"variables": {
"openParantheses" : "(",
"closeParantheses" : ")",
"resourceGroupLen":"[length(resourceGroup().name)]",
"charToTakeFromEnd":4,
"resourceGroupNamePart1" : "[take(resourceGroup().name , 5)]",
"resourceGroupNamePart2" : "[skip(resourceGroup().name, sub(variables('resourceGroupLen'),variables('charToTakeFromEnd')))]",
"resourceGroupName":"[concat(variables('resourceGroupNamePart1'),variables('resourceGroupNamePart2'))]",
"resourcePrefix1" : "[replace(variables('resourceGroupName'),'-','')]",
"resourcePrefix2" : "[replace(variables('resourcePrefix1'),variables('openParantheses'),'')]",
"resourcePrefix3" : "[replace(variables('resourcePrefix2'),'.','')]",
"resourcePrefix4" : "[replace(variables('resourcePrefix3'),variables('closeParantheses'),'')]",
"resourcePrefix5" : "[replace(variables('resourcePrefix4'),'_','')]",
"prefixLowercase" : "[toLower(variables('resourcePrefix5'))]",
"storageName": "[concat(variables('prefixLowercase'), 'blob' )]",
"serverName": "[concat(variables('prefixLowercase'), 'svr' )]",
"clusterName": "[concat(variables('prefixLowercase'), 'spark')]",
"ASserverName": "[concat(variables('prefixLowercase'), 'aas' )]",
"clusterLoginUserName" : "admin",
"sshUserName": "sshuser",
"ASskuName" : "B1",
"ASskuTier" : "Basic",
"administratorLogin" : "sqladmin",
"password" : "Pass@word123"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "Storage",
"name": "[variables('storageName')]",
"apiVersion": "2017-10-01",
"location": "[parameters('location')]",
"tags": {},
"scale": null,
"properties": {
"networkAcls": {
"bypass": "AzureServices",
"virtualNetworkRules": [],
"ipRules": [],
"defaultAction": "Allow"
},
"supportsHttpsTrafficOnly": false,
"encryption": {
"services": {
"file": {
"enabled": true
},
"blob": {
"enabled": true
}
},
"keySource": "Microsoft.Storage"
}
},
"dependsOn": []
},
{
"type": "Microsoft.Sql/servers",
"name": "[variables('serverName')]",
"apiVersion": "2014-04-01-preview",
"location": "[parameters('location')]",
"properties": {
"administratorLogin": "[variables('administratorLogin')]",
"administratorLoginPassword": "[variables('password')]"
},
"resources": [
{
"type": "databases",
"name": "sqldatawarehouse",
"apiVersion": "2014-04-01-preview",
"location": "[parameters('location')]",
"properties": {
"edition": "DataWarehouse",
"requestedServiceObjectiveName": "DW100",
"collation": "SQL_Latin1_General_CP1_CI_AS"
},
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('serverName'))]"
]
},
{
"type": "firewallrules",
"name": "AllowAllWindowsAzureIps",
"apiVersion": "2014-04-01-preview",
"location": "[parameters('location')]",
"properties": {
"endIpAddress": "255.255.255.255",
"startIpAddress": "0.0.0.0"
},
"dependsOn": [
"[concat('Microsoft.Sql/servers/', variables('serverName'))]"
]
}
]
},
{
"type": "Microsoft.HDInsight/clusters",
"name": "[variables('clusterName')]",
"apiVersion": "2015-03-01-preview",
"location": "[parameters('location')]",
"properties": {
"clusterVersion": "3.6",
"osType": "Linux",
"tier": "standard",
"clusterDefinition": {
"kind": "spark",
"configurations": {
"gateway": {
"restAuthCredential.isEnabled": true,
"restAuthCredential.username": "[variables('clusterLoginUserName')]",
"restAuthCredential.password": "[variables('password')]"
}
}
},
"storageProfile": {
"storageaccounts": [
{
"name": "[concat(variables('storageName') , '.blob.core.windows.net')]",
"isDefault": true,
"container": "armhdinsight-2018-03-05t07-53-30-522z",
"key": "[listKeys(variables('storageName') , '2015-05-01-preview').key1]"
}
]
},
"computeProfile": {
"roles": [
{
"name": "headnode",
"minInstanceCount": 1,
"targetInstanceCount": 2,
"hardwareProfile": {
"vmSize": "Standard_D12_V2"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "[variables('sshUserName')]",
"password": "[variables('password')]"
}
},
"virtualNetworkProfile": null,
"scriptActions": []
},
{
"name": "workernode",
"minInstanceCount": 1,
"targetInstanceCount": 2,
"hardwareProfile": {
"vmSize": "Standard_D13_V2"
},
"osProfile": {
"linuxOperatingSystemProfile": {
"username": "[variables('sshUserName')]",
"password": "[variables('password')]"
}
},
"virtualNetworkProfile": null,
"scriptActions": []
}
]
}
},
"dependsOn": []
},
{
"type": "Microsoft.AnalysisServices/servers",
"name": "[variables('ASserverName')]",
"apiVersion": "2016-05-16",
"location": "[parameters('location')]",
"sku": {
"name": "[variables('ASskuName')]",
"tier": "[variables('ASskuTier')]"
},
"tags": {},
"properties": {
"ASAdministrators": {
"members": [
"[parameters('ASAdmin')]"
]
}
}
}
]
}