Skip to content

Commit

Permalink
Adding environment variables for docker images versions
Browse files Browse the repository at this point in the history
  • Loading branch information
f-galland committed Jul 11, 2024
1 parent d17ad61 commit 283f873
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 26 deletions.
14 changes: 13 additions & 1 deletion integrations/docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,16 @@ MEM_LIMIT=1073741824
OS_VERSION=2.14.0

# Wazuh version
WAZUH_VERSION=4.7.5
WAZUH_VERSION=4.7.5

# Wazuh Indexer version (Provisionally using OpenSearch)
WAZUH_INDEXER_VERSION=2.12.0

# Wazuh Dashboard version (Provisionally using OpenSearch Dashboards)
WAZUH_DASHBOARD_VERSION=2.12.0

# Wazuh certs generator version
WAZUH_CERTS_GENERATOR_VERSION=0.0.1

# Splunk version:
SPLUNK_VERSION=9.0.4
10 changes: 7 additions & 3 deletions integrations/docker/compose.amazon-security-lake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
command: bash -c "python run.py -a wazuh.indexer"

wazuh.indexer:
image: opensearchproject/opensearch:2.12.0
image: opensearchproject/opensearch:${WAZUH_INDEXER_VERSION}
container_name: wazuh.indexer
depends_on:
wazuh-certs-generator:
Expand All @@ -22,6 +22,7 @@ services:
ports:
- 9200:9200
environment:
- WAZUH_INDEXER_VERSION=${WAZUH_INDEXER_VERSION}
# - cluster.name=opensearch-cluster
- node.name=wazuh.indexer
- discovery.type=single-node
Expand Down Expand Up @@ -56,7 +57,7 @@ services:
- ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem

wazuh.dashboard:
image: opensearchproject/opensearch-dashboards:2.12.0
image: opensearchproject/opensearch-dashboards:${WAZUH_DASHBOARD_VERSION}
container_name: wazuh.dashboard
depends_on:
- wazuh.indexer
Expand All @@ -71,6 +72,7 @@ services:
- ./certs/wazuh.dashboard.pem:/usr/share/opensearch-dashboards/config/certs/opensearch.pem
- ./certs/root-ca.pem:/usr/share/opensearch-dashboards/config/certs/root-ca.pem
environment:
WAZUH_DASHBOARD_VERSION: ${WAZUH_DASHBOARD_VERSION}
OPENSEARCH_HOSTS: '["https://wazuh.indexer:9200"]' # Define the OpenSearch nodes that OpenSearch Dashboards will query
SERVER_SSL_ENABLED: 'true'
SERVER_SSL_KEY: '/usr/share/opensearch-dashboards/config/certs/opensearch.key'
Expand Down Expand Up @@ -159,12 +161,14 @@ services:
"
wazuh-certs-generator:
image: wazuh/wazuh-certs-generator:0.0.1
image: wazuh/wazuh-certs-generator:${WAZUH_CERTS_GENERATOR_VERSION}
hostname: wazuh-certs-generator
depends_on:
generate-certs-config:
condition: service_completed_successfully
container_name: wazuh-certs-generator
environment:
- WAZUH_CERTS_GENERATOR_VERSION=${WAZUH_CERTS_GENERATOR_VERSION}
entrypoint: sh -c "/entrypoint.sh; chown -R 1000:999 /certificates; chmod 740 /certificates; chmod 440 /certificates/*"
volumes:
- ./certs/:/certificates/
Expand Down
10 changes: 7 additions & 3 deletions integrations/docker/compose.indexer-elastic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ services:
command: bash -c "python run.py -a wazuh.indexer"

wazuh.indexer:
image: opensearchproject/opensearch:2.12.0
image: opensearchproject/opensearch:${WAZUH_INDEXER_VERSION}
depends_on:
wazuh-certs-generator:
condition: service_completed_successfully
hostname: wazuh.indexer
ports:
- 9200:9200
environment:
- WAZUH_INDEXER_VERSION=${WAZUH_INDEXER_VERSION}
- node.name=wazuh.indexer
- discovery.type=single-node
- bootstrap.memory_lock=true
Expand Down Expand Up @@ -51,7 +52,7 @@ services:
- ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem

wazuh.dashboard:
image: opensearchproject/opensearch-dashboards:2.12.0
image: opensearchproject/opensearch-dashboards:${WAZUH_DASHBOARD_VERSION}
depends_on:
- wazuh.indexer
hostname: wazuh.dashboard
Expand All @@ -65,6 +66,7 @@ services:
- ./certs/wazuh.dashboard.pem:/usr/share/opensearch-dashboards/config/certs/opensearch.pem
- ./certs/root-ca.pem:/usr/share/opensearch-dashboards/config/certs/root-ca.pem
environment:
WAZUH_DASHBOARD_VERSION: ${WAZUH_DASHBOARD_VERSION}
OPENSEARCH_HOSTS: '["https://wazuh.indexer:9200"]' # Define the OpenSearch nodes that OpenSearch Dashboards will query
SERVER_SSL_ENABLED: 'true'
SERVER_SSL_KEY: '/usr/share/opensearch-dashboards/config/certs/opensearch.key'
Expand Down Expand Up @@ -92,8 +94,10 @@ services:
"
wazuh-certs-generator:
image: wazuh/wazuh-certs-generator:0.0.1
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
Expand Down
13 changes: 9 additions & 4 deletions integrations/docker/compose.indexer-opensearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ services:
command: bash -c "python run.py -a wazuh.indexer"

wazuh.indexer:
image: opensearchproject/opensearch:2.12.0
image: opensearchproject/opensearch:${WAZUH_INDEXER_VERSION}
depends_on:
wazuh-certs-generator:
condition: service_completed_successfully
hostname: wazuh.indexer
ports:
- 9200:9200
environment:
- WAZUH_INDEXER_VERSION=${WAZUH_INDEXER_VERSION}
- node.name=wazuh.indexer
- discovery.type=single-node
- bootstrap.memory_lock=true
Expand Down Expand Up @@ -51,7 +52,7 @@ services:
- ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem

wazuh.dashboard:
image: opensearchproject/opensearch-dashboards:2.12.0
image: opensearchproject/opensearch-dashboards:${WAZUH_DASHBOARD_VERSION}
depends_on:
- wazuh.indexer
hostname: wazuh.dashboard
Expand All @@ -66,6 +67,7 @@ services:
- ./certs/opensearch.dashboards.pem:/usr/share/opensearch-dashboards/config/certs/opensearch.pem
- ./certs/root-ca.pem:/usr/share/opensearch-dashboards/config/certs/root-ca.pem
environment:
WAZUH_DASHBOARD_VERSION: ${WAZUH_DASHBOARD_VERSION}
OPENSEARCH_HOSTS: '["https://wazuh.indexer:9200"]'
SERVER_SSL_ENABLED: 'true'
SERVER_SSL_KEY: '/usr/share/opensearch-dashboards/config/certs/opensearch.key'
Expand Down Expand Up @@ -97,8 +99,10 @@ services:
"
wazuh-certs-generator:
image: wazuh/wazuh-certs-generator:0.0.1
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
Expand Down Expand Up @@ -169,13 +173,14 @@ services:
- 'OPENSEARCH_HOSTS="https://opensearch.node:9200"'

logstash:
image: logstash-oss:8.6.2
image: logstash-oss:${STACK_VERSION}
depends_on:
opensearch.node:
condition: service_healthy
build:
context: ../logstash
environment:
STACK_VERSION: ${STACK_VERSION}
LOG_LEVEL: info
MONITORING_ENABLED: false
volumes:
Expand Down
16 changes: 11 additions & 5 deletions integrations/docker/compose.indexer-splunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ services:
command: bash -c "python run.py -a wazuh.indexer"

wazuh.indexer:
image: opensearchproject/opensearch:2.12.0
image: opensearchproject/opensearch:${WAZUH_INDEXER_VERSION}
depends_on:
wazuh-certs-generator:
condition: service_completed_successfully
hostname: wazuh.indexer
ports:
- 9200:9200
environment:
- WAZUH_INDEXER_VERSION=${WAZUH_INDEXER_VERSION}
- node.name=wazuh.indexer
- discovery.type=single-node
- bootstrap.memory_lock=true
Expand Down Expand Up @@ -51,7 +52,7 @@ services:
- ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem

wazuh.dashboard:
image: opensearchproject/opensearch-dashboards:2.12.0
image: opensearchproject/opensearch-dashboards:${WAZUH_DASHBOARD_VERSION}
depends_on:
- wazuh.indexer
hostname: wazuh.dashboard
Expand All @@ -65,6 +66,7 @@ services:
- ./certs/wazuh.dashboard.pem:/usr/share/opensearch-dashboards/config/certs/opensearch.pem
- ./certs/root-ca.pem:/usr/share/opensearch-dashboards/config/certs/root-ca.pem
environment:
WAZUH_DASHBOARD_VERSION: ${WAZUH_DASHBOARD_VERSION}
OPENSEARCH_HOSTS: '["https://wazuh.indexer:9200"]' # Define the OpenSearch nodes that OpenSearch Dashboards will query
SERVER_SSL_ENABLED: 'true'
SERVER_SSL_KEY: '/usr/share/opensearch-dashboards/config/certs/opensearch.key'
Expand Down Expand Up @@ -92,8 +94,10 @@ services:
"
wazuh-certs-generator:
image: wazuh/wazuh-certs-generator:0.0.1
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
Expand Down Expand Up @@ -133,7 +137,7 @@ services:
'
splunk:
image: splunk/splunk:9.0.4
image: splunk/splunk:${SPLUNK_VERSION}
volumes:
- ./certs/splunk.key:/opt/splunk/etc/auth/custom/splunk.key
- ./certs/splunk.pem:/opt/splunk/etc/auth/custom/splunk.pem
Expand All @@ -149,6 +153,7 @@ services:
- '8000:8000'
- '8088:8088'
environment:
SPLUNK_VERSION: ${SPLUNK_VERSION}
SPLUNK_HEC_TOKEN: "abcd1234"
SPLUNK_HOSTNAME: splunk
SPLUNK_HTTP_ENABLESSL: 'true'
Expand All @@ -160,8 +165,9 @@ services:
depends_on:
splunk:
condition: service_healthy
image: logstash-oss:8.6.2
image: logstash-oss:${STACK_VERSION}
environment:
STACK_VERSION: ${STACK_VERSION}
LOG_LEVEL: info
MONITORING_ENABLED: false
volumes:
Expand Down
10 changes: 7 additions & 3 deletions integrations/docker/compose.manager-elastic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ services:
- alerts:/var/ossec/logs/alerts/

wazuh.indexer:
image: opensearchproject/opensearch:2.12.0
image: opensearchproject/opensearch:${WAZUH_INDEXER_VERSION}
depends_on:
wazuh-certs-generator:
condition: service_completed_successfully
hostname: wazuh.indexer
ports:
- 9200:9200
environment:
- WAZUH_INDEXER_VERSION=${WAZUH_INDEXER_VERSION}
- node.name=wazuh.indexer
- discovery.type=single-node
- bootstrap.memory_lock=true
Expand Down Expand Up @@ -89,8 +90,10 @@ services:
- ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem

wazuh-certs-generator:
image: wazuh/wazuh-certs-generator:0.0.1
image: wazuh/wazuh-certs-generator:${WAZUH_CERTS_GENERATOR_VERSION}
hostname: wazuh-certs-generator
environment:
- WAZUH_CERTS_GENERATOR_VERSION=${WAZUH_CERTS_GENERATOR_VERSION}
entrypoint: sh -c "/entrypoint.sh; chown -R 1000:999 /certificates; chmod 740 /certificates; chmod 440 /certificates/*"
volumes:
- ./certs/:/certificates/
Expand All @@ -102,10 +105,11 @@ services:
condition: service_healthy
wazuh-certs-generator:
condition: service_completed_successfully
image: logstash-oss:8.6.2
image: logstash-oss:${STACK_VERSION}
build:
context: ../logstash
environment:
STACK_VERSION=${STACK_VERSION}
LOG_LEVEL: info
MONITORING_ENABLED: false
volumes:
Expand Down
10 changes: 7 additions & 3 deletions integrations/docker/compose.manager-opensearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ services:
- alerts:/var/ossec/logs/alerts/

wazuh.indexer:
image: opensearchproject/opensearch:2.12.0
image: opensearchproject/opensearch:${WAZUH_INDEXER_VERSION}
depends_on:
wazuh-certs-generator:
condition: service_completed_successfully
hostname: wazuh.indexer
ports:
- 9200:9200
environment:
- WAZUH_INDEXER_VERSION=${WAZUH_INDEXER_VERSION}
- node.name=wazuh.indexer
- discovery.type=single-node
- bootstrap.memory_lock=true
Expand Down Expand Up @@ -89,8 +90,10 @@ services:
- ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem

wazuh-certs-generator:
image: wazuh/wazuh-certs-generator:0.0.1
image: wazuh/wazuh-certs-generator:${WAZUH_CERTS_GENERATOR_VERSION}
hostname: wazuh-certs-generator
environment:
- WAZUH_CERTS_GENERATOR_VERSION=${WAZUH_CERTS_GENERATOR_VERSION}
entrypoint: sh -c "/entrypoint.sh; chown -R 1000:999 /certificates; chmod 740 /certificates; chmod 440 /certificates/*"
volumes:
- ./certs/:/certificates/
Expand All @@ -102,11 +105,12 @@ services:
condition: service_healthy
wazuh-certs-generator:
condition: service_completed_successfully
image: logstash-oss:8.6.2
image: logstash-oss:${STACK_VERSION}
build:
dockerfile: ../elastic/Dockerfile
context: ../logstash
environment:
STACK_VERSION: ${STACK_VERSION}
LOG_LEVEL: info
MONITORING_ENABLED: false
volumes:
Expand Down
13 changes: 9 additions & 4 deletions integrations/docker/compose.manager-splunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ services:
- alerts:/var/ossec/logs/alerts/

wazuh.indexer:
image: opensearchproject/opensearch:2.12.0
image: opensearchproject/opensearch:${WAZUH_INDEXER_VERSION}
depends_on:
wazuh-certs-generator:
condition: service_completed_successfully
hostname: wazuh.indexer
ports:
- 9200:9200
environment:
- WAZUH_INDEXER_VERSION=${WAZUH_INDEXER_VERSION}
- node.name=wazuh.indexer
- discovery.type=single-node
- bootstrap.memory_lock=true
Expand Down Expand Up @@ -89,8 +90,10 @@ services:
- ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem

wazuh-certs-generator:
image: wazuh/wazuh-certs-generator:0.0.1
image: wazuh/wazuh-certs-generator:${WAZUH_CERTS_GENERATOR_VERSION}
hostname: wazuh-certs-generator
environment:
- WAZUH_CERTS_GENERATOR_VERSION=${WAZUH_CERTS_GENERATOR_VERSION}
entrypoint: sh -c "/entrypoint.sh; chown -R 1000:999 /certificates; chmod 740 /certificates; chmod 440 /certificates/*"
volumes:
- ./certs/:/certificates/
Expand All @@ -102,11 +105,12 @@ services:
condition: service_healthy
wazuh-certs-generator:
condition: service_completed_successfully
image: logstash-oss:8.6.2
image: logstash-oss:${STACK_VERSION}
build:
dockerfile: ../logstash/Dockerfile
context: ../logstash
environment:
STACK_VERSION: ${STACK_VERSION}
LOG_LEVEL: info
MONITORING_ENABLED: false
volumes:
Expand Down Expand Up @@ -145,7 +149,7 @@ services:
'
splunk:
image: splunk/splunk:9.0.4
image: splunk/splunk:${SPLUNK_VERSION}
volumes:
- ./certs/splunk.key:/opt/splunk/etc/auth/custom/splunk.key
- ./certs/splunk.pem:/opt/splunk/etc/auth/custom/splunk.pem
Expand All @@ -159,6 +163,7 @@ services:
- '8000:8000'
- '8088:8088'
environment:
SPLUNK_VERSION: ${SPLUNK_VERSION}
SPLUNK_HEC_TOKEN: "abcd1234"
SPLUNK_HOSTNAME: splunk
SPLUNK_HTTP_ENABLESSL: 'true'
Expand Down

0 comments on commit 283f873

Please sign in to comment.