-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keeping the features and Solr architecture we will use.
* Solr6 standalone mode => current production architecture * Solr8 cloud mode with external zookeeper * Python application running in docker to manage configsets and collections * Bash script to index a sample of documents * Updated the git workflow to build the image used in docker and kubernetes.
- Loading branch information
Showing
45 changed files
with
476 additions
and
657 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# a docker-compose.yml to start a simple cluster with 1 ZooKeeper node (external) and 1 Solr nodes. | ||
# Check this page (https://hathitrust.atlassian.net/wiki/spaces/HAT/pages/3190292502/Solr+cloud+and+external+Zookeeper+parameters) | ||
# to a better understanding of Solr and Zookeeper set up. | ||
services: | ||
solr_manager: | ||
build: | ||
context: solr_manager | ||
target: runtime | ||
dockerfile: Dockerfile | ||
args: | ||
UID: ${UID:-1000} | ||
GID: ${GID:-1000} | ||
ENV: ${ENV:-dev} | ||
POETRY_VERSION: ${POETRY_VERSION:-1.5.1} | ||
SOLR_PASSWORD: ${SOLR_PASSWORD:-solr} | ||
SOLR_USER: ${SOLR_USER:-solrRocks} | ||
ZK_HOST: ${ZK_HOST:-zoo1:2181} | ||
env_file: | ||
- solr_manager/.env | ||
volumes: | ||
- .:/app | ||
stdin_open: true | ||
depends_on: | ||
solr1: | ||
condition: service_healthy | ||
tty: true | ||
container_name: solr_manager | ||
networks: | ||
- solr | ||
profiles: [ solr_collection_manager ] | ||
solr1: | ||
build: | ||
context: . | ||
dockerfile: solr8.11.2_cloud/Dockerfile | ||
target: external_zookeeper_docker | ||
container_name: solr1 | ||
ports: | ||
- "8983:8983" | ||
environment: | ||
- ZK_HOST=zoo1:2181 | ||
- SOLR_OPTS=-XX:-UseLargePages | ||
networks: | ||
- solr | ||
depends_on: | ||
zoo1: | ||
condition: service_healthy | ||
volumes: | ||
- solr1_data:/var/solr/data | ||
command: solr-foreground -c # Solr command to start the container to make sure the security.json is created | ||
healthcheck: | ||
test: [ "CMD", "/usr/bin/curl", "-s", "-f", "http://solr1:8983/solr/#/admin/ping" ] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
zoo1: | ||
image: zookeeper:3.8.0 | ||
container_name: zoo1 | ||
restart: always | ||
hostname: zoo1 | ||
ports: | ||
- 2181:2181 | ||
- 7001:7000 | ||
environment: | ||
ZOO_MY_ID: 1 | ||
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 | ||
ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok | ||
ZOO_CFG_EXTRA: "metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider metricsProvider.httpPort=7000 metricsProvider.exportJvmInfo=true" | ||
networks: | ||
- solr | ||
volumes: | ||
- zoo1_data:/data | ||
healthcheck: | ||
test: [ "CMD", "echo", "ruok", "|", "nc", "localhost", "2181", "|", "grep", "imok" ] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
networks: | ||
solr: | ||
volumes: | ||
solr1_data: null | ||
zoo1_data: null |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
--- | ||
version: '3' | ||
|
||
services: | ||
solr-lss-dev: | ||
image: solr:6.6.6-alpine | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -f "solr_manager/.env" ]; then | ||
echo "🌎 solr_manager/.env exists. Leaving alone" | ||
else | ||
echo "🌎 solr_manager/.env does not exist. Copying solr_manager/.env-example to solr_manager/.env" | ||
cp solr_manager/env.example solr_manager/.env | ||
|
||
YOUR_UID=`id -u` | ||
YOUR_GID=`id -g` | ||
echo "🙂 Setting your UID ($YOUR_UID) and GID ($YOUR_UID) in .env" | ||
docker run --rm -v ./solr_manager/.env:/solr_manager/.env alpine echo "$(sed s/YOUR_UID/$YOUR_UID/ solr_manager/.env)" > solr_manager/.env | ||
docker run --rm -v ./solr_manager/.env:/solr_manager/.env alpine echo "$(sed s/YOUR_GID/$YOUR_GID/ solr_manager/.env)" > solr_manager/.env | ||
fi | ||
|
||
echo "🚢 Run containers" | ||
docker compose -f docker-compose.yml --profile solr_collection_manager up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 0 additions & 13 deletions
13
solr8.11.2_files/solrCloud_embedded_zooKeeper/collection_manager.sh
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.