Skip to content

Commit

Permalink
fix: env based _JAVA_OPTIONS for opensearch container (#2082)
Browse files Browse the repository at this point in the history
* fix: env based _JAVA_OPTIONS for opensearch container
  • Loading branch information
arslanashraf7 authored Feb 28, 2025
1 parent 6862b2b commit 1fcda64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.opensearch.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
environment:
- "cluster.name=opensearch-cluster"
- "bootstrap.memory_lock=true" # along with the memlock settings below, disables swapping
- "_JAVA_OPTIONS=-XX:UseSVE=0" # disables SVE (Scalable Vector Extension) for ARM64
- "_JAVA_OPTIONS=${JAVA_OPTIONS:-}" # Load _JAVA_OPTIONS from env, fallback to empty string
- "OPENSEARCH_JAVA_OPTS=-Xms1024m -Xmx1024m" # Set min and max JVM heap sizes to at least 50% of system RAM
- "DISABLE_INSTALL_DEMO_CONFIG=true" # disables execution of install_demo_configuration.sh bundled with security plugin, which installs demo certificates and security configurations to OpenSearch
- "DISABLE_SECURITY_PLUGIN=true" # disables security plugin entirely in OpenSearch by setting plugins.security.disabled: true in opensearch.yml
Expand Down
4 changes: 4 additions & 0 deletions env/backend.local.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ SOCIAL_AUTH_OL_OIDC_KEY=apisix
# This is not a secret. This is for the Keycloak container, only for local use.
SOCIAL_AUTH_OL_OIDC_SECRET=HckCZXToXfaetbBx0Fo3xbjnC468oMi4 # pragma: allowlist-secret
USERINFO_URL=http://kc.ol.local:8066/realms/ol-local/protocol/openid-connect/userinfo

# _JAVA_OPTIONS for Opensearch container are not consistent between different CPU architectures e.g ARM and x86.
# Here, anyone can set options like -XX:UseSVE=0 based on their CPU.
JAVA_OPTIONS=

0 comments on commit 1fcda64

Please sign in to comment.