Solr (or Apache Solr) is an open source enterprise level search engine optimized for high volume and speed. Built on Apache Lucene™, this search engine boasts of advanced full-text search, large scale search, highly scalable fault tolerant performance, near real-time indexing, comprehensive administrative interfaces, and extensible plugin architecture.
Solr can be run as part of your microservice architecture as its own node. In this tutorial we will be doing just that.
To make the process even simpler, we will deploy our Solr instance using an acorn image.
Acorn is a new cloud platform that allows you to easily deploy, develop and manage web services with containerization. A single acorn image can deploy all that you need: from a single container webserver, to a multi service Kubernetes cluster with high availability. Don't worry if you don't understand what all those terms mean; we don't have to know that in order to deploy our server.
Setup an acorn account at acorn.io. This can be a free account for your first deployment, and if you'd like additional storage space you can look into the pro account or enterprise. You will need a Github account to signup as shown in the image below.
First we need to install acorn-cli locally. Choose an install method from the list below:
Linux or Mac
curl https://get.acorn.io | sh
Homebrew (Linux or Mac)
brew install acorn-io/cli/acorn
Windows
Uncompress and move the binary to your PATH
Windows (Scoop)
scoop install acorn
For up to date installation instructions, visit the official docs.
Back in our local command terminal login to acorn.io with:
acorn login acorn.io
Now that we have the acorn cli configured, we can create and deploy our acorn image with a few simple commands. You can modify the volume size (5Gi) or container RAM (2Gi) by editing the run
command.
acorn build -t solr
acorn run -n solr --memory=2Gi -v solr-data,size=5Gi solr
Visit your dashboard to see if your deployment was successful.
Click on the solr deployment, and find the endpoint section on the right side panel. This is your solr dashboard link.
If everything was successful you should see a dashboard like the one below:
If there are any errors check your acorn via the UI or with the following command:
acorn logs -f solr
To ssh into your new server run: acorn exec solr bash
Then press 'enter' to select the first container.
For detailed instructions on working with your Solr server see the getting started and configuration documentation
That's all there is to it. We've now got a solr server up and running from an acorn image.