Apache SOLR makes it easy to add search capability into your Java apps. SOLR is a search server (backed by the Lucene serach library). This repository provides a way for you to take advantage of that in OpenShift.
(1) A Dockerfile
This overrides the official SOLR image to tweak a few things in order to run SOLR efficiently on OpenShift.
FYI, you don't have to build the image, you can use a prebuilt image - I'll try to keep updated versions of it available on docker hub.
(2) S2I scripts (comging soon)
These are to allow you to easily push your project specific configuration files in to SOLR.
Sounds cool right? It is. And here's how you can use it.
Create the SOLR app from a Docker image
> oc new-app dudash/openshift-solr --name=solr-imageonly-demo
Now you can access it via the route that was automatically exposed on port 8983 and whereever your OpenShift apps route (e.g. openshift-solr-myproject.127.0.0.1.nip.io). Note: this won't autogenerate a SOLR core.
-
Create a repo
-
Create a folder called
conf
and add SOLT config files for your desired SOLR configuration (See here for an example). -
Create a new app using oc CLI (this will also create the SOLR core and inject your configuration). Note: if your 'conf' dir isn't at the root of your repo, you'll need to append '--context-dir=PATH'
> oc new-app dudash/openshift-solr~https://github.com/[YOU]/[YOUR-REPO].git --name=solr-demo
Now you can access it via the route that was automatically exposed on port 8983 and whereever your OpenShift apps route (e.g. openshift-solr-myproject.127.0.0.1.nip.io). And a SOLR core is automatically created for use.
- (optionally) You can import the image stream to make this available in the webconsole of OpenShift
> TBD need to write the image stream template
TBD node selectors to make sure SOLR goes to a node w/ enough memory TBD using with persistent storage
Here is some information about how this all works behind the scenes.
This repo doesn't require the s2i tool to build the image. However, if you look into the Dockerfile, it does set some s2i LABELS in order for OpenShift to be able to use it as an s2i builder image.
TBD
TBD
If you find and issues, go ahead and write them up. If you want to submit some code changes, please see the CONTRIBUTING docs.