I cloned the repository at opensearch
and customized the code.
Q:
• How can I run this in Docker?
• Alternatively, how can I install plugins such as the CCR plugin?
Either solution would be helpful. I would greatly appreciate your help.
Within this repository, there are multiple DockerFiles and Docker-Compose files, and ./gradlew run also works.
Problems:
• However, when running the project, the plugins are missing, so I need to install them. The official documentation provides a method for installing plugins when running with Docker, but I’m unsure how to do it when using ./gradlew run.
• When I launch the provided Docker-Compose, no logs appear, so I cannot confirm if my changes have been applied properly. Even when I check the log folder, no logs appear, unlike with a deployed OpenSearch instance.
# Only used for testing the docker images
version: '3'
services:
opensearch-1:
image: opensearch:test
environment:
- node.name=opensearch-1
- cluster.initial_cluster_manager_nodes=opensearch-1,opensearch-2
- discovery.seed_hosts=opensearch-2:9300
- cluster.name=opensearch
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- path.repo=/tmp/opensearch-repo
- node.attr.testattr=test
- cluster.routing.allocation.disk.watermark.low=1b
- cluster.routing.allocation.disk.watermark.high=1b
- cluster.routing.allocation.disk.watermark.flood_stage=1b
- node.store.allow_mmap=false
volumes:
- ./build/repo:/tmp/opensearch-repo
- ./build/logs/1:/usr/share/opensearch/logs
ports:
- "9200"
ulimits:
memlock:
soft: -1
hard: -1
opensearch-2:
image: opensearch:test
environment:
- node.name=opensearch-2
- cluster.initial_cluster_manager_nodes=opensearch-1,opensearch-2
- discovery.seed_hosts=opensearch-1:9300
- cluster.name=opensearch
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- path.repo=/tmp/opensearch-repo
- node.attr.testattr=test
- cluster.routing.allocation.disk.watermark.low=1b
- cluster.routing.allocation.disk.watermark.high=1b
- cluster.routing.allocation.disk.watermark.flood_stage=1b
- node.store.allow_mmap=false
volumes:
- ./build/repo:/tmp/opensearch-repo
- ./build/logs/2:/usr/share/opensearch/logs
ports:
- "9200"
ulimits:
memlock:
soft: -1
hard: -1