From d4ac52b1114247f39845e25b5097e2f44e40fe96 Mon Sep 17 00:00:00 2001 From: Fede Tux Date: Thu, 11 Jul 2024 17:03:19 -0300 Subject: [PATCH] Fixing minor issues in compose files --- integrations/.gitignore | 3 +- integrations/docker/.env | 22 +++++++------- .../docker/compose.manager-elastic.yml | 2 +- .../docker/compose.manager-opensearch.yml | 30 +++++++++++++++++++ .../docker/compose.manager-splunk.yml | 4 +-- 5 files changed, 46 insertions(+), 15 deletions(-) diff --git a/integrations/.gitignore b/integrations/.gitignore index a9728d8767e3a..49aa039cc7e32 100644 --- a/integrations/.gitignore +++ b/integrations/.gitignore @@ -1,2 +1,3 @@ external -docker/certs \ No newline at end of file +docker/certs +docker/config diff --git a/integrations/docker/.env b/integrations/docker/.env index 6594092b0ef16..665c2cb9d7184 100644 --- a/integrations/docker/.env +++ b/integrations/docker/.env @@ -4,9 +4,6 @@ ELASTIC_PASSWORD=elastic # Password for the 'kibana_system' user (at least 6 characters) KIBANA_PASSWORD=elastic -# Version of Elastic products -STACK_VERSION=8.6.2 - # Set the cluster name CLUSTER_NAME=elastic @@ -22,23 +19,26 @@ KIBANA_PORT=5602 # Increase or decrease based on the available host memory (in bytes) MEM_LIMIT=1073741824 -# OpenSearch destination cluster version -OS_VERSION=2.14.0 - # Wazuh version WAZUH_VERSION=4.7.5 # Wazuh Indexer version (Provisionally using OpenSearch) -WAZUH_INDEXER_VERSION=2.12.0 +WAZUH_INDEXER_VERSION=2.14.0 # Wazuh Dashboard version (Provisionally using OpenSearch Dashboards) -WAZUH_DASHBOARD_VERSION=2.12.0 +WAZUH_DASHBOARD_VERSION=2.14.0 # Wazuh certs generator version WAZUH_CERTS_GENERATOR_VERSION=0.0.1 -# Splunk version: -SPLUNK_VERSION=9.0.4 +# OpenSearch destination cluster version +OS_VERSION=2.14.0 # Logstash version: -LOGSTASH_OSS_VERSION=8.9.0 \ No newline at end of file +LOGSTASH_OSS_VERSION=8.9.0 + +# Splunk version: +SPLUNK_VERSION=9.1.4 + +# Version of Elastic products +STACK_VERSION=8.14.3 diff --git a/integrations/docker/compose.manager-elastic.yml b/integrations/docker/compose.manager-elastic.yml index 2496e6297ce4c..ede393872b653 100644 --- a/integrations/docker/compose.manager-elastic.yml +++ b/integrations/docker/compose.manager-elastic.yml @@ -111,7 +111,7 @@ services: args: - LOGSTASH_OSS_VERSION=${LOGSTASH_OSS_VERSION} environment: - LOGSTASH_OSS_VERSION=${LOGSTASH_OSS_VERSION} + LOGSTASH_OSS_VERSION: ${LOGSTASH_OSS_VERSION} LOG_LEVEL: info MONITORING_ENABLED: false volumes: diff --git a/integrations/docker/compose.manager-opensearch.yml b/integrations/docker/compose.manager-opensearch.yml index e6008ea59e858..52055b82f4511 100644 --- a/integrations/docker/compose.manager-opensearch.yml +++ b/integrations/docker/compose.manager-opensearch.yml @@ -14,6 +14,9 @@ services: wazuh.manager: image: wazuh/wazuh-manager:${WAZUH_VERSION} + depends_on: + wazuh-certs-generator: + condition: service_completed_successfully hostname: wazuh.manager restart: always ulimits: @@ -89,11 +92,38 @@ services: - ./certs/wazuh.indexer-key.pem:/usr/share/opensearch/config/wazuh.indexer-key.pem - ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem + generate-certs-config: + image: alpine:latest + volumes: + - ./config:/config + command: | + sh -c " + echo ' + nodes: + indexer: + - name: wazuh.indexer + ip: \"wazuh.indexer\" + - name: opensearch.node + ip: \"opensearch.node\" + server: + - name: wazuh.manager + ip: \"wazuh.manager\" + dashboard: + - name: wazuh.dashboard + ip: \"wazuh.dashboard\" + - name: opensearch.dashboards + ip: \"opensearch.dashboards\" + ' > /config/certs.yml + " + wazuh-certs-generator: image: wazuh/wazuh-certs-generator:${WAZUH_CERTS_GENERATOR_VERSION} hostname: wazuh-certs-generator environment: - WAZUH_CERTS_GENERATOR_VERSION=${WAZUH_CERTS_GENERATOR_VERSION} + depends_on: + generate-certs-config: + condition: service_completed_successfully entrypoint: sh -c "/entrypoint.sh; chown -R 1000:999 /certificates; chmod 740 /certificates; chmod 440 /certificates/*" volumes: - ./certs/:/certificates/ diff --git a/integrations/docker/compose.manager-splunk.yml b/integrations/docker/compose.manager-splunk.yml index 9bce4180f434f..6168e4a2a7ac7 100644 --- a/integrations/docker/compose.manager-splunk.yml +++ b/integrations/docker/compose.manager-splunk.yml @@ -105,13 +105,13 @@ services: condition: service_healthy wazuh-certs-generator: condition: service_completed_successfully - image: logstash-oss:${STACK_VERSION} + image: logstash-oss:${LOGSTASH_OSS_VERSION} build: context: ../logstash args: - LOGSTASH_OSS_VERSION=${LOGSTASH_OSS_VERSION} environment: - STACK_VERSION: ${STACK_VERSION} + LOGSTASH_OSS_VERSION: ${LOGSTASH_OSS_VERSION} LOG_LEVEL: info MONITORING_ENABLED: false volumes: