As part of all upward merge (for example, issue and PR), if any docker image used for indexer or dashboard package generation has been modified, it is necessary to update those images uploaded to ECR. Until now this process has been done manually as part of the post release task issue:
Steps
Docker image creation:
stack
Name convention: <aws repository path>:[base/rpm/deb]_[indexer/dashboard]_builder_[amd64/x86_64]_<version>
Copy the related builder.sh script with the Dockerfile and use docker build -t <image name> .
Images required:
Bases, two for indexer and two for dashboard (duplicate images for indexer and dashboard using different arch names), for example:
Note: If the images already exist in AWS with the same name, it will be necessary to disable the immutability of the repo before so that the images can be overwritten (investigate what possibilities we have).
Automation
With this issue we want to make use of a GitHub Actions workflow to automate this process if changes are detected in the images.
For example, before running the package generation, check if the files related to the images have been modified, and if so, proceed with the update.
This will continue to be done manually until the changes in Wazuh packages redesign tier1 are completed and we decide a robust solution moving forward.
Description
Hello team,
As part of all upward merge (for example, issue and PR), if any docker image used for indexer or dashboard package generation has been modified, it is necessary to update those images uploaded to ECR. Until now this process has been done manually as part of the post release task issue:
Steps
Docker image creation:
stack
Name convention:
<aws repository path>:[base/rpm/deb]_[indexer/dashboard]_builder_[amd64/x86_64]_<version>
Copy the related
builder.sh
script with the Dockerfile and usedocker build -t <image name> .
Images required:
Bases, two for indexer and two for dashboard (duplicate images for indexer and dashboard using different arch names), for example:
966237403726.dkr.ecr.us-east-1.amazonaws.com/package-generation:base_indexer_builder_amd64_4-8-0
966237403726.dkr.ecr.us-east-1.amazonaws.com/package-generation:base_indexer_builder_x86_64_4-8-0
966237403726.dkr.ecr.us-east-1.amazonaws.com/package-generation:base_dashboard_builder_amd64_4-8-0
966237403726.dkr.ecr.us-east-1.amazonaws.com/package-generation:base_dashboard_builder_x86_64_4-8-0
Images for rpm, for example:
966237403726.dkr.ecr.us-east-1.amazonaws.com/package-generation:rpm_dashboard_builder_x86_64_4-8-0
966237403726.dkr.ecr.us-east-1.amazonaws.com/package-generation:rpm_indexer_builder_x86_64_4-8-0
Images for deb, for example:
966237403726.dkr.ecr.us-east-1.amazonaws.com/package-generation:deb_dashboard_builder_amd64_4-8-0
966237403726.dkr.ecr.us-east-1.amazonaws.com/package-generation:deb_indexer_builder_amd64_4-8-0
wazuhapp
Name convention:
<aws repository path>:dashboardapp_builder_noarch_<version>
Images required:
966237403726.dkr.ecr.us-east-1.amazonaws.com/package-generation:dashboardapp_builder_noarch_4-8-0
Log in ECR (wazuh-qa)
Upload images with
docker push <image name>
Automation
With this issue we want to make use of a GitHub Actions workflow to automate this process if changes are detected in the images. For example, before running the package generation, check if the files related to the images have been modified, and if so, proceed with the update.