diff --git a/build-docker-images/README.md b/build-docker-images/README.md deleted file mode 100644 index 8502b8c6..00000000 --- a/build-docker-images/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Wazuh Docker Image Builder - -The creation of the images for the Wazuh stack deployment in Docker is done with the `build-docker-images/build-images.sh` script - -This script initializes the environment variables needed to build each of the images. - -To execute it, make sure to be in the `build-docker-images` directory: - -```bash -cd build-docker-images -``` - -Then execute: - -```bash -./build-images.sh -``` - -The script also allows to build images from other versions of Wazuh by using the `-v` or `--version` argument: - -```bash -./build-images.sh -v 4.14.3 -``` - -To get all the available script options use the -h or --help option: - -```bash -./build-images.sh -h - -Usage: ./build-images.sh [OPTIONS] - - -d, --dev [Optional] Set the development stage you want to build, example rc1 or beta1, not used by default. - -f, --filebeat-module [Optional] Set Filebeat module version. By default 0.5. - -r, --revision [Optional] Package revision. By default 1 - -rg, --registry [Optional] Set the Docker registry to push the images. - -v, --version [Optional] Set the Wazuh version should be builded. By default, 4.14.3. - -m, --multiarch [Optional] Enable multi-architecture builds. - -h, --help Show this help. - -``` \ No newline at end of file diff --git a/indexer-certs-creator/README.md b/indexer-certs-creator/README.md deleted file mode 100644 index 1a6e05e3..00000000 --- a/indexer-certs-creator/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Certificate Creation Image Build - -The dockerfile hosted in this directory is used to build the image required for generating Wazuh Docker single-node and multi-node certificate files - -## Pre-requisites - -1. Verify the Docker Buildx plugin is properly set up -2. For multi-architecture image builds: - - Ensure QEMU is installed - - Check permissions to push images to a Docker registry - -Useful documentation: - -- https://docs.docker.com/build/building/multi-platform/ -- https://www.qemu.org/download/ - -## Procedure - -Execute the following to run the script used to build the wazuh-certs-generator docker image - -```console -cd indexer-certs-creator -``` - -```console -./build-image.sh -v [-m] [-rg ] -``` - -- Replace with the new image desired tag. -- Use the `-m` flag to build a multi-architecture image (supports both `amd64` and `arm64`) - - If multiarch build is enabled, the script will attempt to push the image to the specified registry. This image upload will only work if credentials are properly configured. -- Use the `-rg ` parameter to specify a custom Docker registry (default is Docker Hub) diff --git a/indexer-certs-creator/build-image.sh b/indexer-certs-creator/build-image.sh deleted file mode 100755 index afa0eea2..00000000 --- a/indexer-certs-creator/build-image.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash - -# Wazuh package generator -# Copyright (C) 2023, Wazuh Inc. -# -# This program is a free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public -# License (version 2) as published by the FSF - Free Software -# Foundation. - -WAZUH_CERTS_IMAGE_VERSION="0.0.4" -WAZUH_REGISTRY="docker.io" - -# ----------------------------------------------------------------------------- - -trap ctrl_c INT - -clean() { - exit_code=$1 - exit ${exit_code} -} - -ctrl_c() { - clean 1 -} - -# ----------------------------------------------------------------------------- - -build() { - IMAGE_TAG="${WAZUH_CERTS_IMAGE_VERSION}" - - echo WAZUH_REGISTRY=$WAZUH_REGISTRY > .env - echo IMAGE_TAG=$IMAGE_TAG >> .env - - set -a - source .env - set +a - - if [ "${MULTIARCH}" ]; then - docker buildx bake \ - --file build-image.yml \ - --set *.platform=linux/amd64,linux/arm64 \ - --push \ - --no-cache || clean 1 - else - docker buildx bake \ - --file build-image.yml \ - --load \ - --no-cache || clean 1 - fi - return 0 -} - -# ----------------------------------------------------------------------------- - -help() { - echo - echo "Usage: $0 [OPTIONS]" - echo - echo " -v, --version [Optional] Set the image version. By default ${WAZUH_CERTS_IMAGE_VERSION}." - echo " -rg, --registry [Optional] Set the Docker registry to push the images." - echo " -m, --multiarch [Optional] Enable multi-architecture builds." - echo " -h, --help Show this help." - echo - exit $1 -} - -# ----------------------------------------------------------------------------- - -main() { - while [ -n "${1}" ] - do - case "${1}" in - "-h"|"--help") - help 0 - ;; - "-m"|"--multiarch") - MULTIARCH="true" - shift - ;; - "-rg"|"--registry") - if [ -n "${2}" ]; then - WAZUH_REGISTRY="${2}" - shift 2 - else - help 1 - fi - ;; - "-v"|"--version") - if [ -n "$2" ]; then - WAZUH_CERTS_IMAGE_VERSION="$2" - shift 2 - else - help 1 - fi - ;; - *) - help 1 - esac - done - - build || clean 1 - - clean 0 -} - -main "$@" diff --git a/indexer-certs-creator/build-image.yml b/indexer-certs-creator/build-image.yml deleted file mode 100644 index 58bb13cf..00000000 --- a/indexer-certs-creator/build-image.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2) -services: - wazuh.certs.generator: - build: - context: . - dockerfile: Dockerfile - image: ${WAZUH_REGISTRY}/wazuh/wazuh-certs-generator:${IMAGE_TAG} - hostname: wazuh-certs-generator diff --git a/multi-node/generate-indexer-certs.yml b/multi-node/generate-indexer-certs.yml deleted file mode 100644 index c719d22e..00000000 --- a/multi-node/generate-indexer-certs.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2) -services: - generator: - image: wazuh/wazuh-certs-generator:0.0.4 - hostname: wazuh-certs-generator - environment: - - CERT_TOOL_VERSION=4.14 - volumes: - - ./config/wazuh_indexer_ssl_certs/:/certificates/ - - ./config/certs.yml:/config/certs.yml \ No newline at end of file diff --git a/single-node/generate-indexer-certs.yml b/single-node/generate-indexer-certs.yml deleted file mode 100644 index dfcdca57..00000000 --- a/single-node/generate-indexer-certs.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2) -services: - generator: - image: wazuh/wazuh-certs-generator:0.0.4 - hostname: wazuh-certs-generator - environment: - - CERT_TOOL_VERSION=4.14 - volumes: - - ./config/wazuh_indexer_ssl_certs/:/certificates/ - - ./config/certs.yml:/config/certs.yml