Docker Images
incubator-sdap-nexus contains a number of different Docker images for download. All images are available from the SDAP organization on DockerHub.
Solr Images
All docker builds for the Solr images should happen from this directory. For copy/paste ability, first export the environment variable BUILD_VERSION to the version number you would like to tag images as.
Common Environment Variables
Any environment variable that can be passed to solr.in.sh and be passed as an environment variable to the docker container and it will be utilized. A few options are called out here:
SOLR_HEAPdefault: 512m
Increase Java Heap as needed to support your indexing / query needs
SOLR_HOMEdefault /opt/solr/server/solr
Path to a directory for Solr to store cores and their data. This directory is exposed as a
VOLUMEthat can be mounted.
If you want to mount the SOLR_HOME directory to a directory on the host machine, you need to provide the container path to the docker run -v option. Doing this allows you to retain the index between start/stop of this container.
sdap/solr
This is the base image used by both singlenode and cloud versions of the Solr image.
How To Build
This image can be built by:
docker build -t nexusjpl/solr:${BUILD_VERSION} .
How to Run
This image is not intended to be run directly.
sdap/solr-cloud-init
This image can be used to automatically create the nexustiles collection in SolrCloud.
How To Build
This image can be built from the incubator/sdap/solr directory:
docker build -t sdap/solr-cloud-init:${BUILD_VERSION} -f cloud-init/Dockerfile .
How to Run
This image is designed to run in a container alongside the solr_cloud container. The purpose is to detect if there are at least MINIMUM_NODES live nodes in the cluster. If there are, then detect if the nexustiles collection exists or not. If it does not, this script will create it using the parameters defined by the CREATE_COLLECTION_PARAMS environment variable. See the reference documents for the create function for the Solr collections API for valid parameters.
Note
The action=CREATE parameter is already passed for you and should not be part of CREATE_COLLECTION_PARAMS
Note
This image was designed to be long running. It will only exit if there was an error detecting or creating the nexustiles collection.
Environment Variables
MINIMUM_NODESdefault: 1
The minimum number of nodes that must be ‘live’ before the collection is created.
SDAP_ZK_SOLRdefault: localhost:2181/solr
The host:port/chroot of the zookeeper being used by SolrCloud.
SDAP_SOLR_URLdefault: http://localhost:8983/solr/
The URL that should be polled to check if a SolrCloud node is running. This should be the URL of the solr_cloud container that is being started alongside this container.
ZK_LOCK_GUIDdefault: c4d193b1-7e47-4b32-a169-a596463da0f5
A GUID that is used to create a lock in zookeeper so that if more than one of these init containers are started at the same time, only one will attempt to create the collection. This GUID should be the same across all containers that are trying to create the same collection.
MAX_RETRIESdefault: 30
The number of times we will try to connect to SolrCloud at
SDAP_SOLR_URL. This is roughly equivalent to how many seconds we will wait for the node atSDAP_SOLR_URLto become available. IfMAX_RETRIESis exceeded, the container will exit with an error.CREATE_COLLECTION_PARAMSdefault: name=nexustiles&collection.configName=nexustiles&numShards=1
The parameters sent to the collection create function. See the reference documents for the create function for the Solr collections API for valid parameters.
Example Run
Assuming Zookeeper is running on the host machine port 2181, and a solr_cloud container is also running with port 8983 mapped to the host machine, the easiest way to run this image is:
docker run -it --rm --name init -e SDAP_ZK_SOLR="host.docker.internal:2181/solr" -e SDAP_SOLR_URL="http://host.docker.internal:8983/solr/" sdap/solr-cloud-init:${BUILD_VERSION}
After running this image, the nexustiles collection should be available on the SolrCloud installation. Check the logs for the container to see details.