Getting started with Sitecore on Azure PaaS

So now that Sitecore 8.2 update 1 has been released, we can finally stop using the Sitecore Azure module and go use the true power of Azure PaaS.

Be aware that at this point in time Sitecore only has an XP1 and XM1 delivery using the Azure Resource Manager (ARM) templates – more on ARM here – and XM1 only on the Azure Marketplace. Keep your eyes peeled for further updates on this, as other options will be released.

Before we get into this, make sure you have the following installed on your machine:

By now, you should have downloaded the ARM templates for Sitecore – or alternatively you can also use the Azure Marketplace to install Sitecore on Azure as well, so lets see how this works.

First of all, Sitecore’s ARM templates will not create the MongoDBs for us, so we need to start by getting that set up. I’m going to use mLab‘s free Sandbox tier for that in this blog post, but feel free to use other options (such as the xDB Cloud offering by Sitecore themselves).

mongodbsetup

At the moment of writing I can’t select Azure’s West Europe (Amsterdam) location, as mLabs does not provide a single node there (the only option that’s free).

mlabsdb

I’ll need to create the database for each of the MongoDBs. After the creation of my database is complete, I just add a user to each as well and copy and paste the connectionstring it’s giving me into the appropriate xX.Template.params.json file. In this file, I need to change:

  • The connection strings to all 3 MongoDB connection strings: analytics, tracking_live and tracking_contact – these need to be set to the correct connection strings given to us in the mLabs overview
  • sqlserver.login – the username for the sql server user. This user will be created in the databases automatically
  • sqlserver.password – the password to use for the user created (make sure this has 8 or more characters or an error will be thrown)

Lastly, I need to update the PowerShell script Run.ps1 to use the correct parameters. I need to set the following options:

  • $ArmTemplatePath – needs to be set to the correct xX.Template.json file location
  • $ArmParametersPath – needs to be set to the file location of our updated .params.json file
  • $licenseFileContent – this needs to point to a valid license.xml file
  • $Name – the name for the deployment
  • $location – the Azure region to deploy in. A good overview can be found here, including which functionality is or isn’t available in the region. Make sure the region you select supports Azure Search – not all of them do.
  • $AzureSubscriptionId – Your subscription ID to use for the deployment. You can find this in the ‘Billing’ blade in the Azure portal.

As an additional (optional) change, one could set up a principle service and use that. I just want to get up-and-running ASAP, so I’ll take the manual login option instead for which I don’t have to make any changes.

I also noticed that in my xP1.Template.json file the Application Insights were set to the location of “Central US”:

{
  "type": "Microsoft.Insights/Components",
  "name": "[variables('appInsightsNameTidy')]",
  "apiVersion": "[variables('appInsightsApiVersion')]",
  "location": "Central US",
  "properties": {
    "ApplicationId": "[variables('appInsightsNameTidy')]",
    "Application_Type": "web"
  },
  "tags": {
    "provider": "[parameters('sitecoreTags').provider]"
  }
}

That’s technically fine, but I’d rather have it in the same region as my other resources, so changed the “location” line to the following instead:

"location": "[variables('resourceGroupLocation')]",

Of course, you’ll need to make sure that location supports the Application Insights.

After this I’m all set so I can run the PowerShell Script. It is at this point that you can safely go get a cup of tea, as this will take a little while. In fact, my deployment took 23 minutes and 49 seconds. I didn’t bother moving the blobs used to install Sitecore in my own data center so I could’ve had an even faster deployment – but just under 24 minutes is still pretty impressive, no?

environment

Advertisements

6 thoughts on “Getting started with Sitecore on Azure PaaS

  1. Pingback: Deploying code to Sitecore on PaaS | Sitecore and such

  2. Pingback: Application Insights for Sitecore (or, where have my logfiles gone?) | Sitecore and such

  3. Pingback: Automatically scale Sitecore on Azure PaaS | Sitecore and such

  4. Pingback: The brave new world of Azure PaaS | Jeremy Davis

  5. Pingback: On the second day of Christmas… two Sitecore PaaS features | Agile and ALM

  6. Pingback: Sitecore on Azure… With Unicorn | Sitecore and such

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s