Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit cfe86f2

Browse files
authored
Merge pull request #14 from xpouyat/master
ARM template update for Functions v3
2 parents f8785b2 + 6e3904d commit cfe86f2

File tree

2 files changed

+86
-47
lines changed

2 files changed

+86
-47
lines changed

LiveAndVodDRMOperationsV3/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ local.settings.json will look like (please replace 'value' with the correct data
121121
```
122122

123123
### 5. Optional but recommended : deploy a Cosmos Database
124+
124125
This database is used to read the settings when creating a live event. It is also used to store all the information about the live event, output created, and vod assets.
125126
Database and collections are automatically created by the code if Cosmos fields are set in app settings. Collections use a partition key named "/partitionKey" and value is always "live".
126127

azuredeploy.json

Lines changed: 85 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
33
"contentVersion": "1.0.0.0",
44
"parameters": {
55
"functionsAppName": {
@@ -112,26 +112,22 @@
112112
{
113113
"type": "Microsoft.Web/serverfarms",
114114
"name": "[variables('hostingPlanName')]",
115-
"apiVersion": "2015-08-01",
115+
"apiVersion": "2020-06-01",
116116
"location": "[resourceGroup().location]",
117117
"comments": "This hosting plan is created to deploy the function app and set the billing sku tier",
118118
"sku": {
119119
"name": "Y1",
120-
"tier": "Dynamic",
121-
"size": "Y1",
122-
"family": "Y",
123-
"capacity": 0
120+
"tier": "Dynamic"
124121
},
125-
"kind": "functionapp",
126122
"properties": {
127123
"name": "[variables('hostingPlanName')]",
128-
"computeMode": "0"
124+
"computeMode": "Dynamic"
129125
}
130126
},
131127
{
132128
"type": "Microsoft.Web/sites",
133129
"name": "[variables('functionsAppName')]",
134-
"apiVersion": "2015-08-01",
130+
"apiVersion": "2020-06-01",
135131
"location": "[resourceGroup().location]",
136132
"comments": "This function app depends on the media services account and storage account and will pull down the source code from Github",
137133
"dependsOn": [
@@ -143,59 +139,101 @@
143139
"serverFarmId": "[variables('hostingPlanName')]",
144140
"siteConfig": {
145141
"appSettings": [
142+
{
143+
"name": "AzureWebJobsStorage",
144+
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';EndpointSuffix=', environment().suffixes.storage, ';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value)]"
145+
},
146+
{
147+
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
148+
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';EndpointSuffix=', environment().suffixes.storage, ';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value)]"
149+
},
150+
{
151+
"name": "WEBSITE_CONTENTSHARE",
152+
"value": "[toLower(variables('functionsAppName'))]"
153+
},
146154
{
147155
"name": "FUNCTIONS_EXTENSION_VERSION",
148-
"value": "beta"
156+
"value": "~3"
157+
},
158+
{
159+
"name": "WEBSITE_NODE_DEFAULT_VERSION",
160+
"value": "~10"
161+
},
162+
{
163+
"name": "FUNCTIONS_WORKER_RUNTIME",
164+
"value": "dotnet"
165+
},
166+
{
167+
"name": "Project",
168+
"value": "[parameters('project')]"
169+
},
170+
{
171+
"name": "SubscriptionId",
172+
"value": "[parameters('mediaServicesAccountSubscriptionId')]"
173+
},
174+
{
175+
"name": "Region",
176+
"value": "[parameters('mediaServicesAccountRegion')]"
177+
},
178+
{
179+
"name": "ResourceGroup",
180+
"value": "[parameters('mediaServicesAccountResourceGroup')]"
181+
},
182+
{
183+
"name": "AccountName",
184+
"value": "[parameters('mediaServicesAccountName')]"
185+
},
186+
{
187+
"name": "AadClientId",
188+
"value": "[parameters('mediaServicesAccountServicePrincipalClientId')]"
189+
},
190+
{
191+
"name": "AadClientSecret",
192+
"value": "[parameters('mediaServicesAccountServicePrincipalClientSecret')]"
193+
},
194+
{
195+
"name": "AadEndpoint",
196+
"value": "https://login.microsoftonline.com"
197+
},
198+
{
199+
"name": "AadTenantId",
200+
"value": "[parameters('mediaServicesAccountAzureActiveDirectoryTenantId')]"
201+
},
202+
{
203+
"name": "ArmEndpoint",
204+
"value": "https://management.azure.com/"
205+
},
206+
{
207+
"name": "ArmAadAudience",
208+
"value": "https://management.core.windows.net/"
209+
},
210+
{
211+
"name": "StorageConnection",
212+
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2019-06-01').keys[0].value)]"
213+
},
214+
{
215+
"name": "SigningKey",
216+
"value": "wOlDEUJ4/VN1No8HxVxpsRvej0DZrO5DXvImGLjFhfctPGFiMkUA0Cj8HSfJW7lePX9XsfHAMhw30p0yYqG+1A=="
217+
},
218+
{
219+
"name": "WebHookEndpoint",
220+
"value": "[concat(resourceId('Microsoft.Web/sites', variables('functionsAppName')),'/api/Notification_Webhook_Function?code=', parameters('functionKey'))]"
149221
}
150222
]
151223
}
152224
},
153225
"resources": [
154-
{
155-
"type": "config",
156-
"name": "appsettings",
157-
"apiVersion": "2015-08-01",
158-
"comments": "These are the default appsettings configured on the functions app.",
159-
"dependsOn": [
160-
"[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]",
161-
"[resourceId('Microsoft.Web/Sites', variables('functionsAppName'))]",
162-
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
163-
],
164-
"properties": {
165-
"Project": "[parameters('project')]",
166-
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
167-
"FUNCTIONS_EXTENSION_VERSION": "~2",
168-
"WEBSITE_NODE_DEFAULT_VERSION": "10.14.1",
169-
"WEBSITE_CONTENTAZUREFILECONNECTIONSTRING": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]",
170-
"WEBSITE_CONTENTSHARE": "[variables('functionsAppName')]",
171-
"AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]",
172-
"AzureWebJobsDashboard": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]",
173-
"SubscriptionId": "[parameters('mediaServicesAccountSubscriptionId')]",
174-
"Region": "[parameters('mediaServicesAccountRegion')]",
175-
"ResourceGroup": "[parameters('mediaServicesAccountResourceGroup')]",
176-
"AccountName": "[parameters('mediaServicesAccountName')]",
177-
"AadClientId": "[parameters('mediaServicesAccountServicePrincipalClientId')]",
178-
"AadClientSecret": "[parameters('mediaServicesAccountServicePrincipalClientSecret')]",
179-
"AadEndpoint": "https://login.microsoftonline.com",
180-
"AadTenantId": "[parameters('mediaServicesAccountAzureActiveDirectoryTenantId')]",
181-
"ArmEndpoint": "https://management.azure.com/",
182-
"ArmAadAudience": "https://management.core.windows.net/",
183-
"StorageConnection": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]",
184-
"SigningKey": "wOlDEUJ4/VN1No8HxVxpsRvej0DZrO5DXvImGLjFhfctPGFiMkUA0Cj8HSfJW7lePX9XsfHAMhw30p0yYqG+1A==",
185-
"WebHookEndpoint": "[concat(resourceId('Microsoft.Web/sites', variables('functionsAppName')),'/api/Notification_Webhook_Function?code=', parameters('functionKey'))]"
186-
}
187-
},
188226
{
189227
"type": "sourcecontrols",
190228
"name": "web",
191-
"apiVersion": "2015-08-01",
229+
"apiVersion": "2019-08-01",
192230
"comments": "This section sets up source control for continuous integration on the Function app and pulls the source code down from Github.",
193231
"dependsOn": [
194232
"[resourceId('Microsoft.Web/sites', variables('functionsAppName'))]",
195233
"[concat('Microsoft.Web/sites/', variables('functionsAppName'), '/config/appsettings')]"
196234
],
197235
"properties": {
198-
"RepoUrl": "[parameters('sourceCodeRepositoryURL')]",
236+
"repoUrl": "[parameters('sourceCodeRepositoryURL')]",
199237
"branch": "[parameters('sourceCodeBranch')]",
200238
"IsManualIntegration": "true"
201239
}
@@ -204,4 +242,4 @@
204242
}
205243
],
206244
"outputs": {}
207-
}
245+
}

0 commit comments

Comments
 (0)