-
Notifications
You must be signed in to change notification settings - Fork 2
/
azuredeploy.json
167 lines (166 loc) · 5.43 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
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"elicitationAdminUsername": {
"type": "string",
"metadata": {
"description": "Pick a username for the elicitation admin"
}
},
"elicitationAdminPassword": {
"type": "securestring",
"metadata": {
"description": "Pick a password for the elicitation admin"
}
}
},
"variables": {
"hostingPlanName": "[concat('hostingplan-', uniqueString(resourceGroup().id))]",
"webSiteName": "[concat('ElicitationEngine-', uniqueString(resourceGroup().id))]",
"sqlserverName": "[concat('sqlserver-', uniqueString(resourceGroup().id))]",
"databaseName": "ElicitationDB"
},
"resources": [
{
"name": "[variables('sqlserverName')]",
"type": "Microsoft.Sql/servers",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "SqlServer"
},
"apiVersion": "2014-04-01",
"properties": {
"administratorLogin": "[parameters('elicitationAdminUsername')]",
"administratorLoginPassword": "[parameters('elicitationAdminPassword')]",
"version": "12.0"
},
"resources": [
{
"name": "[variables('databaseName')]",
"type": "databases",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "Database"
},
"apiVersion": "2015-01-01",
"dependsOn": [
"[variables('sqlserverName')]"
],
"properties": {
"edition": "Basic",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": "1073741824",
"requestedServiceObjectiveName": "Basic"
}
},
{
"type": "firewallrules",
"apiVersion": "2014-04-01",
"dependsOn": [
"[variables('sqlserverName')]"
],
"location": "[resourceGroup().location]",
"name": "AllowAllWinAsuraIps",
"properties": {
"endIpAddress": "0.0.0.0",
"startIpAddress": "0.0.0.0"
}
}
]
},
{
"apiVersion": "2016-03-01",
"name": "[variables('hostingPlanName')]",
"type": "Microsoft.Web/serverfarms",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "HostingPlan"
},
"sku": {
"name": "D1",
"capacity": "1"
},
"properties": {
"name": "[variables('hostingPlanName')]"
}
},
{
"apiVersion": "2016-03-01",
"name": "[variables('webSiteName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"dependsOn": [
"[variables('hostingPlanName')]"
],
"tags": {
"[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName')))]": "empty",
"displayName": "Website"
},
"properties": {
"name": "[variables('webSiteName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]",
"siteConfig": {
"appSettings": [
{
"name": "ELICITATION_STANDALONE_ADMIN_PASSWORD",
"value": "[parameters('elicitationAdminPassword')]"
},
{
"name": "ELICITATION_STANDALONE_ADMIN_USERNAME",
"value": "[parameters('elicitationAdminUsername')]"
},
{
"name": "ELICITATION_STANDALONE",
"value": "true"
},
{
"name": "ELICITATION_BASE_URL",
"value": "/"
}
]
}
},
"resources": [
{
"apiVersion": "2016-03-01",
"type": "config",
"name": "connectionstrings",
"dependsOn": [
"[variables('webSiteName')]"
],
"properties": {
"DefaultConnection": {
"value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', variables('sqlserverName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', variables('databaseName'), ';User Id=', parameters('elicitationAdminUsername'), '@', reference(concat('Microsoft.Sql/servers/', variables('sqlserverName'))).fullyQualifiedDomainName, ';Password=', parameters('elicitationAdminPassword'), ';')]",
"type": "SQLAzure"
}
}
},
{
"apiVersion": "2016-03-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('webSiteName'))]",
"[concat('Microsoft.Web/Sites/', variables('webSiteName'), '/config/connectionstrings')]"
],
"properties": {
"RepoUrl": "https://github.com/nearzero/elicitation-engine.git",
"branch": "master",
"IsManualIntegration": true
}
}
]
}
],
"outputs": {
"siteUri": {
"type": "string",
"value": "[reference(concat('Microsoft.Web/sites/', variables('webSiteName'))).hostnames[0]]"
},
"sqlSvrFqdn": {
"type": "string",
"value": "[reference(concat('Microsoft.Sql/servers/', variables('sqlserverName'))).fullyQualifiedDomainName]"
}
}
}