From a8a83653b5cece54cd298e513a4a59af0845a62e Mon Sep 17 00:00:00 2001 From: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:35:36 -0500 Subject: [PATCH] Refactors changes related to demo configuration (#526) Signed-off-by: Darshit Chanpura --- INSTALL.md | 4 ++++ docker/docker-compose.cluster.yml | 2 ++ docker/docker-entrypoint.sh | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 61256cb45..f6df56cd1 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -90,6 +90,10 @@ This package uses the [Gradle](https://docs.gradle.org/current/userguide/usergui ### Setup Currently, for the alpha development-only source code release, we support installing and running the RCA framework only on OpenSearch Docker containers. + +**NOTE:** If planning to use this framework with security plugin, the demo configuration requires an initial admin password to be set. You can set this by creating a .env file next to the docker compose and add following line to it: +`OPENSEARCH_INITIAL_ADMIN_PASSWORD=` +There is a password validation in place, which requires a strong password. You can use the packaged Dockerfile and docker-compose.yml files [here](./docker) to spin up a cluster with RCA framework installed. diff --git a/docker/docker-compose.cluster.yml b/docker/docker-compose.cluster.yml index 2c9717097..aeb09f4d6 100644 --- a/docker/docker-compose.cluster.yml +++ b/docker/docker-compose.cluster.yml @@ -15,6 +15,7 @@ services: - cluster.initial_cluster_manager_nodes=opensearch1 - bootstrap.memory_lock=true - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" + - "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}" opensearch2: environment: - node.name=opensearch2 @@ -22,3 +23,4 @@ services: - cluster.initial_cluster_manager_nodes=opensearch1 - bootstrap.memory_lock=true - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" + - "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}" diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index db8d89948..434f74e78 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -85,7 +85,7 @@ fi if [[ -d "/usr/share/opensearch/plugins/opensearch_security" ]]; then # Install Demo certificates for Security Plugin and update the opensearch.yml # file to use those certificates. - /usr/share/opensearch/plugins/opensearch_security/tools/install_demo_configuration.sh -y -i -s + /usr/share/opensearch/plugins/opensearch_security/tools/install_demo_configuration.sh -y -i -s || exit 1 fi if [[ -d "/usr/share/opensearch/plugins/opensearch-performance-analyzer" ]]; then