Skip to content

Commit

Permalink
Delete service tag and modifiy docker-compose execution for a new ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
vcerenu committed Dec 2, 2024
1 parent 971858c commit 5be199b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 41 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/Procedure_push_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,6 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
echo "Installed Docker Compose version: $(docker-compose --version)"
- name: Build Wazuh images
run: |
IMAGE_TAG=${{ inputs.image_tag }}
Expand Down
23 changes: 4 additions & 19 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Install docker-compose
run: |
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
- name: Build Wazuh images
run: build-docker-images/build-images.sh

Expand Down Expand Up @@ -76,11 +71,6 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Install docker-compose
run: |
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
- name: Create enviroment variables
run: cat .env > $GITHUB_ENV

Expand Down Expand Up @@ -114,10 +104,10 @@ jobs:
- name: Create single node certficates
run: docker-compose -f single-node/generate-certs.yml run --rm generator
run: docker compose -f single-node/generate-certs.yml run --rm generator

- name: Start single node stack
run: docker-compose -f single-node/docker-compose.yml up -d
run: docker compose -f single-node/docker-compose.yml up -d

- name: Check Wazuh indexer start
run: |
Expand Down Expand Up @@ -211,11 +201,6 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Install docker-compose
run: |
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
- name: Create enviroment variables
run: cat .env > $GITHUB_ENV

Expand Down Expand Up @@ -256,10 +241,10 @@ jobs:
rm -rf wazuh-manager.tar wazuh-indexer.tar wazuh-dashboard.tar wazuh-cert-tool.tar
- name: Create multi node certficates
run: docker-compose -f multi-node/generate-certs.yml run --rm generator
run: docker compose -f multi-node/generate-certs.yml run --rm generator

- name: Start multi node stack
run: docker-compose -f multi-node/docker-compose.yml up -d
run: docker compose -f multi-node/docker-compose.yml up -d

- name: Check Wazuh indexer start
run: |
Expand Down
2 changes: 1 addition & 1 deletion build-docker-images/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ build() {
echo WAZUH_FILEBEAT_MODULE=$WAZUH_FILEBEAT_MODULE >> .env
echo WAZUH_UI_REVISION=$WAZUH_UI_REVISION >> .env

docker-compose -f build-docker-images/build-images.yml --env-file .env build --no-cache
docker compose -f build-docker-images/build-images.yml --env-file .env build --no-cache
docker build -t wazuh/wazuh-cert-tool:$WAZUH_IMAGE_VERSION build-docker-images/cert-tool-image/

return 0
Expand Down
2 changes: 0 additions & 2 deletions build-docker-images/build-images.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2)
version: '3.7'

services:
wazuh.manager:
build:
Expand Down
10 changes: 5 additions & 5 deletions multi-node/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Deploy Wazuh Docker in multi node configuration

This deployment is defined in the `docker-compose.yml` file with two Wazuh manager containers, three Wazuh indexer containers, and one Wazuh dashboard container. It can be deployed by following these steps:
This deployment is defined in the `docker-compose.yml` file with two Wazuh manager containers, three Wazuh indexer containers, and one Wazuh dashboard container. It can be deployed by following these steps:

1) Increase max_map_count on your host (Linux). This command must be run with root permissions:
```
$ sysctl -w vm.max_map_count=262144
```
2) Run the certificate creation script:
```
$ docker-compose -f generate-certs.yml run --rm generator
$ docker compose -f generate-certs.yml run --rm generator
```
3) Start the environment with docker-compose:
3) Start the environment with docker compose:

- In the foregroud:
```
$ docker-compose up
$ docker compose up
```

- In the background:
```
$ docker-compose up -d
$ docker compose up -d
```


Expand Down
2 changes: 0 additions & 2 deletions multi-node/generate-certs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2)
version: '3'

services:
generator:
image: wazuh/wazuh-cert-tool:5.0.0
Expand Down
8 changes: 4 additions & 4 deletions single-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ $ sysctl -w vm.max_map_count=262144
```
2) Run the certificate creation script:
```
$ docker-compose -f generate-certs.yml run --rm generator
$ docker compose -f generate-certs.yml run --rm generator
```
3) Start the environment with docker-compose:
3) Start the environment with docker compose:

- In the foregroud:
```
$ docker-compose up
$ docker compose up
```
- In the background:
```
$ docker-compose up -d
$ docker compose up -d
```

The environment takes about 1 minute to get up (depending on your Docker host) for the first time since Wazuh Indexer must be started for the first time and the indexes and index patterns must be generated.
2 changes: 0 additions & 2 deletions single-node/generate-certs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2)
version: '3'

services:
generator:
image: wazuh/wazuh-cert-tool:5.0.0
Expand Down

0 comments on commit 5be199b

Please sign in to comment.