The two types of Sitecore Web Application, and their installation on Azure
Fundamentally, the two distinct Sitecore Web Applications (xConnect and Sitecore CM/CD/Reporting/Processing) differ according to the Web Application that the Global.asax points too: if it is a Sitecore application, Sitecore.Web.Application and if it is xConnect Sitecore.XConnect.Web.Global. This means that the same two file sets can support all of the functions aggregated or separated out.
The creation of a Sitecore instance is therefore a matter of the creation of a number of Sitecore Web Applications, xConnect Applications, databases and related entities, and this is what the Sitecore Installation Foundation (SIF), or the Azure QuickStart Templates do. Looking at the Azure Rm Templates documentation you can see how entities in Azure must be created in order, so that entities that depend on each other can reference each other as they are created.
This page shows how Azure resources have to be sequenced:
Tier 1
App Service plan.
Any other related resources, like databases or storage accounts.
Tier 2
Web app–depends on the App Service plan.
Azure Application Insights instance that targets the server farm–depends on the App Service plan.
Tier 3
Source control–depends on the web app.
MSDeploy site extension–depends on the web app.
Application Insights instance that targets the server farm–depends on the web app.
Tier 4
App Service certificate–depends on source control or MSDeploy if either is present. Otherwise, it depends on the web app.
Configuration settings (connection strings, web.config values, app settings)–depends on source control or MSDeploy if either is present. Otherwise, it depends on the web app.
Tier 5
Host name bindings–depends on the certificate if present. Otherwise, it depends on a higher-level resource.
Site extensions–depends on configuration settings if present. Otherwise, it depends on a higher-level resource.
Typically, your solution includes only some of these resources and tiers. For missing tiers, map lower resources to the next-higher tier.
And indeed, this is how the Azure installation works: the azuredeploy.json referenced in the Quickstart Templates, in turn links to a number of other templates that make the various parts of the required installation.
Taking the XP1 topology this means that the following nested templates are invoked, in the following order:
infrastructure.json
infrastructure-xconnect.json
infrastructure-exm.json
infrastructure-ma.json
application.json
application-xconnect.json
application-ma.json
application-exm.json
In the example below I have assumed a Sitecore XP1 instance, with a base name of “myapp”. I have replaced the variable names with their appropriate values in order to show what resources are created, when, and what their ultimate names would be.
Step 1 Sitecore Infrastructure
The first template executed creates
- Hosting Plans
- Web Applications
- SQL Server Instance
- SQL Server Databases
- Azure Search Instance
- Redis Cache
- Application Insights
- Application Insights Payment Plan
- Authentication Certificate
Invocation of the infrastructure script:
“name”: “[concat(deployment().name, ‘-infrastructure’)]”,
“type”: “Microsoft.Resources/deployments”,
Creation of Hosting Plan(s)
“type”: “Microsoft.Web/serverfarms”,
“name”: “[variables(‘xp1-myapp-cm-hp’)]”,
“name”: “[variables(‘xp1-myapp-cd-hp’)]”,
“name”: “[variables(‘xp1-myapp-prc-hp’)]”,
“name”: “[variables(‘xp1-myapp-rep-hp’)]”,
Creation of the Web App(s)
“type”: “Microsoft.Web/sites”,
“name”: “[variables(‘xp1-myapp-cm’)]”,
“name”: “[variables(‘xp1-myapp-cd’)]”,
“name”: “[variables(‘xp1-myapp-prc’)]”,
“name”: “[variables(‘xp1-myapp-rep’)]”,
Creation of SQL Server instance
“type”: “Microsoft.Sql/servers”,
“name”: “[variables(‘xp1-myapp-sql’)]”,
Creation of Databases
“type”: “databases”,
“name”: “[variables(‘xp1-myapp-core-db’)]”,
“name”: “[variables(‘xp1-myapp-master-db’)]”,
“name”: “[variables(‘xp1-myapp-web-db’)]”,
“name”: “[variables(‘xp1-myapp-reporting-db’)]”,
“name”: “[variables(‘xp1-myapp-processing-pools-db’)]”,
“name”: “[variables(‘xp1-myapp-processing-tasks-db’)]”,
“name”: “[variables(‘xp1-myapp-experienceforms-db’)]”,
“name”: “[variables(‘xp1-myapp-exmmaster-db’)]”,
Creation of Azure Search instance
“type”: “Microsoft.Search/searchServices”,
“name”: “[variables(‘xp1-myapp-as’)]”,
Creation of Redis Cache instance
“type”: “Microsoft.Cache/Redis”,
“name”: “[variables(‘xp1-myapp-redis’)]”,
Creation of Application Insights
“type”: “Microsoft.Insights/Components”,
“name”: “[variables(‘xp1-myapp-ai’)]”,
Creation of Pricing Plan
“type”: “Microsoft.Insights/Components/CurrentBillingFeatures”,
“name”: “[concat(variables(‘xp1-myapp-ai’), ‘/’, variables(‘-pp’))]”,
Creation of TLS/SSL Certificates
“type”: “Microsoft.Web/certificates”,
“name”: “[variables(‘authCertificateNameTidy’)]”,
Storage of Thumbprint and SQL Server Fully Qualified Domain Name (inserted into the ConnectionStrings.config)
output:
“sqlServerFqdn”: “[reference(concat(‘Microsoft.Sql/servers/’, variables(‘xp1-myapp-sql’))).fullyQualifiedDomainName]”,
“authCertificateThumbprint”: “[reference(resourceId(‘Microsoft.Web/certificates’, variables(‘authCertificateNameTidy’))).thumbprint]”
Step 2 xConnect Infrastructure
- Hosting Plan
- Web Applications
- SQL Server Databases
- Web Application (xConnect Search)
Invocation of the infrastructure script:
“name”: “[concat(deployment().name, ‘-infrastructure-xconnect’)]”,
“type”: “Microsoft.Resources/deployments”,
Creation of Hosting Plan(s) – only 1 plan is created depending on script parameters
“type”: “Microsoft.Web/serverfarms”,
“name”: “[variables(‘xp1-myapp-xc-basic-hp’)]”,
“name”: “[variables(‘xp1-myapp-xc-resourceintensive-hp’)]”,
Creation of the Web App(s)
“type”: “Microsoft.Web/sites”,
“name”: “[variables(‘xp1-myapp-xc-refdata’)]”,
Creation of Databases
“type”: “Microsoft.Sql/servers/databases”,
“name”: “[concat(variables(‘xp1-myapp-sql’), ‘/’, variables(‘xp1-refdata-db’))]”,
Creation of the Web App(s)
“type”: “Microsoft.Web/sites”,
“name”: “[variables(‘xp1-myapp-xc-collect’)]”,
Creation of Databases
“type”: “Microsoft.Sql/servers/databases”,
“name”: “[concat(variables(‘xp1-myapp-sql’),’/’,variables(‘-smm-db’))]”,
“name”: “[concat(variables(‘xp1-myapp-sql’),’/’,variables(‘-shard0-db’))]”,
“name”: “[concat(variables(‘xp1-myapp-sql’),’/’,variables(‘-shard1-db’))]”,
“name”: “[concat(variables(‘xp1-myapp-sql’), ‘/’, variables(‘-messaging-db’))]”,
Creation of the Web App(s)
“type”: “Microsoft.Web/sites”,
“name”: “[variables(‘xp1-myapp-xc-search’)]”,
Step 3 EXM Infrastructure (Optional)
- Hosting Plan
- Web Application
Invocation of the infrastructure script:
“name”: “[concat(deployment().name, ‘-infrastructure-exm’)]”,
“condition”: “[parameters(‘xp1-myapp-exm-dds’)]”,
“type”: “Microsoft.Resources/deployments”,
Creation of Hosting Plan(s)
“type”: “Microsoft.Web/serverfarms”,
“name”: “[variables(‘exmDdsHostingPlanNameTidy’)]”,
Creation of the Web App(s)
“type”: “Microsoft.Web/sites”,
“name”: “[variables(‘exmDdsWebAppNameTidy’)]”,
Step 4 Marketing Automation Infrastructure
- SQL Server Database
- Web Applications
Invocation of the infrastructure script:
“name”: “[concat(deployment().name, ‘-infrastructure-ma’)]”,
“type”: “Microsoft.Resources/deployments”,
Creation of Databases
“name”: “[concat(variables(‘xp1-myapp-sql’), ‘/’, variables(‘-ma-db’))]”,
“type”: “Microsoft.Sql/servers/databases”,
Creation of the Web App(s)
“type”: “Microsoft.Web/sites”,
“name”: “[variables(‘xp1-myapp-ma-rep’)]”,
“name”: “[variables(‘xp1-myapp-ma-ops’)]”,
Step 5 Sitecore Application Creation
- Creation of Web Applications from Content WDP
- Creation of Web Applications configurations
Invocation of the application script:
“name”: “[concat(deployment().name, ‘-application’)]”,
“condition”: “[parameters(‘deployPlatform’)]”,
“type”: “Microsoft.Resources/deployments”,
Deployment of We Deployment Package (WDP) via MsDeploy
“type”: “Microsoft.Web/sites/extensions”,
“name”: “[concat(variables(‘xp1-myapp-cm’), ‘/’, ‘MSDeploy’)]”,
“name”: “[concat(variables(‘xp1-myapp-cd’), ‘/’, ‘MSDeploy’)]”,
“name”: “[concat(variables(‘xp1-myapp-prc’), ‘/’, ‘MSDeploy’)]”,
“name”: “[concat(variables(‘xp1-myapp-rep’), ‘/’, ‘MSDeploy’)]”,
Creation of Web App Configuration Settings
“type”: “Microsoft.Web/sites/config”,
“name”: “[concat(variables(‘xp1-myapp-cd’), ‘/’, ‘appsettings’)]”,
“name”: “[concat(variables(‘xp1-myapp-cm’), ‘/’, ‘appsettings’)]”,
“name”: “[concat(variables(‘xp1-myapp-prc’), ‘/’, ‘appsettings’)]”,
“name”: “[concat(variables(‘xp1-myapp-rep’), ‘/’, ‘appsettings’)]”,
Step 6 xConnect Application Creation
- Creation of Web Applications from Content WDP
- Creation of Web Applications configurations
Invocation of the application script:
“name”: “[concat(deployment().name, ‘-application-xconnect’)]”,
“condition”: “[parameters(‘deployXConnect’)]”,
“type”: “Microsoft.Resources/deployments”,
Deployment of We Deployment Package (WDP) via MsDeploy
“type”: “Microsoft.Web/sites/extensions”,
“name”: “[concat(variables(‘xp1-myapp-xc-refdata’), ‘/’, ‘MSDeploy’)]”,
“name”: “[concat(variables(‘xp1-myapp-xc-collect’), ‘/’, ‘MSDeploy’)]”,
“name”: “[concat(variables(‘xp1-myapp-xc-search’), ‘/’, ‘MSDeploy’)]”,
“type”: “Microsoft.Web/sites/extensions”,
Creation of Web App Configuration Settings
“type”: “Microsoft.Web/sites/config”,
“name”: “[concat(variables(‘xp1-myapp-xc-refdata’), ‘/’, ‘appsettings’)]”,
“name”: “[concat(variables(‘xp1-myapp-xc-collect’), ‘/’, ‘appsettings’)]”,
“name”: “[concat(variables(‘xp1-myapp-xc-search’), ‘/’, ‘appsettings’)]”,
Step 7 MarketingAutomation Application Creation
- Creation of Web Applications from Content WDP
- Creation of Web Applications configurations
Invocation of the application script:
“name”: “[concat(deployment().name, ‘-application-ma’)]”,
“condition”: “[parameters(‘deployXConnect’)]”,
“type”: “Microsoft.Resources/deployments”,
Deployment of We Deployment Package (WDP) via MsDeploy
“type”: “Microsoft.Web/sites/extensions”,
“name”: “[concat(variables(‘xp1-myapp-ma-ops’), ‘/’, ‘MSDeploy’)]”,
“name”: “[concat(variables(‘xp1-myapp-ma-rep’), ‘/’, ‘MSDeploy’)]”,
Creation of Web App Configuration Settings
“type”: “Microsoft.Web/sites/config”,
“name”: “[concat(variables(‘xp1-myapp-ma-ops’), ‘/’, ‘appsettings’)]”,
“name”: “[concat(variables(‘xp1-myapp-ma-rep’), ‘/’, ‘appsettings’)]”,
Step 8 EXM Application Creation
- Creation of Web Applications from Content WDP
- Creation of Web Applications configurations
Invocation of the application script:
“name”: “[concat(deployment().name, ‘-application-exm’)]”,
“condition”: “[parameters(‘xp1-myapp-exm-dds’)]”,
“type”: “Microsoft.Resources/deployments”,
Deployment of We Deployment Package (WDP) via MsDeploy
“type”: “Microsoft.Web/sites/extensions”,
“name”: “[concat(variables(‘xp1-myapp-cm’), ‘/’, ‘MSDeploy’)]”,
“name”: “[concat(variables(‘exmDdsWebAppNameTidy’), ‘/’, ‘MSDeploy’)]”,
Creation of Web App Configuration Settings
“name”: “[concat(variables(‘exmDdsWebAppNameTidy’), ‘/’, ‘appsettings’)]”,
“type”: “Microsoft.Web/sites/config”,