Skip to content

Commit

Permalink
Add environments for 4.5 (#5797)
Browse files Browse the repository at this point in the history
* Add environments for 4.5

* Add saml required: false

* Fix readme

* Fix readme 4.4

* Update README.md

* Update README.md
  • Loading branch information
yenienserrano authored Sep 5, 2023
1 parent 2664730 commit 622f346
Show file tree
Hide file tree
Showing 28 changed files with 2,191 additions and 130 deletions.
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Frontend development environments

Install [Docker Desktop][0] as per its instructions, available for Windows, Mac
Install [Docker Desktop][0] as per its instructions (make sure that the docker compose version is 2.20.2 or higher), available for Windows, Mac
and Linux (Ubuntu, Debian & Fedora).
This ensures that the development experience between Linux, Mac and Windows is as
similar as possible.
Expand Down Expand Up @@ -295,4 +295,4 @@ error getting credentials - err: exit status 1, out: `error getting credentials
[2]: <https://grafana.com/oss/loki/> "Loki"
[3]: <https://prometheus.io/docs/visualization/grafana/> "Prometheus"
[4]: <https://quay.io/organization/wazuh> "quay.io/wazuh"
[5]: <https://github.com/wazuh/wazuh-kibana-app/issues/3872#issuecomment-1305507626> "App permissions"
[5]: <https://github.com/wazuh/wazuh-kibana-app/issues/3872#issuecomment-1305507626> "App permissions"
59 changes: 30 additions & 29 deletions docker/osd-dev/dev.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
version: "2.2"
version: '2.2'

x-logging: &logging
logging:
driver: loki
options:
loki-url: "http://host.docker.internal:3100/loki/api/v1/push"
loki-url: 'http://host.docker.internal:3100/loki/api/v1/push'

services:
exporter:
image: quay.io/prometheuscommunity/elasticsearch-exporter:latest
<<: *logging
hostname: exporter-osd-${OS_VERSION}
profiles:
- "saml"
- "standard"
- 'saml'
- 'standard'
networks:
- os-dev
- mon
command:
- "--es.uri=https://admin:${PASSWORD}@os1:9200"
- "--es.ssl-skip-verify"
- "--es.all"
- '--es.uri=https://admin:${PASSWORD}@os1:9200'
- '--es.ssl-skip-verify'
- '--es.all'

imposter:
image: outofcoffee/imposter
Expand All @@ -39,8 +39,8 @@ services:
image: cfssl/cfssl
<<: *logging
profiles:
- "saml"
- "standard"
- 'saml'
- 'standard'
volumes:
- wi_certs:/certs/wi
- wd_certs:/certs/wd
Expand Down Expand Up @@ -117,7 +117,7 @@ services:
sleep 300
'
healthcheck:
test: ["CMD-SHELL", "[ -r /certs/wi/os1.pem ]"]
test: ['CMD-SHELL', '[ -r /certs/wi/os1.pem ]']
interval: 2s
timeout: 5s
retries: 10
Expand All @@ -126,18 +126,19 @@ services:
depends_on:
idpsetup:
condition: service_completed_successfully
required: false
image: opensearchproject/opensearch:${OS_VERSION}
<<: *logging
profiles:
- "saml"
- "standard"
- 'saml'
- 'standard'
environment:
- cluster.name=os-dev-cluster
- node.name=os1
- discovery.seed_hosts=os1
- cluster.initial_master_nodes=os1
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- 'OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m' # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- OPENSEARCH_PATH_CONF=/usr/share/opensearch/config/
ulimits:
memlock:
Expand All @@ -162,7 +163,7 @@ services:
healthcheck:
test:
[
"CMD-SHELL",
'CMD-SHELL',
"curl -v --cacert config/certs/ca.pem https://os1:9200 2>&1 | grep -q '401 Unauthorized'",
]
interval: 1s
Expand All @@ -175,17 +176,17 @@ services:
condition: service_healthy
image: elastic/filebeat:7.10.2
profiles:
- "saml"
- "standard"
- 'saml'
- 'standard'
hostname: filebeat
user: "0:0"
user: '0:0'
networks:
- os-dev
- mon
<<: *logging
# restart: always
entrypoint:
- "/bin/bash"
- '/bin/bash'
command: >
-c '
mkdir -p /etc/filebeat
Expand All @@ -211,23 +212,23 @@ services:
condition: service_healthy
image: quay.io/wazuh/osd-dev:${OSD_VERSION}
profiles:
- "saml"
- "standard"
- 'saml'
- 'standard'
hostname: osd
networks:
- os-dev
- devel
- mon
user: "1000:1000"
user: '1000:1000'
<<: *logging
ports:
- ${OSD_PORT}:5601
environment:
- "LOGS=/proc/1/fd/1"
entrypoint: ["tail", "-f", "/dev/null"]
- 'LOGS=/proc/1/fd/1'
entrypoint: ['tail', '-f', '/dev/null']
volumes:
- osd_cache:/home/node/.cache
- "${SRC}:/home/node/kbn/plugins/wazuh"
- '${SRC}:/home/node/kbn/plugins/wazuh'
- wd_certs:/home/node/kbn/certs/
- ${WAZUH_DASHBOARD_CONF}:/home/node/kbn/config/opensearch_dashboards.yml
- ./config/${OSD_MAJOR}/osd/wazuh.yml:/home/node/kbn/data/wazuh/config/wazuh.yml
Expand All @@ -238,7 +239,7 @@ services:
generator:
condition: service_healthy
profiles:
- "saml"
- 'saml'
volumes:
- wi_certs:/certs/wi
- wd_certs:/certs/wd
Expand All @@ -258,7 +259,7 @@ services:
sleep 300
'
healthcheck:
test: ["CMD-SHELL", "[ -r /certs/idp/truststore.jks ]"]
test: ['CMD-SHELL', '[ -r /certs/idp/truststore.jks ]']
interval: 2s
timeout: 5s
retries: 10
Expand All @@ -269,14 +270,14 @@ services:
idpsec:
condition: service_healthy
profiles:
- "saml"
- 'saml'
hostname: idp
<<: *logging
networks:
- os-dev
- mon
ports:
- "8080:8080"
- '8080:8080'
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
Expand All @@ -298,7 +299,7 @@ services:
idp:
condition: service_healthy
profiles:
- "saml"
- 'saml'
hostname: idpsetup
<<: *logging
networks:
Expand Down
Loading

0 comments on commit 622f346

Please sign in to comment.