I recently created a one-click deployment of Solr to Azure as a web app. I also created a separate branch that presets the proper Sitecore indexes. In other words, after the Solr web app is deployed, you can immediately install Sitecore.
The guts of this technique are contained in the ReadMe and follows the technique outlined by Dan Cruickshank.
- Dan's Inspirational Post:
- Vanilla Solr PaaS Install with one-click deploy:
- Solr PaaS Prepped for Sitecore with one-click deploy:
How it works
- The ARM template
azuredeploy.json asks you to set your parameters: subscription, resource group name, app service name, location, solr version, SKU, https only.
- It then deploys an App Service Plan and App Service
- Sets the Solr version in the appSettings (this is needed later)
- Sets TOMCAT Java Container with Java Version 1.8
- Once the App Service has been deployed, it uses the
sourcecontrols resource to pull a copy of the repo onto the App Service
- From here, the
.deployment script is executed. This script does a few things:
- Executes the
- Downloads and extracts the requested Solr version (read from app settings)
- Copies the web.config to the Solr web root (this is detailed in Dan's post)
- Copies default configset
- Adds the
_uniqueKey wonkiness required for Sitecore
- It then iterates over all required Sitecore indexes, creating them all
- xDB indexes are separate as they don't have the
How to use it
Click the 'Deploy to Azure' button and follow the prompts. That's it.
I would not recommend using this in production without further testing. Though I have heard of others using this approach with success. My main use for this deployment utility is to quickly test out new versions of Sitecore or simply create my own sandboxes.
Follow the one-click deploy to have Solr set up in about 10 minutes. Then add the "Sitecore Experience Cloud" resource in Azure. When it asks to specify the Solr URL, just be sure to enter it properly, e.g.
https://mysolrappservice.azurewebsites.net/solr. This approach doesn't require any tinkering of configs, RDP'ing, Kudu'ing. It's painless and it works.