-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazuredeploy.json
316 lines (316 loc) · 11.8 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
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"admin-user": {
"type": "string",
"defaultValue": "adminuser",
"metadata": { "description": "User name for Azure SQL" }
},
"app-id": {
"type": "string",
"metadata": { "description": "App Id created at https://dev.botframework.com/bots/new" }
},
"app-password": {
"type": "string",
"metadata": { "description": "App password created at https://dev.botframework.com/bots/new" }
},
"luis-management-key": {
"type": "string",
"metadata": { "description": "Programatic key from https://www.luis.ai/home/keys" }
}
},
"variables": {
"storage-version": "2017-06-01",
"serverfarms-version": "2016-09-01",
"sites-version": "2016-08-01",
"documentdb-version": "2016-03-31",
"search-version": "2015-08-19",
"sql-server-version": "2014-04-01",
"sql-database-version": "2015-01-01",
"cognitive-version": "2016-02-01-preview",
"web-farm-version": "2016-09-01",
"web-site-version": "2016-08-01",
"prefix": "call",
"unique": "[uniqueString(resourceGroup().id)]",
"location": "[resourceGroup().location]",
"web-app-url": "https://chstone.blob.core.windows.net/public/SHTG/call-center-automation.zip",
"speech-region": "global",
"luis-region": "westus",
"storage-name": "[concat(variables('prefix'), 'stor', variables('unique'))]",
"sql-server-name": "[concat(variables('prefix'), 'sql', variables('unique'))]",
"sql-database-name": "[concat(variables('prefix'), 'db', variables('unique'))]",
"documentdb-name": "[concat(variables('prefix'), 'ddb', variables('unique'))]",
"speech-name": "[concat(variables('prefix'), 'cogspeech', variables('unique'))]",
"luis-name": "[concat(variables('prefix'), 'cogluis', variables('unique'))]",
"search-name": "[concat(variables('prefix'), 'search', variables('unique'))]",
"web-farm-name": "[concat(variables('prefix'), 'webplan', variables('unique'))]",
"web-site-name": "[concat(variables('prefix'), 'web', variables('unique'))]",
"storage-id": "[resourceId('Microsoft.Storage/storageAccounts', variables('storage-name'))]",
"sql-server-id": "[resourceId('Microsoft.Sql/servers', variables('sql-server-name'))]",
"sql-database-id": "[resourceId('Microsoft.Sql/servers/databases', variables('sql-server-name'), variables('sql-database-name'))]",
"documentdb-id": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('documentdb-name'))]",
"speech-id": "[resourceId('Microsoft.CognitiveServices/accounts', variables('speech-name'))]",
"luis-id": "[resourceId('Microsoft.CognitiveServices/accounts', variables('luis-name'))]",
"search-id": "[resourceId('Microsoft.Search/searchServices', variables('search-name'))]",
"web-farm-id": "[resourceId('Microsoft.Web/serverfarms', variables('web-farm-name'))]",
"web-site-id": "[resourceId('Microsoft.Web/sites', variables('web-site-name'))]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storage-name')]",
"apiVersion": "[variables('storage-version')]",
"location": "[variables('location')]",
"sku": { "name": "Standard_LRS" },
"kind": "Storage"
},
{
"type": "Microsoft.Sql/servers",
"name": "[variables('sql-server-name')]",
"location": "[variables('location')]",
"apiVersion": "[variables('sql-server-version')]",
"properties": {
"administratorLogin": "[parameters('admin-user')]",
"administratorLoginPassword": "[parameters('app-password')]",
"version": "12.0"
},
"resources": [
{
"name": "[variables('sql-database-name')]",
"type": "databases",
"location": "[variables('location')]",
"apiVersion": "[variables('sql-database-version')]",
"dependsOn": [
"[variables('sql-server-id')]"
],
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"requestedServiceObjectiveName": "S0",
"maxSizeBytes": "268435456000",
"sampleName": "AdventureWorksLT"
}
},
{
"type": "firewallrules",
"apiVersion": "[variables('sql-server-version')]",
"dependsOn": [
"[variables('sql-server-id')]"
],
"location": "[variables('location')]",
"name": "AllowAllWindowsAzureIps",
"properties": {
"endIpAddress": "0.0.0.0",
"startIpAddress": "0.0.0.0"
}
}
]
},
{
"type": "Microsoft.DocumentDB/databaseAccounts",
"name": "[variables('documentdb-name')]",
"apiVersion": "[variables('documentdb-version')]",
"location": "[variables('location')]",
"properties": {
"databaseAccountOfferType": "Standard"
}
},
{
"type": "Microsoft.Search/searchServices",
"name": "[variables('search-name')]",
"apiVersion": "[variables('search-version')]",
"location": "[variables('location')]",
"sku": { "name": "basic" }
},
{
"type": "Microsoft.CognitiveServices/accounts",
"name": "[variables('speech-name')]",
"apiVersion": "[variables('cognitive-version')]",
"location": "[variables('speech-region')]",
"sku": { "name": "S0" },
"kind": "Bing.Speech",
"properties": { }
},
{
"type": "Microsoft.CognitiveServices/accounts",
"name": "[variables('luis-name')]",
"apiVersion": "[variables('cognitive-version')]",
"location": "[variables('luis-region')]",
"sku": { "name": "S0" },
"kind": "LUIS",
"properties": { }
},
{
"type": "Microsoft.Web/serverfarms",
"name": "[variables('web-farm-name')]",
"apiVersion": "[variables('web-farm-version')]",
"location": "[resourceGroup().location]",
"sku": {"name": "S1"},
"properties": { }
},
{
"type": "Microsoft.Web/sites",
"name": "[variables('web-site-name')]",
"apiVersion": "[variables('web-site-version')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[variables('web-farm-id')]",
"[variables('storage-id')]",
"[variables('sql-database-id')]",
"[variables('documentdb-id')]",
"[variables('search-id')]",
"[variables('speech-id')]",
"[variables('luis-id')]"
],
"properties": {
"serverFarmId": "[variables('web-farm-id')]"
},
"resources": [
{
"type": "extensions",
"name": "MSDeploy",
"apiVersion": "[variables('web-site-version')]",
"dependsOn": [
"[variables('web-site-id')]"
],
"properties": {
"packageUri": "[variables('web-app-url')]",
"dbType": "None",
"connectionString": ""
}
},
{
"type": "config",
"name": "logs",
"apiVersion": "[variables('web-site-version')]",
"dependsOn": [
"[variables('web-site-id')]",
"[resourceId('Microsoft.Web/sites/extensions', variables('web-site-name'), 'MSDeploy')]"
],
"properties": {
"applicationLogs": {
"fileSystem": {
"level": "Verbose"
}
}
}
},
{
"type": "config",
"name": "web",
"apiVersion": "[variables('web-site-version')]",
"dependsOn": [
"[variables('web-site-id')]",
"[resourceId('Microsoft.Web/sites/extensions', variables('web-site-name'), 'MSDeploy')]"
],
"properties": {
"alwaysOn": true
}
},
{
"type": "config",
"name": "appsettings",
"apiVersion": "[variables('web-site-version')]",
"dependsOn": [
"[variables('web-site-id')]",
"[resourceId('Microsoft.Web/sites/extensions', variables('web-site-name'), 'MSDeploy')]"
],
"properties": {
"WEBSITE_NODE_DEFAULT_VERSION": "7.7.4",
"CALLBACK_URL": "[concat('https://', variables('web-site-name'), '.azurewebsites.net/api/calls')]",
"MICROSOFT_APP_ID": "[parameters('app-id')]",
"MICROSOFT_APP_PASSWORD": "[parameters('app-password')]",
"LUIS_REGION": "[variables('luis-region')]",
"LUIS_KEY": "[listKeys(variables('luis-id'), variables('cognitive-version')).key1]",
"LUIS_MANAGER_KEY": "[parameters('luis-management-key')]",
"LUIS_APP_ID": "",
"SPEECH_KEY": "[listKeys(variables('speech-id'), variables('cognitive-version')).key1]",
"SPEECH_ENDPOINT": "https://speech.platform.bing.com/recognize",
"SPEECH_REGION": "",
"SEARCH_SERVICE": "[variables('search-name')]",
"SEARCH_KEY": "[listAdminKeys(variables('search-id'), variables('search-version')).primaryKey]",
"BLOB_ACCOUNT": "[variables('storage-name')]",
"BLOB_KEY": "[listKeys(variables('storage-id'), variables('storage-version')).keys[0].value]",
"DDB_URL": "[reference(variables('documentdb-name')).documentEndpoint]",
"DDB_KEY": "[listKeys(variables('documentdb-id'), variables('documentdb-version')).primaryMasterKey]",
"SQL_HOST": "[reference(variables('sql-server-id'), variables('sql-server-version')).fullyQualifiedDomainName]",
"SQL_USER": "[parameters('admin-user')]",
"SQL_PASSWORD": "[parameters('app-password')]",
"SQL_DATABASE": "[variables('sql-database-name')]",
"LOG_BLOB_CONTAINER": "call-center-automation-audio",
"LOG_DDB_DATABASE": "call-center-automation",
"LOG_DDB_COLLECTION": "events",
"STORE_DDB_DATABASE": "call-center-automation",
"STORE_DDB_COLLECTION": "sessions"
}
}
]
}
],
"outputs": {
"storage": {
"value": "[reference(variables('storage-name'))]",
"type" : "object"
},
"sqlserver": {
"value": "[reference(variables('sql-server-name'))]",
"type" : "object"
},
"sqldb": {
"value": "[reference(variables('sql-database-name'))]",
"type" : "object"
},
"documentdb": {
"value": "[reference(variables('documentdb-name'))]",
"type" : "object"
},
"search": {
"value": "[reference(variables('search-name'))]",
"type" : "object"
},
"speech": {
"value": "[reference(variables('speech-name'))]",
"type" : "object"
},
"luis": {
"value": "[reference(variables('luis-name'))]",
"type" : "object"
},
"webfarm": {
"value": "[reference(variables('web-farm-name'))]",
"type" : "object"
},
"site": {
"value": "[reference(variables('web-site-name'))]",
"type" : "object"
},
"speechKeys": {
"value": "[listKeys(variables('speech-id'), variables('cognitive-version'))]",
"type" : "object"
},
"luisKeys": {
"value": "[listKeys(variables('luis-id'), variables('cognitive-version'))]",
"type" : "object"
},
"searchKeys": {
"value": "[listAdminKeys(variables('search-id'), variables('search-version'))]",
"type" : "object"
},
"storageKeys": {
"value": "[listKeys(variables('storage-id'), variables('storage-version'))]",
"type" : "object"
},
"documentdbKeys": {
"value": "[listKeys(variables('documentdb-id'), variables('documentdb-version'))]",
"type" : "object"
},
"appId": {
"value": "[parameters('app-id')]",
"type": "string"
},
"siteHostName": {
"value": "[reference(variables('web-site-name')).hostNames[0]]",
"type": "string"
}
}
}