Fork me on GitHub

Running Solr with Jetty on Jelastic

Posted on May 29, 2012 in Development, Enterprise Search, Java

1

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

    Create 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

    Choose topology

  • 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

    Upload Solr war package

  • 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

    Solr home structure on Jelastic

  • 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
    -Dsolr.solr.home=/opt/jetty/home/solr

    to the variables.conf file within the server directory

    Jetty configuration

    Solr home environment variable configuration

  • 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)

    Deploy Solr war to the Jetty node

    Choose context while deploying Solr

  • Here it is!

    Solr deployed on Jetty within Jelastic

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!

Related Posts:

(1) comments

[...] Solr is the blazing fast open source enterprise search platform, which powers the search and navigation features of the world’s largest internet sites. Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, rich document handling, and geospatial search. Here’s a detailed instruction on how to deploy Apache Solr  into Jelastic cloud, written by our friend and customer Luca Cavanna. You can read the original post here. [...]

Write a comment

Notify me of followup comments via e-mail. You can also subscribe without commenting.