You are here: Home » Enterprise Search » Running Solr with Jetty on Jelastic
It’s been a while since I don’t blog, about eight months have gone really fast in Amsterdam! Meanwhile I wrote a few articles on SearchWorkings.org, the community site for search professionals. In fact, as you may have noticed from my tweets I’m getting more and more involved in enterprise search and open source projects. In this post I’m gonna write about Jelastic, the next generation of Java hosting platforms. I gave it a try deploying Apache Solr on the cloud and I thought it might be a good idea to share what I did. But be aware that I haven’t done anything in a distributed manner, I only deployed a single Solr instance.The following are the steps to deploy Solr on Jelastic with Jetty, you can enlarge each image just clicking on it.
- Download the latest version of Solr (actually 3.6) and extract the downloaded archive, we’ll use later the included war file.
- Log into the Jelastic Manager
- Create a new environment
- Let’s choose our environment topology: one Jetty 6 node, JDK 6 and our environment name, then let’s just wait a little for our environment to be created
- It’s now time to upload our Solr war package: you can find it within the Solr archive previously downloaded, directory dist. It’s called apache-solr-3.6.0.war
- Create the solr home: if you already worked with Solr you know it needs an external home directory, which you have to configure as environment variable. You need to create the solr home directory layout on Jelastic. I used a really simple configuration containing two cores and really basic solrconfig.xml and schema.xml. Unfortunately, as far as I know you can’t actually upload to Jelastic a complete directory or a zip file and extract it on the server, so I had to manually create the directory structure and then upload the files in the right place, obtaining the directory layout you can see in the image below
- The next thing to do is configuring the solr home environment variable in order to tell Solr where the configuration files are. I did that adding the line
to the variables.conf file within the server directory
- We are now ready to actually deploy Solr on our application server: let’s do that through the Deployment Manager tab, selecting the war file we previously uploaded and deploying it to the jetty node we’ve created, choosing the desired context (ROOT in my case)
- Here it is!
I think Jelastic is a great platform, which works fine out of the box. Just two little annoying things I’ve noticed until now:
- if you need to upload several files the manual way is not that handy, maybe there will be some improvement on that side, knowing that those guys are working really hard
- when you deploy an application server you see it running but you don’t have a feedback about the deploy operation. I think it would be handy to see if there are errors within the log files or at least tell the user that something might went wrong in that case. But that’s more a wish than a real feature need!