Deploy Sitecore-9.1.1 XP Scaled as Paas in Azure

5/8/2019

Steps to install Paas environment in Azure

 

Sitecore Version - 9.1.1

1. Get latest Sitecore Azure toolkit from here - https://dev.sitecore.net/Downloads/Sitecore_Azure_Toolkit.aspx It is backward compatible so latest version should support all older Sitecore versions. Save this to C:/Sitecore/Azure (it is just my preference)

2. Get Sitecore ARM Templates from Sitecore's Github account - https://github.com/Sitecore/Sitecore-Azure-Quickstart-Templates, as we are installing sitecore9.1.1 XP scaled here download and copy it to C:/Sitecore/Azure/Sitecore9.1.1/XP folder.

3. Get Sitecore web deploy packages for 9.1.1 from https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/91/Sitecore_Experience_Platform_91_Update1.aspx Download from Azure app service and XP Scaled. Unzip it. 

4. Get Sitecore identity web deploy packages from https://dev.sitecore.net/Downloads/Sitecore_Identity/ 

Create Azure storage account to store all the files downloaded in step 3 and step 4, open portal.Azure.com (If you already don't have a subscription, create a new one with 30-day trial) Search for the storage account and create new let's say we call them SC911XPResources in a resource group (new one) if it does not already exist.

Microsoft has a tool called "Microsoft Azure storage explorer " which helps us upload the files to Azure, download it from - https://azure.microsoft.com/en-gb/features/storage-explorer/

Upload all files to your storage account - it will take a while as the files are around 1.3 GB.

In the meantime, let's modify the ARM templates which we downloaded in step 2. Open C:/Sitecore/Azure/Sitecore9.1.1/XP/azuredeploy.parameters.json change the values of below parameters:

  • deploymentId = "Sc911XPScaled" (This will be used in the creation of resource group in Azure)
  • location = "uksouth" (Try to get this value from your Azure subscription)
  • sitecoreAdminPassword = "xXXXXxxxxxx" (Please make sure it is more than 8 charecters)
  • licenseXml : normally I store license file in C:/Sitecore/Files/License.Xml Specify that like "C:\\Sitecore\\Files\\License.Xml"
  • repAuthenticationApiKey : This a unique guid which helps in communication with CM and reporting servers. Create a unique guid online and assign it here. Store this for future purposes.
  • sqlServerLogin - Give any username that you prefer for sql server.
  • sqlServerPassword - Any strong password
  • authCertificateBlob - Leave this empty for now, we will add this in our ARMInstall powershell script.
  • authCertificatePassword - If you are using a self-signed certificate that you created for Solr use "secret".
  • Add new attribute like allowInvalidClientCertificates with value as true.
"authCertificateBlob": {
      "value": ""
    },
    "authCertificatePassword": {
      "value": "secret"
    },
	"allowInvalidClientCertificates": {
	  "value" : true
	},
 "siMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore.IdentityServer.2.0.0-r00157.scwdp.zip"
    },
    "cmMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore 9.1.1 rev. 002459 (Cloud)_cm.scwdp.zip"
    },
    "cdMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore 9.1.1 rev. 002459 (Cloud)_cd.scwdp.zip"
    },
    "prcMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore 9.1.1 rev. 002459 (Cloud)_prc.scwdp.zip"
    },
    "repMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore 9.1.1 rev. 002459 (Cloud)_rep.scwdp.zip"
    },
    "xcRefDataMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore 9.1.1 rev. 002459 (Cloud)_xp1referencedata.scwdp.zip"
    },
    "xcCollectMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore 9.1.1 rev. 002459 (Cloud)_xp1collection.scwdp.zip"
    },
    "xcSearchMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore 9.1.1 rev. 002459 (Cloud)_xp1collectionsearch.scwdp.zip"
    },
    "cortexProcessingMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore 9.1.1 rev. 002459 (Cloud)_xp1cortexprocessing.scwdp.zip"
    },
    "cortexReportingMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore 9.1.1 rev. 002459 (Cloud)_xp1cortexreporting.scwdp.zip"
    },
    "maOpsMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/Sitecore 9.1.1 rev. 002459 (Cloud)_xp1marketingautomation.scwdp.zip"
    },
    "maRepMsDeployPackageUrl": {
      "value": "#AzureStorageURL#/sitecore-911-xp-scaled/Sitecore 9.1.1 rev. 002459 (Cloud)_xp1marketingautomationreporting.scwdp.zip"
    },

 

Make sure your "siMsDeployPackageUrl" is right, as this needs to be downloaded separately like mentioned above in 4th step.

Save the file locally, we can keep this file in Azure blob storage but not necessary.

We have all the resources ready. Let's create a PowerShell script which installs Sitecore in Azure. 

 

$SCSDK = "C:\Sitecore\Sitecore Azure Toolkit 2.2.0 rev. 190305\tools\Sitecore.Cloud.Cmdlets.psm1"
$SCARMTemplate = "https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore%209.1.1/XP/azuredeploy.json"
$DeploymentId = "sc911-xpscaled"
$LicenseFile = "C:\Sitecore\Files\license.xml"
$CertificateFile = "C:\Sitecore\Certificates\solr-ssl.keystore.p12"
$SubscriptionId = "#Replace me with subscription value from Azure#"
$Location = "#Replace me with value from Azure#"
$ParamFile = "C:\Sitecore\Azure\Sitecore9.1.1\XP\azuredeploy.parameters.json"
$Parameters = @{
"authCertificateBlob" = [System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes($CertificateFile))
}

##Initialize
Import-Module $SCSDK

Add-AzureRmAccount

Set-AzureRmContext -subscriptionId $SubscriptionId

##Arm Template Installation
Start-SitecoreAzureDeployment -Name $DeploymentId -Location "uksouth" -ArmTemplateUrl $SCARMTemplate -ArmParametersPath $ParamFile -LicenseXmlPath $LicenseFile -SetKeyValue $Parameters

Like I mentioned above we need to provide an SSL certificate as a base64 string. Copy the file that was created while creating an SSL certificate for SOLR. Copy it from C:/Solr/server/etc/solr-ssl-keystore.p12 to C:/Sitecore/Certificates/solr-ssl-keystore.p12 and assign this to $Certificate file.

We are now good to run the script. Make sure you open your PowerShell with admin privileges and set the execution policy to unrestricted. 

set-executionpolicy unrestricted

If you ended up with an error(due to the wrong web deploy packege URL's ), delete the resource group and re-run the script.

Comment out any issues you may find. Happy to help!