Installing Sitecore 9 on Mircosoft Azure Cloud as PaaS : Know your options

Installing Sitecore 9 on Microsoft Azure Cloud as PaaS has never been easier than before. There are 2 main routes that you can take:

  1. Install via Azure Market Place
  2. Install via Sitecore Azure ARM Templates

I have blogged about both options 1 and option 2 previously, but with Sitecore 9 release there are some updates. This blog is just a follow up about the changes since last release and it is based upon Sitecore 9.0 and Sitecore Azure Toolkit 2.0.

Option 1 : Install via Azure Market Place

The Azure Market Place module for Sitecore has been updated with a nice 4 step wizard. The configuration wizard will ask you to choose your Sitecore version, choose your region, add your own credentials, review legal terms and conditions, click the magic button and let Azure do its business.

I believe any non-technical person with an Azure account can do this installation without any help or bugging IT to setup servers for Sitecore 9. Bonus information, you can tick the box for Sitecore Experience Accelerator 1.5 during the installation wizard and SXA will be installed as well for you to play around with 80+ pre-built components like Carousel, Gallery and so on. The following screen shot from the Azure portal is showing different resources that were deployed successfully after I ran the Sitecore installation wizard for Single  (CM & CD combined) size.

Option 2 : Install via Azure ARM Templates

This is slightly more technical option as you will need to manually configure ARM templates (read JSON files) and use Windows Powershell. I have blogged in detail about this earlier so I will not go in details this time. I will only mention what I found was different for Sitecore 9 installation and the issues I ran into during the installation process.

There were 2 changes:

  1. You have to supply a secure certificate’s blob and it’s password within the parameters file.
  2. You have to use ArmTemplateUrl parameter instead of ArmTemplatePath  for the Start-SitecoreAzureDeployment command.

As given on the Sitecore documentation site, you need to generate the self-assigned certificate, export it and get its blob. I have combined the scripts into a single script and added additional code to get the blob so you can easily get the required secure certificate blob by running the following script:

PS C:\azure\sitecore-azure-2.0> .\self-assigned-ssl.ps1

#generate certificate
$thumbprint = (New-SelfSignedCertificate `
Subject "CN=$env:COMPUTERNAME @ Sitecore, Inc." `
Type SSLServerAuthentication `
FriendlyName "$env:USERNAME Certificate").Thumbprint
#export certificate with password
$certificateFilePath = "C:\Temp\$thumbprint.pfx"
Export-PfxCertificate `
cert cert:\LocalMachine\MY\$thumbprint `
FilePath "$certificateFilePath" `
Password (Read-Host Prompt "Enter password that would protect the certificate" AsSecureString)
#convert it to base64 string (blob)
$fileContentBytes = get-content $certificateFilePath Encoding Byte
[System.Convert]::ToBase64String($fileContentBytes) | Out-File "C:\Temp\$thumbprint.txt"
Write-Host "Your secure certificate blob is located at C:\Temp\$thumbprint.txt"

I wanted to deploy the XP topology so I updated the azuredeploy.parameters.json file on my local machine with information as below:

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"deploymentId": {
"value": "SitecoreXP1"
},
"location": {
"value": "East US"
},
"sitecoreAdminPassword": {
"value": "supersecretpassword!@#$%^"
},
"licenseXml": {
"value": ""
},
"repAuthenticationApiKey": {
"value": "A1E78E53688340BABF648678802EC11C123456"
},
"sqlServerLogin": {
"value": "sitecore_9admin"
},
"sqlServerPassword": {
"value": "supersecretpassword!@#$%^"
},
"cmMsDeployPackageUrl": {
"value": "https://sitecorecloud.blob.core.windows.net/sitecore-9cloud/Sitecore%209.0.0%20rev.%20171002%20(Cloud)_cm.scwdp.zip?st=2017-11-03T15%3A29%3A00Z&se=2017-11-04T15%3A29%3A00Z&sp=rl&sv=2016-05-31&sr=b&sig=dLLKTVrTT5fP34HZ6ui9HKt9LmMN41A6Y%2BfgmBZL6F0%3D"
},
"cdMsDeployPackageUrl": {
"value": "https://sitecorecloud.blob.core.windows.net/sitecore-9cloud/Sitecore%209.0.0%20rev.%20171002%20(Cloud)_cd.scwdp.zip?st=2017-11-03T15%3A29%3A00Z&se=2017-11-04T15%3A29%3A00Z&sp=rl&sv=2016-05-31&sr=b&sig=90Ou5P8qZt2GhzayVIZHou2Tdnlfeoi%2BRUkTXKQOUGc%3D"
},
"prcMsDeployPackageUrl": {
"value": "https://sitecorecloud.blob.core.windows.net/sitecore-9cloud/Sitecore%209.0.0%20rev.%20171002%20(Cloud)_prc.scwdp.zip?st=2017-11-03T15%3A29%3A00Z&se=2017-11-04T15%3A29%3A00Z&sp=rl&sv=2016-05-31&sr=b&sig=KpPs6v0dhWDvu4WpTTjnmw9QLwnrsYPgr1AicpmEFxM%3D"
},
"repMsDeployPackageUrl": {
"value": "https://sitecorecloud.blob.core.windows.net/sitecore-9cloud/Sitecore%209.0.0%20rev.%20171002%20(Cloud)_rep.scwdp.zip?st=2017-11-03T15%3A29%3A00Z&se=2017-11-04T15%3A29%3A00Z&sp=rl&sv=2016-05-31&sr=b&sig=uKb8uYMf%2FULOZH6ZbyrwVzz9ozxooXirrRwQvFwxMC8%3D"
},
"xcRefDataMsDeployPackageUrl": {
"value": "https://sitecorecloud.blob.core.windows.net/sitecore-9cloud/Sitecore%209.0.0%20rev.%20171002%20(Cloud)_xp1referencedata.scwdp.zip?st=2017-11-03T15%3A29%3A00Z&se=2017-11-04T15%3A29%3A00Z&sp=rl&sv=2016-05-31&sr=b&sig=66FrnMPFxHqRIt0CCQjZEkfF8ZyH14nWbEh2nlqqKts%3D"
},
"xcCollectMsDeployPackageUrl": {
"value": "https://sitecorecloud.blob.core.windows.net/sitecore-9cloud/Sitecore%209.0.0%20rev.%20171002%20(Cloud)_xp1collection.scwdp.zip?st=2017-11-03T15%3A29%3A00Z&se=2017-11-04T15%3A29%3A00Z&sp=rl&sv=2016-05-31&sr=b&sig=gNLXU56JNsNSxtBt%2FeZDlr4sWOdf%2BQ9TidXlCpJoVeI%3D"
},
"xcSearchMsDeployPackageUrl": {
"value": "https://sitecorecloud.blob.core.windows.net/sitecore-9cloud/Sitecore%209.0.0%20rev.%20171002%20(Cloud)_xp1collectionsearch.scwdp.zip?st=2017-11-03T15%3A29%3A00Z&se=2017-11-04T15%3A29%3A00Z&sp=rl&sv=2016-05-31&sr=b&sig=sSfSWywpvipHi37Q%2BiotSzG5UFd4xhD%2BP4Ueo4ytl5Y%3D"
},
"maOpsMsDeployPackageUrl": {
"value": "https://sitecorecloud.blob.core.windows.net/sitecore-9cloud/Sitecore%209.0.0%20rev.%20171002%20(Cloud)_xp1marketingautomation.scwdp.zip?st=2017-11-03T15%3A29%3A00Z&se=2017-11-04T15%3A29%3A00Z&sp=rl&sv=2016-05-31&sr=b&sig=%2BU0Tu0Bu5xjJeq9F1kmmiD62%2FO024g7h3wSo%2FqcCUaw%3D"
},
"maRepMsDeployPackageUrl": {
"value": "https://sitecorecloud.blob.core.windows.net/sitecore-9cloud/Sitecore%209.0.0%20rev.%20171002%20(Cloud)_xp1marketingautomationreporting.scwdp.zip?st=2017-11-03T15%3A29%3A00Z&se=2017-11-04T15%3A29%3A00Z&sp=rl&sv=2016-05-31&sr=b&sig=gwioRuyaNscwyrZstrcTw%2BR3VGIS%2FrFC7Vy2%2BTjX%2F9o%3D"
},
"authCertificateBlob":{
"value": "MIIKiQIBAzCCCkUGCSqGSIb3DQEHAaCCCjYEggoyMIIKLjCCBgcGCSqGSIb3DQEHAaCCBfgEggX0MIIF8DCCBewGCyqGSIb3DQEMCgECoIIE9jCCBPIwHAYKKoZIhvcNAQwBAzAOBAgewxbSXeVGjwICB9AEggTQUP7Eot7b8vMkaOYou2xPbm4vRhv+U44QEV3pofJaKi8fD7sLKA/oFhaNql5klNzLr6nXCSHf4h7siplso3lfyAUsJw7Xjcg0wQ6oz+ZKPlf07mnngGvHLRtV1+elx1N3I2wvB/iaTTLU+Ioptgvtm4+1ifcqz+eYo6QLRS8nuidsnbExKjd7+VeXQXhK5Dk9vOqs2CHy/I6IF73zl4240tZwKezP7ZJW+OfRuu4CsjoIlYS2VTlOkL+YMSSKckyzLhnu1SBVa81Ln3BFjvNa1rdBFXBYThQ37ovusWi1x4jasT3xlbWk6x0wx7HwYjjfIVOWoZPnud5cyqjmQGCwQfNJHvhFv+vZ2TTBCvvX87XzjbvxTzXPD8JW3IRJbXmYZ1/PYukuavbZAjtj3HZz5T8Y52mwSjPvXvW6mBG+Ihak2+Mw7j7euEmFcgCSnjPgaTFqb+1AbFriUNCIzz+sBClKQuvI5oV82/3wdP0JT0C7Epx0ULQMyosI2HMyyNKVxLvjr/ywwDCuuRjWDLCZl4OR+VVyA3x+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QUHAwIGCCsGAQUFBwMBMB0GA1UdDgQWBBRjqf2JXl2A+vQTsAhsPmE+0tf8rjANBgkqhkiG9w0BAQsFAAOCAQEAduaVCMZAxVTKoZQKk7CAPvuU/td0ryuPa87vsaI0453BhUp4V2LczJfoFzdT0Exv5WswBmwuiIJJPOdpnh+KLGOa1sef7l2d+sjvtc9hpai+ntEwhckrUr4rodh/yNPpMQuzqDSUKNvWlVJIpx6XWwcPsJtri/+4UkIm9Ph2VGO7YBGxY3L2Q+eaaKia0ifr4rd7qrX5BhMj4dpInbXzisrQytQ4pPk3FMjao0M41aTVbhS4FIey23wRdxvLIhw245ReQ5D4QHjMQtcqNM8FvVRZWxTtNKRrhFniWLZToDICf3AUBQ1rqbEqJoMaLI7thEnPWPWVp3VsQ5wXmGUt7DGBqjATBgkqhkiG9w0BCRUxBgQEAQAAADBBBgkqhkiG9w0BCRQxNB4yAE4AYQB2AGUAZQBkAF8AQQBoAG0AYQBkACAAQwBlAHIAdABpAGYAaQBjAGEAdABlAAAwUAYKKwYBBAGCNxEDRzFCBEBFAFAAVQBTAE0AQwBMAFcAMAAwADkAMwAuAHAAcgBpAG4AYwBlAHQAbwBuAC4AZQBwAGEAbQAuAGMAbwBtAAAAMDswHzAHBgUrDgMCGgQUDcd6RVwUuy5FM7AIpITcm/ZavlwEFF6V8r2Wucj8XmunCPH6IVecp7JIAgIH0A=="
},
"authCertificatePassword":{
"value": "secret"
}
}
}

view raw
parametersjson
hosted with ❤ by GitHub

Then I created a xp1install.ps1 file with parameters and raw link to the ArmTemplateUrl from the quick start templates section: (this is optional step, you can enter these values directly in PowerShell too)

$licenseFile = "C:\azure\sitecore-azure-2.0\license.xml"
$ArmTemplateUrl = "https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore 9.0.0/XP/azuredeploy.json";
$ArmParametersPath = "C:\azure\sitecore-azure-2.0\xp\azuredeploy.parameters.json";
$RGName = "SitecoreXP1";
$DeploymentID = "SitecoreXP1"
$location = "East US";
Start-SitecoreAzureDeployment location $location Name $RGName ArmTemplateUrl $ArmTemplateUrl ArmParametersPath $ArmParametersPath LicenseXmlPath $licenseFile

view raw
xp1install.ps1
hosted with ❤ by GitHub

From the Windows Powershell command line, navigated to the Sitecore Azure Toolkit 2.0 folder and ran this command

PS C:\azure\sitecore-azure-2.0> .\xp1install.ps1

Waited about an hour or so and the XP installation was up and running on Microsoft Azure Platform.

 

If you look closely in the screen grabs above, 19 resources were deployed during the single type of installation and 31 resources were deployed during the XP installation.

Errors during Azure ARM

I ran into 2 errors during the Azure ARM deployment:

Error 1 – InvalidTemplate Error

New-AzureRmResourceGroupDeployment : 2:34:31 PM – Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The template resource 'templateLinkBase' at line '28' and column '30' is not valid: The language expression property 'templateLink' doesn't
exist, available properties are 'template, parameters, mode, provisioningState'.. Please see https://aka.ms/arm-template-expressions for usage details.'.
At C:\azure\sitecore-azure-2.0\tools\Sitecore.Cloud.Cmdlets.psm1:112 char:35
+ … eployment = New-AzureRmResourceGroupDeployment -Name $Name -ResourceG …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
New-AzureRmResourceGroupDeployment : The deployment validation failed
At C:\azure\sitecore-azure-2.0\tools\Sitecore.Cloud.Cmdlets.psm1:112 char:35
+ … eployment = New-AzureRmResourceGroupDeployment -Name $Name -ResourceG …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureRmResourceGroupDeployment], InvalidOperationException

Initially, I was using ArmTemplatePath and was providing the full path to the template on my local machine, but it turns out, that I needed to provide ArmTemplateUrl as mentioned in this blog. Supplying the correct parameter with Github’s path resolved this error.

Error 2 – Cannot find certificate

New-AzureRmResourceGroupDeployment : 6:18:47 PM – Resource Microsoft.Web/certificates 'sitecore-9cloud-auth' failed
with message '{
"Code": "NotFound",
"Message": "Cannot find Certificate with name sitecore-9cloud-auth.",
"Target": null,
"Details": [
{
"Message": "Cannot find Certificate with name sitecore-9cloud-auth."
},
{
"Code": "NotFound"
},
{
"ErrorEntity": {
"ExtendedCode": "51004",
"MessageTemplate": "Cannot find {0} with name {1}.",
"Parameters": [
"Certificate",
"sitecore-9cloud-auth"
],
"Code": "NotFound",
"Message": "Cannot find Certificate with name sitecore-9cloud-auth."
}
}
],
"Innererror": null
}'
At C:\azure\sitecore-azure-2.0\tools\Sitecore.Cloud.Cmdlets.psm1:115 char:35
+ … eployment = New-AzureRmResourceGroupDeployment -Name $Name -ResourceG …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep

view raw
nocertificate.txt
hosted with ❤ by GitHub

I was supplying the path to the certificate instead of the base64 encoded string. Thanks to the Sitecore Slack community that came to the rescue and I was able to resolve this by generating the secure certificate correctly and supplying it’s blob value.

I hope it is going to help if you are doing Azure ARM deployments with Sitecore 9 in coming days!

Thanks.

One thought on “Installing Sitecore 9 on Mircosoft Azure Cloud as PaaS : Know your options

  1. Hey!
    Thanks for your post! I am trying to deploy with first solution (via Azure Market Place), and as soon I click on “Configure required settings”, I have an error message ( I used the same resource group name):

    Important Notice:
    Marketplace cannot currently deploy to resource groups that contain certain characters in their name, for example underscore, due to Microsoft naming rules for Azure resources.
    Marketplace currently cannot deploy Sitecore in the first try of a fresh login session, Please retry on the same login session if there is no Submitting for deployment or Deployment in progress notification message after you started a new deployment.

    Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.