Sitecore 9: Solr 7.2.1 on Azure PaaS

Sumit Upadhyay07/26/2019


Sitecore 9: Solr 7.2.1 on Azure PaaS

Blog Category :SitecorePublished on: 26 July 2019
sumit blog author
Author : Sumit UpadhyayEmail : info@aienterprise.com

Sitecore 9: Solr 7.2.1 on Azure PaaS

 

As most of the Sitecore installations are moving towards Microsoft Azure, so I thought of getting one for myself. This is the first of the blog series on how to install Sitecore 9.1 on Microsoft Azure.

With Sitecore 9, Lucene is no longer the default search capability. On an On-Premise Sitecore 9 installation, Solr is the default search configured while installing on Azure, either Solr or Azure search can be opted. For my installation, I’ve chosen Solr 7.2.1 which can be installed either as an IaaS or a PaaS (App Service). The Infrastructure as a Service (IaaS) way is similar to the way one would install on a local machine. After provisioning a Virtual Machine on Azure, the steps to get Solr up and running is identical to a local Solr configuration. The interesting bit comes with PaaS configuration, although through this post, I’ll try to show that that is also pretty straight forward and easy to configure.

Microsoft Azure

Prerequisites for installing Solr on Azure PaaS:

  1. A working Microsoft Azure account (I’m using the Free Trial mode which is valid for 1 month and provides with enough credits to configure a number of Solr PaaS instances :P)
  2. Solr 7.2.1 zip which can be downloaded from this link
  3. I’ll upload the Solr files to our PaaS instance through FTP (There are other ways also like Azure Repos, OneDrive, GitHub, etc..) wherein we would require FTP file sharing software. One of the softwares that can be leveraged for this purpose is WinSCP and it can be downloaded from this link
  4. And that is pretty much it, let’s get started

Let’s get started:

Now login to your Azure account by navigating to https://portal.azure.com.

microsoft-azure portal

On the Sidebar, we can see a lot of options at our disposal. Choose “App Services” as we will configure Solr as an App Service.

azureportal-appservice

Clicking on App Services will take us to the dashboard page for App Services. Here we see can all the services already configured as well as create new ones. By clicking on “Add”, we will be able to create a new App Service.

appservice-add

Now the next screens will take us to the page where we will configure values for our new Solr Appservice.

Subscription: As it can be seen for me it’s “Free Trial”.

Resource Group: Every “App Service” needs to be associated with a Resource Group. Resource Group is a logical grouping of multiple app services, databases and other Azure resources. If you don’t have any Resource Group, you can choose “Create new” option to create one like I will do in the subsequent screen.

appservice-create

new-res-grp

Name: Choose any name for the App service

Runtime stack: We’ll choose Tomcat 9.0 for now and subsequently change it to Jetty after our App service is created.

Operating System: We’ll choose Windows as our Operating System.

Region: Any region closer to the current location can be chosen.

create-app-1

Next we move to the “Monitoring” tab. We can either enable or disable the Application Insights.

create-monitoring-1

I have made no changes to the “Tags” tab

create-tags

We can either go to the “Review and create” tab and click on the “Create” button or simply from the current tab itself, we can click on the “Review and create” button present at the bottom

create-review

When we start the creation process, we will be seeing the following screens:

deploy-progress1

 

deploy-progress2

 

 

deploy-complete-1

Once complete, we can click on “Go to resource” to navigate to the app service where we can see all the details related our newly created app service. The “URL” attribute specifies the actual URL which will be used for browsing our solr instance.

Next we can click on the “Configuration” link present at the sidebar as shown and make few more changes so that Solr service is configured properly.

app-created

In the General Settings tab, below are the configuration used:

Stack Settings:

Stack: Java

Java version: Java 8

Java minor version: 1.8 (Auto-update)

Java container: Jetty

Java container version 9.1 (Auto-update)

Platform Settings:

Platform: 64 bit

Managed pipeline version: Integrated

FTP state: All allowed

HTTP version: 1.1

Web Sockets: Off

Always on: On

ARR affinity: On

Debugging

Remote debugging: Off

Incoming client certificates:

Required incoming certificates: Off

app-gen-settings-1

Once these changes are made, we will click on “Save” and click on “Deployment center” to finally deploy our Solr files extracted from the zip download to our Azure app service.

deploy-center

We have various options to upload our Solr files. I will choose the FTP option. After we select FTP, a “dashboard” button will be visible clicking which our FTP Endpoints and App credentials will be displayed

ftp

 

ftp-cred

 

Now we will open the downloaded Solr 7.2.1 zip and extract the contents to a location.

We will upload this extracted content to our app service through WinSCP.

Enter Host name as the FTPS Endpoint from the above screen and user credentials as the App Credentials. Once connected, we will upload the extract Solr files to the “/site/wwwroot” path of our app service.

winscp

 

As it can be seen from the screen above, we will also need to deploy a web.config which contains configuration for the Solr. As we cannot access the Server where we can configure Solr as a service, the web.config will help us achieve this.

The contents of the web.config file is given below:

webconfig-1

Once the file is uploaded, we need to restart our app service and browse it to see Solr dashboard.

solr-up