Skip to content

Commit 613a17e

Browse files
committed
added zipdeploy extension
1 parent 31901b0 commit 613a17e

File tree

4 files changed

+71
-14
lines changed

4 files changed

+71
-14
lines changed

BlockBlobReader/src/blobreaderdeploy.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"roleDefinitionId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', '2a2b9908-6ea1-4ae2-8e65-a410df84e7d1')]",
138138
"roleScope": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('StorageAccountResourceGroupName'), '/providers/Microsoft.Storage/storageAccounts/', parameters('StorageAccountName'))]",
139139
"DLQProcessor_resourceId": "[resourceId('Microsoft.Web/sites/', parameters('sites_DLQProcessor_name'))]",
140-
"blobreaderconsumer_respurceId": "[resourceId(variables('resourceGroupName'),'Microsoft.Web/sites/', parameters('sites_blobreaderconsumer_name'))]",
140+
"blobreaderconsumer_resourceId": "[resourceId(variables('resourceGroupName'),'Microsoft.Web/sites/', parameters('sites_blobreaderconsumer_name'))]",
141141
"BlobReader_resourceId": "[resourceId(variables('resourceGroupName'),'Microsoft.Web/sites/', parameters('sites_BlobReader_name'))]",
142142
"eventhub_resourceId": "[resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('namespaces_BlobReaderNamespace_name'), parameters('eventhubs_blobreadereventhub_name'))]",
143143
"TABLE_NAME": "FileOffsetMap",
@@ -152,7 +152,7 @@
152152
"resourceGroup": "[parameters('StorageAccountResourceGroupName')]",
153153
"dependsOn": [
154154
"[variables('DLQProcessor_resourceId')]",
155-
"[variables('blobreaderconsumer_respurceId')]"
155+
"[variables('blobreaderconsumer_resourceId')]"
156156
],
157157
"properties": {
158158
"mode": "Incremental",
@@ -366,6 +366,7 @@
366366
"http20Enabled": true,
367367
"minTlsVersion": "1.2",
368368
"scmMinTlsVersion": "1.2",
369+
"netFrameworkVersion": "v6.0",
369370
"appSettings": [
370371
{
371372
"name": "FUNCTIONS_EXTENSION_VERSION",
@@ -463,6 +464,7 @@
463464
"http20Enabled": true,
464465
"minTlsVersion": "1.2",
465466
"scmMinTlsVersion": "1.2",
467+
"netFrameworkVersion": "v6.0",
466468
"appSettings": [
467469
{
468470
"name": "FUNCTIONS_EXTENSION_VERSION",
@@ -522,7 +524,7 @@
522524
"type": "sourcecontrols",
523525
"location": "[parameters('location')]",
524526
"dependsOn": [
525-
"[variables('blobreaderconsumer_respurceId')]"
527+
"[variables('blobreaderconsumer_resourceId')]"
526528
],
527529
"properties": {
528530
"RepoUrl": "[parameters('sourceCodeRepositoryURL')]",
@@ -558,6 +560,7 @@
558560
"http20Enabled": true,
559561
"minTlsVersion": "1.2",
560562
"scmMinTlsVersion": "1.2",
563+
"netFrameworkVersion": "v6.0",
561564
"appSettings": [
562565
{
563566
"name": "FUNCTIONS_EXTENSION_VERSION",

BlockBlobReader/src/blobreaderzipdeploy.json

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
"roleDefinitionId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', '2a2b9908-6ea1-4ae2-8e65-a410df84e7d1')]",
126126
"roleScope": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('StorageAccountResourceGroupName'), '/providers/Microsoft.Storage/storageAccounts/', parameters('StorageAccountName'))]",
127127
"DLQProcessor_resourceId": "[resourceId('Microsoft.Web/sites/', parameters('sites_DLQProcessor_name'))]",
128-
"blobreaderconsumer_respurceId": "[resourceId(variables('resourceGroupName'),'Microsoft.Web/sites/', parameters('sites_blobreaderconsumer_name'))]",
128+
"blobreaderconsumer_resourceId": "[resourceId(variables('resourceGroupName'),'Microsoft.Web/sites/', parameters('sites_blobreaderconsumer_name'))]",
129129
"BlobReader_resourceId": "[resourceId(variables('resourceGroupName'),'Microsoft.Web/sites/', parameters('sites_BlobReader_name'))]",
130130
"eventhub_resourceId": "[resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('namespaces_BlobReaderNamespace_name'), parameters('eventhubs_blobreadereventhub_name'))]",
131131
"TABLE_NAME": "FileOffsetMap",
@@ -140,7 +140,7 @@
140140
"resourceGroup": "[parameters('StorageAccountResourceGroupName')]",
141141
"dependsOn": [
142142
"[variables('DLQProcessor_resourceId')]",
143-
"[variables('blobreaderconsumer_respurceId')]"
143+
"[variables('blobreaderconsumer_resourceId')]"
144144
],
145145
"properties": {
146146
"mode": "Incremental",
@@ -354,6 +354,7 @@
354354
"http20Enabled": true,
355355
"minTlsVersion": "1.2",
356356
"scmMinTlsVersion": "1.2",
357+
"netFrameworkVersion": "v6.0",
357358
"appSettings": [
358359
{
359360
"name": "FUNCTIONS_EXTENSION_VERSION",
@@ -389,7 +390,7 @@
389390
},
390391
{
391392
"name": "WEBSITE_RUN_FROM_PACKAGE",
392-
"value": "https://appdev-cloudformation-templates.s3.amazonaws.com/AzureBlobReader/taskproducer4.1.0.zip"
393+
"value": 1
393394
},
394395
{
395396
"name": "TABLE_NAME",
@@ -409,6 +410,20 @@
409410
}
410411
}
411412
},
413+
"resources": [
414+
{
415+
"type": "extensions",
416+
"apiVersion": "2021-02-01",
417+
"name": "ZipDeploy",
418+
"dependsOn": [
419+
"[variables('BlobReader_resourceId')]"
420+
],
421+
"properties": {
422+
"packageUri": "https://appdev-cloudformation-templates.s3.amazonaws.com/AzureBlobReader/taskproducer4.1.0.zip",
423+
"appOffline": true
424+
}
425+
}
426+
],
412427
"dependsOn": [
413428
"[resourceId('Microsoft.Web/serverfarms', parameters('serverfarms_BlobReaderPlan_name'))]",
414429
"[resourceId('Microsoft.Insights/components', parameters('appInsightsName'))]"
@@ -435,6 +450,7 @@
435450
"http20Enabled": true,
436451
"minTlsVersion": "1.2",
437452
"scmMinTlsVersion": "1.2",
453+
"netFrameworkVersion": "v6.0",
438454
"appSettings": [
439455
{
440456
"name": "FUNCTIONS_EXTENSION_VERSION",
@@ -479,14 +495,28 @@
479495
},
480496
{
481497
"name": "WEBSITE_RUN_FROM_PACKAGE",
482-
"value": "https://appdev-cloudformation-templates.s3.amazonaws.com/AzureBlobReader/taskconsumer4.1.0.zip"
498+
"value": 1
483499
}
484500
],
485501
"cors": {
486502
"allowedOrigins": ["https://portal.azure.com"]
487503
}
488504
}
489505
},
506+
"resources": [
507+
{
508+
"type": "extensions",
509+
"apiVersion": "2021-02-01",
510+
"name": "ZipDeploy",
511+
"dependsOn": [
512+
"[variables('blobreaderconsumer_resourceId')]"
513+
],
514+
"properties": {
515+
"packageUri": "https://appdev-cloudformation-templates.s3.amazonaws.com/AzureBlobReader/taskconsumer4.1.0.zip",
516+
"appOffline": true
517+
}
518+
}
519+
],
490520
"dependsOn": [
491521
"[resourceId('Microsoft.Web/serverfarms', parameters('serverfarms_ConsumerPlan_name'))]",
492522
"[resourceId('Microsoft.Insights/components', parameters('appInsightsName'))]",
@@ -514,6 +544,7 @@
514544
"http20Enabled": true,
515545
"minTlsVersion": "1.2",
516546
"scmMinTlsVersion": "1.2",
547+
"netFrameworkVersion": "v6.0",
517548
"appSettings": [
518549
{
519550
"name": "FUNCTIONS_EXTENSION_VERSION",
@@ -553,7 +584,7 @@
553584
},
554585
{
555586
"name": "WEBSITE_RUN_FROM_PACKAGE",
556-
"value": "https://appdev-cloudformation-templates.s3.amazonaws.com/AzureBlobReader/dlqprocessor4.1.0.zip"
587+
"value": 1
557588
},
558589
{
559590
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
@@ -569,6 +600,20 @@
569600
}
570601
}
571602
},
603+
"resources": [
604+
{
605+
"type": "extensions",
606+
"apiVersion": "2021-02-01",
607+
"name": "ZipDeploy",
608+
"dependsOn": [
609+
"[variables('DLQProcessor_resourceId')]"
610+
],
611+
"properties": {
612+
"packageUri": "https://appdev-cloudformation-templates.s3.amazonaws.com/AzureBlobReader/dlqprocessor4.1.0.zip",
613+
"appOffline": true
614+
}
615+
}
616+
],
572617
"dependsOn": [
573618
"[resourceId('Microsoft.Web/serverfarms', parameters('serverfarms_ConsumerPlan_name'))]",
574619
"[resourceId('Microsoft.Insights/components', parameters('appInsightsName'))]",

BlockBlobReader/src/create_zip.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ cd ../../
6464

6565
echo "removing packagejson"
6666

67-
rm producer_build/package-lock.json
68-
rm consumer_build/package-lock.json
69-
rm dlqprocessor_build/package-lock.json
67+
# rm producer_build/package-lock.json
68+
# rm consumer_build/package-lock.json
69+
# rm dlqprocessor_build/package-lock.json
7070

71-
rm producer_build/package.json
72-
rm consumer_build/package.json
73-
rm dlqprocessor_build/package.json
71+
# rm producer_build/package.json
72+
# rm consumer_build/package.json
73+
# rm dlqprocessor_build/package.json
7474

7575
if [ $? -eq 0 ]; then
7676
echo OK

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ Each integration is structured in three folders
1919
* target/ - directory used by azure's github integration to fetch source code
2020
* tests/ - contains integration tests
2121

22+
### Important Points
23+
* WEBSITE_CONTENTAZUREFILECONNECTIONSTRING is required for Consumption and Elastic Premium plan apps running on both Windows and Linux. Although we have included it dedicated plan as well in case users want to switch the plan. [docs](https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#website_contentazurefileconnectionstring)
24+
* All the functions use Windows based plans because Linux based plans do not support source control. [docs](https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies?tabs=windows#deployment-technology-availability)
25+
* When using WEBSITE_RUN_FROM_PACKAGE = <URL>, Function apps running on Windows experience a slight increase in cold start time and you must also manually sync triggers after you publish an updated package. [docs](https://learn.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package#using-website_run_from_package--url)
26+
* When running your functions from a zip package file in Azure, only zip files are currently supported and files become read-only in the Azure portal, so update & rebuild them (using create_zip.sh) before deploying. [docs](https://learn.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package#general-considerations)
27+
* Currently the zip files contains all the packages, and Kudu assumes by default that deployments from zip files are ready to run and do not require additional build steps during deployment, such as `npm install`. This can be overridden by setting the SCM_DO_BUILD_DURING_DEPLOYMENT deployment setting to true. [docs](https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file-or-url)
28+
* You can scale dedicated plans and apps by changing the capacity and numberOfWorkers setting. [docs](https://learn.microsoft.com/en-us/azure/app-service/manage-scale-per-app#per-app-scaling-using-azure-resource-manager)
29+
* Function apps running on Version 1.x of the Azure Functions runtime will reach the end of life (EOL) for extended support on September 14, 2026.
30+
2231
## Release
2332

2433
### Releasing appdev package

0 commit comments

Comments
 (0)