-
Notifications
You must be signed in to change notification settings - Fork 37
/
azuredeploy.json
192 lines (192 loc) · 5.83 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
{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"siteName": {
"type": "string",
"metadata": {
"description": "The name of the web app that will host hubot"
}
},
"hostingPlanName": {
"type": "string",
"metadata": {
"description": "The name of the app service plan to use for hosting the web app"
}
},
"location": {
"type": "string",
"allowedValues": [
"Australia East",
"Australia Southeast",
"Brazil South",
"Central US",
"East Asia",
"East US",
"East US 2",
"Japan East",
"Japan West",
"North Central US",
"North Europe",
"South Central US",
"Southeast Asia",
"West Europe",
"West US"
],
"metadata": {
"description": "The location to use for creating the web app, hosting plan and storage account"
}
},
"sku": {
"type": "string",
"allowedValues": [
"Free",
"Shared",
"Basic",
"Standard"
],
"defaultValue": "Free",
"metadata": {
"description": "The pricing tier for the hosting plan (free, shared, basic, standard)"
}
},
"workerSize": {
"type": "string",
"allowedValues": [
"0",
"1",
"2"
],
"defaultValue": "0",
"metadata": {
"description": "The instance size of the hosting plan (small, medium, or large)"
}
},
"enableAlwaysOn": {
"type": "string",
"allowedValues": [
"True",
"False"
],
"metadata": {
"description": "Enable or disable always on. If you choose free or shared for the sku, this should be set to false as it is not supported"
}
},
"storageAccountName": {
"type": "string",
"metadata": {
"description": "The name of the storage account that will host hubot's brain"
}
},
"storageAccountType": {
"type": "string",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS"
],
"metadata": {
"description": "The type of storage account (locally-redundant storage, geo-redundant storage, zone-redundant storage)"
},
"defaultValue": "Standard_LRS"
},
"slackApiToken": {
"type": "string",
"metadata": {
"description": "The hubot API token from Slack"
}
},
"repoUrl": {
"type": "string"
},
"branch": {
"type": "string"
}
},
"variables": {
"location": "[parameters('location')]",
"siteName": "[parameters('siteName')]",
"hostingPlanName": "[parameters('hostingPlanName')]",
"sku": "[parameters('sku')]",
"workerSize": "[parameters('workerSize')]",
"enableAlwaysOn": "[parameters('enableAlwaysOn')]",
"storageAccountName": "[parameters('storageAccountName')]",
"storageAccountType": "[parameters('storageAccountType')]",
"slackApiToken": "[parameters('slackApiToken')]",
"repoUrl": "[parameters('repoUrl')]",
"branch": "[parameters('branch')]"
},
"resources": [{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"apiVersion": "2015-05-01-preview",
"location": "[variables('location')]",
"properties": {
"accountType": "[variables('storageAccountType')]"
}
}, {
"apiVersion": "2014-11-01",
"name": "[variables('hostingPlanName')]",
"type": "Microsoft.Web/serverfarms",
"location": "[variables('location')]",
"properties": {
"name": "[variables('hostingPlanName')]",
"sku": "[variables('sku')]",
"workerSize": "[variables('workerSize')]",
"numberOfWorkers": 1
}
}, {
"apiVersion": "2014-11-01",
"name": "[variables('siteName')]",
"type": "Microsoft.Web/sites",
"location": "[variables('location')]",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
],
"properties": {
"serverFarm": "[variables('hostingPlanName')]"
},
"resources": [{
"apiVersion": "2014-11-01",
"name": "web",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('siteName'))]"
],
"properties": {
"alwaysOn": "[variables('enableAlwaysOn')]",
"requestTracingEnabled": true,
"httpLoggingEnabled": true,
"logsDirectorySizeLimit": 40,
"detailedErrorLoggingEnabled": true
}
}, {
"apiVersion": "2014-11-01",
"name": "appsettings",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('siteName'))]"
],
"properties": {
"HUBOT_BRAIN_AZURE_STORAGE_ACCOUNT": "[variables('storageAccountName')]",
"HUBOT_BRAIN_AZURE_STORAGE_ACCESS_KEY": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-05-01-preview').key1]",
"HUBOT_SLACK_TOKEN": "[variables('slackApiToken')]",
"HUBOT_ADAPTER": "slack"
}
}, {
"apiVersion": "2014-04-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('siteName'))]",
"[concat('Microsoft.Web/Sites/', variables('siteName'), '/config/appsettings')]"
],
"properties": {
"RepoUrl": "[variables('repoUrl')]",
"branch": "[variables('branch')]",
"IsManualIntegration": true
}
}]
}]
}