From 4dc11f762870bd6528271475010587e6e8adc616 Mon Sep 17 00:00:00 2001
From: Chris Karlin <46851840+chriskarlin@users.noreply.github.com>
Date: Mon, 17 Apr 2023 15:31:09 -0400
Subject: [PATCH] Adding opensearch to global-docker-compose (#5)
* Adding opensearch to global-docker-compose
* removed version bump and opensearch network from composer file
* use latest version 2 tag
* PR feedback
---
CHANGELOG | 1 +
README.md | 1 +
gdc/docker-compose.yml | 35 +++++++++++++++++++++++++++++++++++
gdc/docker.go | 3 +++
4 files changed, 40 insertions(+)
diff --git a/CHANGELOG b/CHANGELOG
index 4f0436a..6214fd1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## UNRELEASED
+- Added OpenSearch local image.
[0.7.1] - 2023-02-22
- Added Dynamo local image.
diff --git a/README.md b/README.md
index 5a0456c..daca6ee 100644
--- a/README.md
+++ b/README.md
@@ -85,6 +85,7 @@ Key|Service|Ports
`kafka`|Kafka with Lenses Box|
- 9092 (Kafka broker)
- 8081 (Schema Registry)
- 3030 (Lenses)
`mailcatcher`|Mailcatcher|- 1025 (SMTP server)
- 1080 (UI)
`dynamodb`|DynamoDB|8000
+`opensearch`|OpenSearch|
### MySQL
diff --git a/gdc/docker-compose.yml b/gdc/docker-compose.yml
index a9deeb3..43deeb6 100644
--- a/gdc/docker-compose.yml
+++ b/gdc/docker-compose.yml
@@ -92,6 +92,40 @@ services:
volumes:
- dynamodb-data:/home/dynamodblocal/data
+# ---------- OpenSearch ----------
+ opensearch:
+ image: opensearchproject/opensearch:2
+ environment:
+ - cluster.name=opensearch-cluster # Name the cluster
+ - node.name=opensearch # Name the node that will run in this container
+ - discovery.seed_hosts=opensearch # Nodes to look for when discovering the cluster
+ - cluster.initial_cluster_manager_nodes=opensearch # Nodes eligibile to serve as cluster manager
+ - bootstrap.memory_lock=true # Disable JVM heap memory swapping
+ - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
+ - "DISABLE_INSTALL_DEMO_CONFIG=true" # Prevents execution of bundled demo script which installs demo certificates and security configurations to OpenSearch
+ - "DISABLE_SECURITY_PLUGIN=true" # Disables security plugin
+ ulimits:
+ memlock:
+ soft: -1 # Set memlock to unlimited (no soft or hard limit)
+ hard: -1
+ nofile:
+ soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
+ hard: 65536
+ volumes:
+ - opensearch-data:/usr/share/opensearch/data # Creates volume called opensearch-data and mounts it to the container
+ ports:
+ - 9200:9200 # REST API
+ - 9600:9600 # Performance Analyzer
+
+ opensearch-dashboards:
+ image: opensearchproject/opensearch-dashboards:2
+ ports:
+ - 5601:5601 # Map host port 5601 to container port 5601
+ environment:
+ - 'OPENSEARCH_HOSTS=["http://opensearch:9200"]'
+ - "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true" # disables security dashboards plugin in OpenSearch Dashboards
+
+
volumes:
mysql56-data:
mysql57-data:
@@ -99,3 +133,4 @@ volumes:
redis-data:
redisinsight:
dynamodb-data:
+ opensearch-data:
diff --git a/gdc/docker.go b/gdc/docker.go
index b662ca8..f00287b 100644
--- a/gdc/docker.go
+++ b/gdc/docker.go
@@ -84,6 +84,9 @@ func serviceString(compose ComposeInfo, command string) string {
if (service == "redis") {
results = append(results, "redisinsight")
}
+ if (service == "opensearch") {
+ results = append(results, "opensearch-dashboards")
+ }
}
return strings.Join(results, " ")
}