Walkthrough: Deploying a new Sitecore environment to the Microsoft Azure App service
Use this walkthrough to set up the right configuration for your solution, prepare the authentication certificate, configure an environment template, deploy a search provider and start provisioning.
This walkthrough describes how to:
- Configure Sitecore
- Prepare the authentication certificate
- Download and configure an environment template
- Deploy with Solr as a search provider
- Invoke the deployment command and start provisioning
- Invoke the deployment command and start provisioning using SAT 2.5
Configure Sitecore
To configure Sitecore, you must use the right configuration to suit your Sitecore solution. Sitecore version 9.0 supports the following Sitecore configurations by default:
| Configuration | Description |
|---|---|
| XP Single | This is the Sitecore Experience Platform configuration that runs:
Use this configuration for development and testing. For security and scalability reasons, it is best practice to use the XM or XP configuration in production environments. |
| XP Scaled | This is the Sitecore Experience Platform configuration that runs:
Use this environment when you are planning a fully featured Sitecore Experience Platform installation. |
| XM Single | This is the Sitecore Experience Management configuration that runs:
Use this configuration for development and testing when you are not planning to use the Analyticsand Marketingfeatures of the Sitecore Experience Platform (that is, in CMS-only mode). |
| XM Scaled | This is the Sitecore Experience Management configuration that runs:
Use this environment when you are not planning to use the Analyticsand Marketingfeatures of the Sitecore Experience Platform (that is, in CMS-only mode). |
| xDB Single | This is the Sitecore Experience Database configuration that runs:
Use this configuration for development and testing in combination with an on-premise Sitecore XM installation to provide the Experience Database features. |
| xDB Scaled | This is the Sitecore Experience Database configuration that runs:
Use this environment in combination with an on-premise Sitecore XM installation to provide the Experience Database features. |
When planning your topologies, and sizing as well as the type of environment you want to deploy, consult the Sitecore Azure Toolkit documentation on the Doc site.
Prepare the authentication certificate
To prepare the authentication certificate:
-
Before starting a Sitecore 9.0 deployment, you must obtain or generate an authentication certificate and store it in PKCS #12 format (
.pfx).NoteXConnect requires client authentication certificates with a valid trust chain by default. Due to a limitation, in the Azure App Service, a certificate can only have a valid trust chain if the root certificate for it is issued by a globally trusted Certificate Authority.
-
If you use a self-signed certificate or a certificate issued by a private Certificate Authority, such as Active Directory Certificate Services, then you must set the
allowInvalidClientCertificatesparameter totrueand extend theazuredeploy.parameters.jsonfile with the following:More details on the parameters file and how to extend it are described in step 4 of the following section.
Download and configure an environment template
To download and configure the environment template for your planned Sitecore configuration:
-
Go to the GitHub repository and locate the templates for your selected Sitecore configuration and version (for example, folder: Sitecore 9.0, subfolder: xp)
-
In the appropriate subfolder of your selected configuration and version, identify the azuredeploy.json file. This is the main ARM template that you use during the deployment process. Obtain the raw URL for this file from GitHub by selecting the file, then clicking Raw. The file opens in a new browser window. Copy the URL directly from the address bar and make a note of this for later use.
-
In the relevant subfolder for your selected configuration and version, identify and download the
azuredeploy.parameters.jsonfile. To control the deployment process, the ARM templates use this file to pass parameters. -
Save the file locally and fill in the parameters within the file, according to the configuration that is described in the relevant table:
XP SingleParameter Description locationThe geographical region of the current deployment. sqlServerLoginThe name of the administrator account being created for Azure SQL server. sqlServerPasswordThe password for the administrator account being created for Azure SQL server. sitecoreAdminPasswordThe password for the administrator account for your instance of XP. singleMsDeployPackageUrlThe HTTP(s) URL for a Sitecore XP Single Web Deployment package (WDP). xcSingleMsDeployPackageUrlThe HTTP(s) URL for an XConnect Single WDP. siMsDeployPackageUrlThe HTTP(s) URL for a Sitecore Identity Server WDP. authCertificateBlobA Base64-encoded blob of the authentication certificate in PKCS #12 format ( .pfx). See the deployment command example in the next section for encoding instructions.authCertificatePasswordThe password for the authentication certificate. templateLinkAccessTokenThe access token for the nested infrastructure and application templates. For example, Azure Storage Explorer can generate a SAS token for you to access the location where the templates were uploaded. XP ScaledParameter Description locationThe geographical region of the current deployment. sqlServerLoginThe name of the administrator account being created for Azure SQL server. sqlServerPassword The password for the administrator account being created for Azure SQL server. sitecoreAdminPasswordThe password for the administrator account for your instance of XP. repAuthenticationApiKeyA unique value, for example, a GUID, which is used to authenticate when communicating from Content Management role to the Reporting Web App. The minimum length required is 32 characters. cmMsDeployPackageUrlThe HTTP(s) URL for a Sitecore XP Content Management Web Deploy package (WDP). cdMsDeployPackageUrlThe HTTP(s) URL for a Sitecore XP Content Delivery WDP. prcMsDeployPackageUrlThe HTTP(s) URL for a Sitecore XP Processing WDP. repMsDeployPackageUrlThe HTTP(s) URL for a Sitecore XP Reporting WDP. xcRefDataMsDeployPackageUrlThe HTTP(s) URL for an XConnect Reference Data service WDP. xcCollectMsDeployPackageUrlThe HTTP(s) URL for an XConnect Collection service WDP. xcSearchMsDeployPackageUrlThe HTTP(s) URL for an XConnect Collection Search service WDP. maOpsMsDeployPackageUrlThe HTTP(s) URL for a Marketing Automation service WDP. maRepMsDeployPackageUrlThe HTTP(s) URL for a Marketing Automation Reporting service WDP. siMsDeployPackageUrlThe HTTP(s) URL for a Sitecore Identity Server WDP. authCertificateBlobA Base64-encoded blob of the authentication certificate in PKCS #12 format ( .pfx). See the deployment command example in the next section for encoding instructions.authCertificatePasswordThe password for the authentication certificate. templateLinkAccessTokenThe access token for the nested infrastructure and application templates. For example, Azure Storage Explorer can generate a SAS token for you to access the location where the templates were uploaded. XM SingleParameter Description locationThe geographical region of the current deployment. sqlServerLoginThe name of the administrator account being created for Azure SQL server. sqlServerPasswordThe password for the administrator account being created for Azure SQL server. sitecoreAdminPasswordThe password for the administrator account for your instance of XM. singleMsDeployPackageUrlThe HTTP(s) URL for a Sitecore XM Single deployment package (WDP). siMsDeployPackageUrlThe HTTP(s) URL for a Sitecore Identity Server WDP. authCertificateBlobA Base64-encoded blob of the authentication certificate in PKCS #12 format ( .pfx). See the deployment command example in the next section for encoding instructions.authCertificatePasswordThe password for the authentication certificate. templateLinkAccessTokenThe access token for the nested infrastructure and application templates. For example, Azure Storage Explorer can generate a SAS token for you to access the location where the templates were uploaded. XM ScaledParameter Description locationThe geographical region of the current deployment. sqlServerLoginThe name of the administrator account being created for Azure SQL server. sqlServerPasswordThe password for the administrator account being created for Azure SQL server. sitecoreAdminPasswordThe password for the administrator account for your instance of XM. cmMsDeployPackageUrlThe HTTP(s) URL to a Sitecore XM Content Management deployment package (WDP). cdMsDeployPackageUrlThe HTTP(s) URL for a Sitecore XM Content Delivery WDP. siMsDeployPackageUrlThe HTTP(s) URL for a Sitecore Identity Server WDP. authCertificateBlobA Base64-encoded blob of the authentication certificate in PKCS #12 format ( .pfx). See the deployment command example in the next section for encoding instructions.authCertificatePasswordThe password for the authentication certificate. templateLinkAccessTokenThe access token for the nested infrastructure and application templates. For example, Azure Storage Explorer can generate a SAS token for you to access the location where the templates were uploaded. xDB SingleParameter Description locationThe geographical region of the current deployment. sqlServerLoginThe name of the administrator account being created for Azure SQL server. sqlServerPasswordThe password for the administrator account being created for Azure SQL server. sitecoreAdminPasswordThe password for the administrator account for your instance of XP. singleMsDeployPackageUrlThe HTTP(s) URL for a Sitecore xDB Single Web Deployment package (WDP). xcSingleMsDeployPackageUrlThe HTTP(s) URL for an XConnect Single (WDP). authCertificateBlobA Base64-encoded blob of the authentication certificate in PKCS #12 format ( .pfx). See the deployment command example in the next section for encoding instructions.authCertificatePasswordThe password for the authentication certificate. templateLinkAccessTokenThe access token for the nested infrastructure and application templates. For example, Azure Storage Explorer can generate a SAS token for you to access the location where the templates were uploaded. xDB ScaledParameter Description locationThe geographical region of the current deployment. sqlServerLoginThe name of the administrator account being created for Azure SQL server. sqlServerPasswordThe password for the administrator account being created for Azure SQL server. sitecoreAdminPasswordThe password for the administrator account for your instance of XP. repAuthenticationApiKeyA unique value, for example, a GUID, which is used to authenticate when communicating from Content Management role to the Reporting Web App. The minimum length required is 32 characters. prcMsDeployPackageUrlThe HTTP(s) URL for a Sitecore xDB Processing WDP. repMsDeployPackageUrlThe HTTP(s) URL for a Sitecore xDB Reporting WDP. xcRefDataMsDeployPackageUrlThe HTTP(s) URL for an XConnect Reference Data service WDP. xcCollectMsDeployPackageUrlThe HTTP(s) URL for an XConnect Collection service WDP. xcSearchMsDeployPackageUrlThe HTTP(s) URL for an XConnect Collection Search service WDP. maOpsMsDeployPackageUrlThe HTTP(s) URL for a Marketing Automation service WDP. maRepMsDeployPackageUrlThe HTTP(s) URL for a Marketing Automation Reporting service WDP. authCertificateBlobA Base64-encoded blob of the authentication certificate in PKCS #12 format ( .pfx). See the deployment command example in the next section for encoding instructions.authCertificatePasswordThe password for the authentication certificate. templateLinkAccessTokenThe access token for the nested infrastructure and application templates. For example, Azure Storage Explorer can generate a SAS token for you to access the location where the templates were uploaded. -
Optionally, you can also append additional parameters to the
azuredeploy.parameters.jsonfile by extending it with any parameter declared inazuredeploy.json. TheREADME.mdfile in the root folder for each Sitecore environment configuration gives additional information.NoteThe
azuredeploy.parameters.jsonfile includes thesiMsDeployPackageUrl, however you must download the Sitecore Identity package separately as it is not included by default. -
You can override the default “
Extra Small” value of thesitecoreSKUparameter for any scaled topology (XP, XM, xDB), and change it to "Small", "Medium", "Large" and "Extra Large". For example, to change it to Medium, use the following:
Deploy with Solr as a search provider
Azure Cognitive Search is the default provider for Azure deployments. You can choose to use Solr as an alternative to Azure Cognitive Search. The Solr server is not provisioned by an ARM template, therefore after deploying to Azure, you must manually create a template and populate it with with Solr cores. To use the Solr server when the Azure Cognitive Search resource is not being provisioned, pass the parameters in the following tables:
XM Scaled and XM Single
| Parameter | Description |
|---|---|
solrConnectionString | The connection string to the existing Solr server that passes to the Sitecore Platform roles. |
XP Scaled
| Parameter | Description |
|---|---|
solrConnectionString | The connection string to the existing Solr server that will passes to the Sitecore Platform roles. |
xcSearchMsDeployPackageUrl | A blob storage (HTTPS) URL to the Solr XConnect Search web deploy package. |
xcSolrConnectionString | (Optional) The connection string to your existing Solr server that passes to the XConnect roles. If you do not specify the parameter, the default value will equal: solrConnectionString. |
XP Single
| Parameter | Description |
|---|---|
solrConnectionString | The connection string to an existing Solr server that passes to the Sitecore Platform roles. |
xcSolrConnectionString | (Optional) The connection string to your existing Solr server that passes to the XConnect roles. If you do not specify the parameter, the default value will equal: solrConnectionString. |
xcSingleMsDeployPackageUrl | The HTTP(s) URL to a Solr XConnect Single web deploy package. |
xDB Scaled
| Parameter | Description |
|---|---|
xcsolrConnectionString | The connection string to the existing Solr server that passes to the XConnect roles. If you do not specify the parameter, the default value is: solrConnectionString. |
xcSearchMsDeployPackageUrl | A HTTPS URL to the Solr XConnect Search web deploy package. |
xDB Single
| Parameter | Description |
|---|---|
xcsolrConnectionString | The connection string to the existing Solr server that passes to the XConnect roles. |
xcSingleMsDeployPackageUrl | The HTTP(s) URL to a Solr XConnect Single web deploy package |
Invoke the deployment command and start provisioning
To invoke the PowerShell command and initiate provisioning:
If you use SAT version 2.5, refer to this section: Invoke the deployment command and start provisioning using SAT 2.5
-
In PowerShell, in the Sitecore Azure Toolkit folder, load the Sitecore Azure Toolkit module:
Import-Module .\tools\Sitecore.Cloud.Cmdlets.psm1. -
Add the following Azure account to your PowerShell session:
Add-AzureRMAccount. -
If you have access to multiple subscriptions, select the subscription that you want to deploy to:
Set-AzureRMContext -SubscriptionName "<name of the subscription>". -
Start provisioning by using the
Start-SitecoreAzureDeploymentcommandlet:Start-SitecoreAzureDeployment [-location] <String> [-Name] <String> [-ArmTemplateUrl] <String> [-ArmParametersPath] <String> [-LicenseXmlPath] <String>; [-SetKeyValue] <Hashtable>The
Start-SitecoreAzureDeploymentcommandlet accepts the following parameters:Parameter Description LocationThe name of the Azure datacenter where you want the resources deployed. The Azure datacenter compatibility table lists the Microsoft Azure datacenters that the Sitecore Experience Platform supports deployment to. NameThe name of the resource group for the new environment. It can refer to a new or an existing resource group, and is usually the same as the deployment ID. ArmTemplateUrlThe URL of the ARM template file for the environment configuration that you want to deploy. It points to the HTTP(S) location that is hosting the templates.
If you are pointing to GitHub, use raw links, for example:https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore%209.0.0/xp/azuredeploy.jsonNoteFor nested templates to work, you must deploy them to storage available for the Azure ARM engine.
ArmParametersPathThe path to the populated azuredeploy.parameters.jsonfile for the template that you selected.LicenseXmlPathThe path to the Sitecore license file that you want to deploy to the environment. SetKeyValueA dictionary of environment-specific parameters that are in addition to the parameters in the azuredeploy.parameters.jsonfile. You can use this to pass the client authentication certificate while encoding it to Base64, as shown in the following full script example. This ensures it meets the parameters requirement.Full script example:
-
Run the script and wait while the environment fully provisions.
Invoke the deployment command and start provisioning using SAT 2.5
If you use SAT version 2.5, you must follow a slightly different procedure to initiate provisioning:
-
Import the required module Az.Accounts:
Import-Module Az.Accounts. -
Connect the following Azure account to your PowerShell session:
Connect-AzAccount. -
If you have access to multiple subscriptions, select the subscription that you want to deploy to:
Set-AzContext -SubscriptionId "id of the subscription". -
Start provisioning by using the
Start-SitecoreAzureDeploymentcommandlet:Start-SitecoreAzureDeployment [-location] <String> [-Name] <String> [-ArmTemplateUrl] <String> [-ArmParametersPath] <String> [-LicenseXmlPath] <String>; [-SetKeyValue] <Hashtable>Full script example:
-
Run the script and wait while the environment fully provisions.