From 5be199b9df054d6e1835d14b4db0ad3c088f6e4e Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 2 Dec 2024 10:30:09 -0300 Subject: [PATCH 1/3] Delete service tag and modifiy docker-compose execution for a new version --- .../Procedure_push_docker_images.yml | 6 ----- .github/workflows/push.yml | 23 ++++--------------- build-docker-images/build-images.sh | 2 +- build-docker-images/build-images.yml | 2 -- multi-node/README.md | 10 ++++---- multi-node/generate-certs.yml | 2 -- single-node/README.md | 8 +++---- single-node/generate-certs.yml | 2 -- 8 files changed, 14 insertions(+), 41 deletions(-) diff --git a/.github/workflows/Procedure_push_docker_images.yml b/.github/workflows/Procedure_push_docker_images.yml index d5c657942..5e571e05e 100644 --- a/.github/workflows/Procedure_push_docker_images.yml +++ b/.github/workflows/Procedure_push_docker_images.yml @@ -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 }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index b6b0c1f6b..814189443 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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 @@ -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 @@ -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: | @@ -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 @@ -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: | diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index 6acdb2d38..3113f6ca9 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -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 diff --git a/build-docker-images/build-images.yml b/build-docker-images/build-images.yml index 90fbb8977..6620b17eb 100644 --- a/build-docker-images/build-images.yml +++ b/build-docker-images/build-images.yml @@ -1,6 +1,4 @@ # Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2) -version: '3.7' - services: wazuh.manager: build: diff --git a/multi-node/README.md b/multi-node/README.md index 64273eb8c..e35c80e90 100644 --- a/multi-node/README.md +++ b/multi-node/README.md @@ -1,6 +1,6 @@ # 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: ``` @@ -8,18 +8,18 @@ $ 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 ``` diff --git a/multi-node/generate-certs.yml b/multi-node/generate-certs.yml index efcd8d87b..c7d4bdf18 100644 --- a/multi-node/generate-certs.yml +++ b/multi-node/generate-certs.yml @@ -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 diff --git a/single-node/README.md b/single-node/README.md index ba1be707a..8ceddb37a 100644 --- a/single-node/README.md +++ b/single-node/README.md @@ -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. diff --git a/single-node/generate-certs.yml b/single-node/generate-certs.yml index 6826ed7d4..0c975babb 100644 --- a/single-node/generate-certs.yml +++ b/single-node/generate-certs.yml @@ -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 From 61c32079fad400e9fc4662385940020a346f07d3 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 2 Dec 2024 10:40:05 -0300 Subject: [PATCH 2/3] Add Changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a45708e05..443b0c0c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ All notable changes to this project will be documented in this file. ### Changed -- None +- Delete service tag and modifiy docker-compose execution for a new version ([#1632](https://github.com/wazuh/wazuh-docker/pull/1632)) +- Remove deprecated attribute version in docker-compose.yml ([#1595](https://github.com/wazuh/wazuh-docker/pull/1595)) ### Fixed From e20e92e4752fbd1a4e165c6f4bb0b1083862a4d5 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Mon, 2 Dec 2024 10:42:58 -0300 Subject: [PATCH 3/3] Add Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 443b0c0c2..6e5da3f50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file. ### Changed - Delete service tag and modifiy docker-compose execution for a new version ([#1632](https://github.com/wazuh/wazuh-docker/pull/1632)) -- Remove deprecated attribute version in docker-compose.yml ([#1595](https://github.com/wazuh/wazuh-docker/pull/1595)) +- Remove deprecated attribute version in docker-compose.yml ([#1595](https://github.com/wazuh/wazuh-docker/pull/1595)) by https://github.com/h3ssan ### Fixed