We are utilizing sunspot's Solr gem for a while in development mode. The application is now needs to be moved to production environment.
Are there any cons of setting up solr in production environment using the bundled sunspot gem ?
I generally like tomcat + solr idea but it's more complex to set up.
Sunspot bundled gem is easy. Provided that we have 1 rails project in 3 stages (staging,production,QA), 2 app servers and one db/solr server one has to :
- push rails project to db server
- launch solr on db server in production environment with bundle exec rake sunspot:solr:start for (we just use different port for each solr instance)
- reindex with rake sunspot:solr:reindex
- modify sunspot.yml for app server to make them connect to db server on specific stage port
Above is applicable for X instances of production/staging solrs.
Tomcat6 + Sunspot is not so easy and time/result effective. As I understand (fix me) one has to :
- Install and maintain tomcat on db server
- Provided that we want to have 3 solr instances - deploy 3 solr wars with separate solrs (or use the multicore solr which is quite difficult to set up)
- deploy the rails project onto the db server
- Everytime we change our schema/configuration/whatever in rails - we have to take care of generating solr xmls and confs and copy it to tomcat webapps
- Modify the directories in solr conf/xml so it points to index files etc.
- Reload tomcat solr application instance on every rails deploy what includes some scripting and "non-rails" approach to deployment procedure :)