rollback ISM

This commit is contained in:
vcerenu
2024-02-20 12:01:22 -03:00
parent ec9076261f
commit 33a55344d3
5 changed files with 2 additions and 25 deletions

View File

@@ -35,8 +35,6 @@ ENV USER="wazuh-indexer" \
NAME="wazuh-indexer" \
INSTALL_DIR="/usr/share/wazuh-indexer"
RUN apt-get update -y && apt-get install curl -y
RUN getent group $GROUP || groupadd -r -g 1000 $GROUP
RUN useradd --system \
@@ -54,9 +52,7 @@ COPY config/entrypoint.sh /
COPY config/securityadmin.sh /
COPY config/ism-check.sh /
RUN chmod 700 /entrypoint.sh && chmod 700 /securityadmin.sh && chmod 700 /ism-check.sh
RUN chmod 700 /entrypoint.sh && chmod 700 /securityadmin.sh
RUN chown 1000:1000 /*.sh

View File

@@ -90,6 +90,4 @@ fi
# touch "/var/lib/wazuh-indexer/.flag"
#fi
nohup /ism-check.sh &
run_as_other_user_if_needed /usr/share/wazuh-indexer/bin/opensearch <<<"$KEYSTORE_PASSWORD"

View File

@@ -1,15 +0,0 @@
#!/bin/bash
MIN_SHARD_SIZE=${MIN_SHARD_SIZE:-25}
MIN_INDEX_AGE=${MIN_INDEX_AGE:-"7d"}
MIN_DOC_COUNT=${MIN_DOC_COUNT:-600000000}
ISM_PRIORITY=${ISM_PRIORITY:-50}
WAZUH_TEMPLATE=${WAZUH_TEMPLATE:-"/usr/share/wazuh-indexer/wazuh-template.json"}
SERVER=`hostname`
if [[ -n "$INDEXER_PASSWORD" ]]; then
until [[ `curl -XGET https://$SERVER:9200/_cat/indices -u admin:SecretPassword -k -s | grep .opendistro_security | wc -l` -eq 1 ]]
do
echo "Wazuh indexer Security is not initiaized";
sleep 30
done
bash /usr/share/wazuh-indexer/bin/indexer-ism-init.sh -p $INDEXER_PASSWORD -i $SERVER -P $ISM_PRIORITY -d $MIN_DOC_COUNT -a $MIN_INDEX_AGE -s $MIN_SHARD_SIZE -t $WAZUH_TEMPLATE
fi

View File

@@ -89,7 +89,6 @@ services:
environment:
- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
- "bootstrap.memory_lock=true"
- 'INDEXER_PASSWORD=SecretPassword'
ulimits:
memlock:
soft: -1

View File

@@ -52,8 +52,7 @@ services:
ports:
- "9200:9200"
environment:
- "OPENSEARCH_JAVA_OPTS=-Xms1024m -Xmx1024m"
- 'INDEXER_PASSWORD=SecretPassword'
- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
ulimits:
memlock:
soft: -1