Sfoglia il codice sorgente

Updates for OpenSearch support #680

Mark Shust 2 anni fa
parent
commit
7b20fc32d6
4 ha cambiato i file con 14 aggiunte e 3 eliminazioni
  1. 4 3
      compose/bin/setup
  2. 1 0
      compose/compose.yaml
  3. 3 0
      compose/env/elasticsearch.env
  4. 6 0
      compose/env/opensearch.env

+ 4 - 3
compose/bin/setup

@@ -9,6 +9,8 @@ MEM=$(docker info | grep "Total Memory" | cut -d':' -f2 | xargs | sed s/GiB//)
 source env/db.env
 # shellcheck source=../env/elasticsearch.env
 source env/elasticsearch.env
+# shellcheck source=../env/opensearch.env
+source env/opensearch.env
 # shellcheck source=../env/magento.env
 source env/magento.env
 # shellcheck source=../env/rabbitmq.env
@@ -60,9 +62,8 @@ bin/clinotty bin/magento setup:install \
   --session-save-redis-host=redis \
   --session-save-redis-log-level=4 \
   --session-save-redis-db=2 \
-  --search-engine=elasticsearch7 \
-  --elasticsearch-host=$ES_HOST \
-  --elasticsearch-port=$ES_PORT \
+  --elasticsearch-host=$OPENSEARCH_HOST \
+  --elasticsearch-port=$OPENSEARCH_PORT \
   --use-rewrites=1 \
   --no-interaction
 

+ 1 - 0
compose/compose.yaml

@@ -57,6 +57,7 @@ services:
     ports:
       - "9200:9200"
       - "9300:9300"
+    env_file: env/opensearch.env
     environment:
       - "discovery.type=single-node"
       ## Avoid test failures due to small disks

+ 3 - 0
compose/env/elasticsearch.env

@@ -1,2 +1,5 @@
 ES_HOST=elasticsearch
 ES_PORT=9200
+
+## Set custom heap size to avoid memory errors
+ES_JAVA_OPTS="-Xms1g -Xmx1g"

+ 6 - 0
compose/env/opensearch.env

@@ -1,3 +1,9 @@
 OPENSEARCH_HOST=opensearch
 OPENSEARCH_PORT=9200
 OPENSEARCH_HEALTHCHECK_TIMEOUT=100
+
+## Set custom heap size to avoid memory errors
+ES_JAVA_OPTS="-Xms1g -Xmx1g"
+
+# Prevent security patch conflicts with core M2 code
+DISABLE_SECURITY_PLUGIN=true