forked from InRule/AzureAppServices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInRule.Catalog.Service.json
316 lines (316 loc) · 12 KB
/
InRule.Catalog.Service.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": {
"catalogServiceName": {
"type": "string",
"metadata": {
"description": "Name of the App Service resource the catalog will be installed on"
}
},
"catalogManagerServiceName": {
"type": "string",
"metadata": {
"description": "Name of the App Service resource the catalog manager will be installed on"
}
},
"createOrUpdateCatalogServicePlan": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "If set to false, provide the name and resource group of an existing service plan in the 'catalogServicePlanName' and 'servicePlanResourceGroupName' parameters. Otherwise a new plan will be created with the supplied name"
}
},
"catalogServicePlanName": {
"type": "string",
"defaultValue": "[concat(parameters('catalogServiceName'),'Plan')]",
"metadata": {
"description": "Name for the App Service Plan, defaulting to the value of the App Service's name with 'Plan' appended to the end"
}
},
"catalogServicePlanSkuName": {
"type": "string",
"allowedValues": [
"F1",
"D1",
"B1",
"B2",
"B3",
"S1",
"S2",
"S3",
"P1",
"P2",
"P3",
"P4"
],
"metadata": {
"description": "Describes plan's pricing tier and capacity. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/"
}
},
"servicePlanResourceGroupName": {
"type": "string",
"defaultValue": "[resourceGroup().name]",
"metadata": {
"description": "Optional name of the resource group for the existing app service plan. If creating a new plan, leave as the default value"
}
},
"createOrUpdateCatalogSqlSrvr": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "If set to false, Sql Server will not be created "
}
},
"catalogSqlServerName": {
"type": "string",
"metadata": {
"description": "The server name for the Azure SQL server used to host the irCatalog database(s)."
}
},
"catalogSqlServerUsername": {
"type": "string",
"defaultValue": "irCatalogAdmin",
"metadata": {
"description": "The server admin username for the Azure SQL server used to host the irCatalog database(s)."
}
},
"catalogSqlDbName": {
"type": "string",
"metadata": {
"description": "The name for the irCatalog database."
}
},
"catalogSqlDbEdition": {
"type": "string",
"defaultValue": "Basic",
"allowedValues": [ "Basic", "Standard", "Premium" ],
"metadata": {
"description": "The Azure SQL database edition used for the irCatalog database. Use Basic for less demanding workloads, Standard for most production workloads, and Premium for IO-intensive workloads."
}
},
"catalogSqlDbPerformanceLevel": {
"type": "string",
"defaultValue": "Basic",
"allowedValues": [ "Basic", "S0", "S1", "S2", "S3", "P1", "P2", "P4", "P6", "P11", "P15" ],
"metadata": {
"description": "The Azure SQL database performance level for the irCatalog. These correspond to the specific Azure SQL database edition."
}
},
"catalogSqlDbSizeInGB": {
"type": "string",
"defaultValue": "2",
"allowedValues": [ "1", "2", "5", "10", "20", "30", "40", "50", "100", "150", "200", "250" ],
"metadata": {
"description": "The Azure SQL max database size for the irCatalog. This must be valid for the specific Azure SQL database edition and performance level."
}
},
"catalogSqlServerPassword": {
"type": "string",
"metadata": {
"description": "The server admin password for the Azure SQL server used to host the irCatalog database(s)."
}
},
"inRuleVersion": {
"type": "string",
"defaultValue": "5.7.2",
"metadata": {
"description": "Version of the catalog to deploy"
}
},
"packageUri": {
"type": "string",
"defaultValue": "[concat('/~https://github.com/InRule/AzureAppServices/releases/download/v', parameters('inRuleVersion'),'/InRule.Catalog.Service.zip')]",
"metadata": {
"description": "Download URI for the catalog service package, default to calculated from the inRuleVersion parameter. Leave as default unless deploying a custom package"
}
},
"managerPackageUri": {
"type": "string",
"defaultValue": "[concat('/~https://github.com/InRule/AzureAppServices/releases/download/v', parameters('inRuleVersion'),'/InRule.Catalog.Manager.Web.zip')]",
"metadata": {
"description": "Download URI for the catalog manager package, default to calculated from the inRuleVersion parameter. Leave as default unless deploying a custom package"
}
}
},
"variables": {
"use32Bit": "[or(equals(parameters('catalogServicePlanSkuName'), 'F1'), equals(parameters('catalogServicePlanSkuName'), 'D1'))]",
"catalogServicePlanName": "[if(empty(parameters('catalogServicePlanName')), concat(parameters('catalogServiceName'),'Plan'), parameters('catalogServicePlanName'))]"
},
"resources": [
{
"apiVersion": "2020-06-01",
"name": "pid-50659428-9551-4c59-b7a5-79bf3402de4f",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": []
}
}
},
{
"condition": "[parameters('createOrUpdateCatalogServicePlan')]",
"name": "AppServicePlanTemplate",
"apiVersion": "2017-05-10",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[parameters('servicePlanResourceGroupName')]",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"name": "[variables('catalogServicePlanName')]",
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2016-09-01",
"location": "[resourceGroup().location]",
"properties": {
"name": "[variables('catalogServicePlanName')]"
},
"sku": {
"name": "[parameters('catalogServicePlanSkuName')]"
}
}
]
}
}
},
{
"name": "[parameters('catalogServiceName')]",
"type": "Microsoft.Web/sites",
"apiVersion": "2016-08-01",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId(parameters('servicePlanResourceGroupName'), 'Microsoft.Resources/deployments', 'AppServicePlanTemplate')]"
],
"tags": {
"[concat('hidden-related:', resourceId(parameters('servicePlanResourceGroupName'), 'Microsoft.Web/serverfarms', variables('catalogServicePlanName')))]": "Resource"
},
"properties": {
"serverFarmId": "[resourceId(parameters('servicePlanResourceGroupName'), 'Microsoft.Web/serverfarms', variables('catalogServicePlanName'))]",
"siteConfig": {
"use32BitWorkerProcess": "[variables('use32Bit')]"
}
},
"resources": [
{
"name": "MSDeploy",
"type": "extensions",
"apiVersion": "2016-08-01",
"dependsOn": [
"[concat('Microsoft.Web/sites/', parameters('catalogServiceName'))]"
],
"properties": {
"packageUri": "[parameters('packageUri')]"
}
},
{
"name": "appsettings",
"type": "config",
"apiVersion": "2016-08-01",
"dependsOn": [
"[concat('Microsoft.Web/Sites/', parameters('catalogServiceName'), '/Extensions/MSDeploy')]",
"[concat('Microsoft.Web/sites/', parameters('catalogServiceName'))]"
],
"properties": {
"inrule:repository:service:connectionString": "[concat('Server=tcp:', parameters('catalogSqlServerName'),'.database.windows.net', ',1433;Database=', parameters('catalogSqlDbName'), ';User Id=', parameters('catalogSqlServerUsername'), ';Password=', parameters('catalogSqlServerPassword'), ';')]",
"inrule:repository:licensing:licenseFolder": "D:\\home\\site\\wwwroot",
"inrule:logging:level": "Warn",
"inrule:version":"[parameters('inRuleVersion')]"
}
}
]
},
{
"name": "[parameters('catalogManagerServiceName')]",
"type": "Microsoft.Web/sites",
"apiVersion": "2016-08-01",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId(parameters('servicePlanResourceGroupName'), 'Microsoft.Resources/deployments', 'AppServicePlanTemplate')]"
],
"tags": {
"[concat('hidden-related:', resourceId(parameters('servicePlanResourceGroupName'), 'Microsoft.Web/serverfarms', parameters('catalogServicePlanName')))]": "Resource"
},
"properties": {
"serverFarmId": "[resourceId(parameters('servicePlanResourceGroupName'), 'Microsoft.Web/serverfarms', variables('catalogServicePlanName'))]",
"siteConfig": {
"use32BitWorkerProcess": "[variables('use32Bit')]"
}
},
"resources": [
{
"name": "MSDeploy",
"type": "extensions",
"apiVersion": "2016-08-01",
"dependsOn": [
"[concat('Microsoft.Web/sites/', parameters('catalogManagerServiceName'))]"
],
"properties": {
"packageUri": "[parameters('managerPackageUri')]"
}
},
{
"name": "appsettings",
"type": "config",
"apiVersion": "2016-08-01",
"dependsOn": [
"[concat('Microsoft.Web/Sites/', parameters('catalogManagerServiceName'), '/Extensions/MSDeploy')]",
"[concat('Microsoft.Web/sites/', parameters('catalogManagerServiceName'))]"
],
"properties": {
"InRule.Catalog.Uri": "[concat('https://', parameters('catalogServiceName') ,'.azurewebsites.net/service.svc')]",
"inrule:version":"[parameters('inRuleVersion')]"
}
}
]
},
{
"condition": "[parameters('createOrUpdateCatalogSqlSrvr')]",
"name": "[parameters('catalogSqlServerName')]",
"type": "Microsoft.Sql/servers",
"location": "[resourceGroup().location]",
"apiVersion": "2014-04-01-preview",
"dependsOn": [],
"properties": {
"administratorLogin": "[parameters('catalogSqlServerUsername')]",
"administratorLoginPassword": "[parameters('catalogSqlServerPassword')]"
},
"resources": [
{
"condition": "[parameters('createOrUpdateCatalogSqlSrvr')]",
"name": "AllowAllWindowsAzureIps",
"type": "firewallrules",
"location": "[resourceGroup().location]",
"apiVersion": "2014-04-01-preview",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('catalogSqlServerName'))]"
],
"properties": {
"startIpAddress": "0.0.0.0",
"endIpAddress": "0.0.0.0"
}
},
{
"condition": "[parameters('createOrUpdateCatalogSqlSrvr')]",
"name": "[parameters('catalogSqlDbName')]",
"type": "databases",
"location": "[resourceGroup().location]",
"apiVersion": "2014-04-01-preview",
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('catalogSqlServerName'))]"
],
"properties": {
"edition": "[parameters('catalogSqlDbEdition')]",
"requestedServiceObjectiveName": "[parameters('catalogSqlDbPerformanceLevel')]"
}
}
]
}
],
"outputs": {}
}