From 32415615b9020cd8c719681732c2a6ab11972864 Mon Sep 17 00:00:00 2001 From: Christian Arenas Date: Thu, 6 Jul 2017 12:06:38 +0200 Subject: [PATCH] Add azure function ACR --- .../azurefunctions/azurefunctionsdeploy.json | 228 ++++++++++++++++++ .../azurefunctionsdeploy.parameters.json | 5 + 2 files changed, 233 insertions(+) create mode 100644 deploy/az/azurefunctions/azurefunctionsdeploy.json create mode 100644 deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json diff --git a/deploy/az/azurefunctions/azurefunctionsdeploy.json b/deploy/az/azurefunctions/azurefunctionsdeploy.json new file mode 100644 index 000000000..4143d73e5 --- /dev/null +++ b/deploy/az/azurefunctions/azurefunctionsdeploy.json @@ -0,0 +1,228 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "SitesEshopfunctionsName": { + "type": "string", + "metadata": { + "description": "Name of the Azure Functions namespace" + } + } + }, + "variables": { + "SitesEshopfunctionsName": "[parameters('SitesEshopfunctionsName')]", + "WebConfigName": "[concat(variables('SitesEshopfunctionsName'), '/web')]", + "Location": "[resourceGroup().location]", + "EshopAccountsDatabase": "[concat(variables('SitesEshopfunctionsName'), 'db')]", + "ServerFarmPlan": "[concat(trim(variables('location')), 'Plan')]", + "StorageAccounts": "[concat(variables('SitesEshopfunctionsName'), 'st')]" + }, + "resources": [ + { + "type": "Microsoft.DocumentDB/databaseAccounts", + "kind": "GlobalDocumentDB", + "name": "[variables('EshopAccountsDatabase')]", + "apiVersion": "2015-04-08", + "location": "[variables('Location')]", + "tags": {}, + "scale": null, + "properties": { + "databaseAccountOfferType": "Standard", + "consistencyPolicy": { + "defaultConsistencyLevel": "Session", + "maxIntervalInSeconds": 5, + "maxStalenessPrefix": 100 + }, + "name": null + }, + "dependsOn": [] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "kind": "Storage", + "name": "[variables('StorageAccounts')]", + "apiVersion": "2016-01-01", + "location": "[variables('Location')]", + "tags": {}, + "scale": null, + "properties": {}, + "dependsOn": [] + }, + { + "type": "Microsoft.Web/serverfarms", + "sku": { + "name": "Y1", + "tier": "Dynamic", + "size": "Y1", + "family": "Y", + "capacity": 0 + }, + "kind": "functionapp", + "name": "[variables('ServerFarmPlan')]", + "apiVersion": "2015-08-01", + "location": "[variables('Location')]", + "scale": null, + "properties": { + "name": "[variables('ServerFarmPlan')]", + "numberOfWorkers": 0 + }, + "dependsOn": [] + }, + { + "type": "Microsoft.Web/sites", + "kind": "functionapp", + "name": "[variables('SitesEshopfunctionsName')]", + "apiVersion": "2015-08-01", + "location": "[variables('Location')]", + "scale": null, + "properties": { + "name": "[variables('SitesEshopfunctionsName')]", + "hostNames": [ + "[concat(variables('SitesEshopfunctionsName'),'.azurewebsites.net')]" + ], + "enabledHostNames": [ + "[concat(variables('SitesEshopfunctionsName'),'.azurewebsites.net')]", + "[concat(variables('SitesEshopfunctionsName'),'.scm.azurewebsites.net')]" + ], + "hostNameSslStates": [ + { + "name": "[concat(variables('SitesEshopfunctionsName'),'.azurewebsites.net')]", + "sslState": 0, + "thumbprint": null, + "ipBasedSslState": 0 + }, + { + "name": "[concat(variables('SitesEshopfunctionsName'),'.scm.azurewebsites.net')]", + "sslState": 0, + "thumbprint": null, + "ipBasedSslState": 0 + } + ], + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('ServerFarmPlan'))]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms', variables('ServerFarmPlan'))]" + ] + }, + { + "type": "Microsoft.Web/sites/config", + "name": "[variables('WebConfigName')]", + "apiVersion": "2015-08-01", + "location": "[variables('Location')]", + "scale": null, + "properties": { + "numberOfWorkers": 1, + "defaultDocuments": [ + "Default.htm", + "Default.html", + "Default.asp", + "index.htm", + "index.html", + "iisstart.htm", + "default.aspx", + "index.php", + "hostingstart.html" + ], + "netFrameworkVersion": "v4.0", + "phpVersion": "5.6", + "pythonVersion": "", + "nodeVersion": "", + "linuxFxVersion": "", + "requestTracingEnabled": false, + "remoteDebuggingEnabled": false, + "remoteDebuggingVersion": null, + "httpLoggingEnabled": false, + "logsDirectorySizeLimit": 35, + "detailedErrorLoggingEnabled": false, + "publishingUsername": "$eshopfunctions", + "publishingPassword": null, + "appSettings": null, + "metadata": null, + "connectionStrings": null, + "machineKey": null, + "handlerMappings": null, + "documentRoot": null, + "scmType": "None", + "use32BitWorkerProcess": true, + "webSocketsEnabled": false, + "alwaysOn": false, + "javaVersion": null, + "javaContainer": null, + "javaContainerVersion": null, + "appCommandLine": "", + "managedPipelineMode": 0, + "virtualApplications": [ + { + "virtualPath": "/", + "physicalPath": "site\\wwwroot", + "preloadEnabled": false, + "virtualDirectories": null + } + ], + "winAuthAdminState": 0, + "winAuthTenantState": 0, + "customAppPoolIdentityAdminState": false, + "customAppPoolIdentityTenantState": false, + "runtimeADUser": null, + "runtimeADUserPassword": null, + "loadBalancing": 1, + "routingRules": [], + "experiments": { + "rampUpRules": [] + }, + "limits": null, + "autoHealEnabled": false, + "autoHealRules": { + "triggers": null, + "actions": null + }, + "tracingOptions": null, + "vnetName": "", + "siteAuthEnabled": false, + "siteAuthSettings": { + "enabled": null, + "unauthenticatedClientAction": null, + "tokenStoreEnabled": null, + "allowedExternalRedirectUrls": null, + "defaultProvider": null, + "clientId": null, + "clientSecret": null, + "issuer": null, + "allowedAudiences": null, + "additionalLoginParams": null, + "isAadAutoProvisioned": false, + "googleClientId": null, + "googleClientSecret": null, + "googleOAuthScopes": null, + "facebookAppId": null, + "facebookAppSecret": null, + "facebookOAuthScopes": null, + "twitterConsumerKey": null, + "twitterConsumerSecret": null, + "microsoftAccountClientId": null, + "microsoftAccountClientSecret": null, + "microsoftAccountOAuthScopes": null + }, + "cors": { + "allowedOrigins": [ + "https://functions.azure.com", + "https://functions-staging.azure.com", + "https://functions-next.azure.com" + ] + }, + "push": null, + "apiDefinition": null, + "autoSwapSlotName": null, + "localMySqlEnabled": false, + "ipSecurityRestrictions": null + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('SitesEshopfunctionsName'))]" + ] + } + ] +} \ No newline at end of file diff --git a/deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json b/deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json new file mode 100644 index 000000000..8472e9998 --- /dev/null +++ b/deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": {} +} \ No newline at end of file