Solr 9.x installation using SIF
One of the most exciting aspects of working with Sitecore is, there is always something to tinker around. For instance, recent versions of Solr or in other words, 9.x version can't be installed with the existing solr scripts that come with the Sitecore installation tool or SIF. To make this work has been in my radar for quite sometime since I couldn't wait for the next Sitecore release when Solr 9.x will also be "probably" accommodated. So, I thought why not have a way to fix the installation scripts now and it would be exciting to compare what Sitecore development team has done when the release occurs later this year. So, here is the blog post for the same. Now, this might not be the perfect way to do the Solr installation since the Solr documentation has a straight forward approach. On the other hand, my goal was to make the existing Sitecore json file to work with Install-SitecoreConfiguration command as well as make it generic for all 9.x versions including 9.8.0 released on 23jan25. Hence this post. For earlier versions of Solr installation as well as link with jdk url, check this post.
Solr 9.x versions download (used as value in SolrSourceURL param):
https://archive.apache.org/dist/solr/solr
For earlier versions, SolrSourceURL param should have this value - http://archive.apache.org/dist/lucene/solr
There are two important changes to the json file:
1. Extract the solr folder from tgz file using Expand-7Zip instead of Expand-Archive since the latter only supports zip file extraction. Concerned steps for reference:
2. Install JDK 11 that is required as a pre-requisite for Solr 9.x - JavaDownloadURL
Figuring out these two inputs as well as adjusting the steps were the actual challenges. Once this was done, the installation was successful. The advantage now is, I just have to pass the needed Solr 9.x version and this one script will do the needful.
============================================
Url/param details as per version:
<=8.4.0:
JavaDownloadURL = https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jre_x64_windows_hotspot_8u242b08.zip
SolrSourceURL = http://archive.apache.org/dist/lucene/solr
>8.4.0 < 9.0.0:
JavaDownloadURL = https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11.1/OpenJDK11U-jdk_x64_windows_hotspot_11.0.9_11.zip
SolrSourceURL = http://archive.apache.org/dist/lucene/solr
>= 9.0.0:
JavaDownloadURL = https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11.1/OpenJDK11U-jdk_x64_windows_hotspot_11.0.9_11.zip
SolrSourceURL = https://archive.apache.org/dist/solr/solr
============================================
In a gist, new flow (9.x) is as follows:
Download .tgz file > Convert to .tar file > Unzip and setup the Solr version
For prior versions, flow was as follows:
Download .zip file > Unzip and setup the Solr version
Note that in order to make Expand-7Zip work, the following command is a prerequisite:
Install-Package 7Zip4Powershell -ProviderName PowerShellGet
Then, execute the PS command as ever with the json file as the input:
Install-SitecoreConfiguration -Path '.\\SCIA-8646 9.8.0-Solr-SingleDeveloper.json'
Finally, here is the JSON file with adjusted inputs and steps:
###################################
###################################
Solr 9.8.0:
Comments
Post a Comment