Dockerized Solrcloud development envionment for testing
Documentation: https://solr.apache.org/guide/7_7/getting-started-with-solrcloud.html
- Docker
- Docker Compose >= 2.5.0
- Git clone this repo
- Git clone yul-solr repo
- cd is solrcloud directory
cd solrcloud
- Start solrcloud environment
docker-compose up -d
- Copy yul-solr configs to solr contianer
docker-compose cp <path to solr configs> solr:/opt/ # example: docker-compose cp ../yul-solr/quicksearch/solr/main/search solr:/opt/
- Create solrcloud collection (core in standalone mode)
docker-compose exec solr solr create -c quicksearch -d /opt/search -s2 -rf 2 # -c quicksearch - collection name # -d /opt/search - path to solr config directory inside solr container # -s2 - create 2 shards # -rf 2 - create 2 shared replicas for backup
- Access solrcloud ui - get local solr port
docker-compose ps solr # example output solrcloud-solr-1 "docker-entrypoint.s…" solr running 0.0.0.0:49153->8983/tcp, :::49153->8983/tcp solrcloud-solr-2 "docker-entrypoint.s…" solr running 0.0.0.0:49155->8983/tcp, :::49155->8983/tcp solrcloud-solr-3 "docker-entrypoint.s…" solr running 0.0.0.0:49154->8983/tcp, :::49154->8983/tcp
- Open browser to one of the addresses and port number (ie. http://0.0.0.0:49153)
Clean up
docker-compose down --volumes