-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update package generation tools #188
Comments
The curent tooling to generate packages were not designed with the capapbility of sypporting different naming conventions in mind. Not only that, but also the packages' metadata must be different. We'll then distinguish 2 types of packages:
Depending on the package type, the release packages follow this naming convention:
As the GH workflow and tooling currently in the default branch (4.9.0) does already accomplish with the requirements for development packages, we'll replicate that for release packages, forking the workflow in 2 pipelines. flowchart LR
A[Build] -->|inputs| B(name generator)
B --> C{is_production}
C -->|Name One| D[pre-release]
C -->|Name Two| E[release]
In order to do that, the current workflow becomes the pre-release pipelined, so needs to be converted to a reusable workflow, and must be able to communicate the package name, build parameters and the packages themselve between the different levels of reusable workflows. The build workflow in the pipeline will take the controller role, reading and evaluting the inputs, deciding which workflow to run and interfacing with them (data sharing). This workflow is of new creation. The pre-release pipeline will be different from the release workflow in what it doesn't need to check if the package already exists in the S3 bucket, as thes packages will always be uploaded. Both pre-release and release packages will receive the name of the package to build from the controller. It is very possible that we need to refactor the bash scripts used to manage the packaging process (see #180) to completely fullfill the requirements. |
Working on https://github.com/wazuh/internal-devel-requests/issues/187#issuecomment-2018579969
|
The combination of packages to be generated are specified to the workflow using arrays. These arrays are then used to generate a dynamic build matrix in GitHub Actions. distribution:
description: '[ "tar", "rpm", "deb" ]'
type: string
default: '[ "rpm", "deb" ]'
architecture:
description: '[ "x64", "arm64" ]'
type: string
default: '[ "x64" ]' References: https://www.kenmuse.com/blog/dynamic-build-matrices-in-github-actions/ |
The size of the packages has increased quite a bit compared with the previous version (4.7.3).
From these sizes, we understand that OpenSearch has grown up, so it's expected that our packages grow too. There is only an 18 MB difference, which can correspond to some additional files we include into the packages, such as bash scripts or the alerts index template. |
Custom metadata checksRPMbash-5.2# rpm -qi /packages/wazuh-indexer-4.9.0-1.x86_64.rpm
Name : wazuh-indexer
Version : 4.9.0
Release : customrev7
Architecture: x86_64
Install Date: (not installed)
Group : Application/Internet
Size : 1066800744
License : Apache-2.0
Signature : (none)
Source RPM : wazuh-indexer-4.9.0-customrev7.src.rpm
Build Date : Tue Mar 26 12:34:23 2024
Build Host : fv-az659-298.luykedtozraezimdvwvtsy4hga.cx.internal.cloudapp.net
Packager : Wazuh, Inc <info@wazuh.com>
Vendor : Wazuh, Inc <info@wazuh.com>
URL : https://www.wazuh.com/
Summary : An open source distributed and RESTful search engine
Description :
Wazuh indexer is a near real-time full-text search and analytics engine that
gathers security-related data into one platform. This Wazuh central component
indexes and stores alerts generated by the Wazuh server. Wazuh indexer can be
configured as a single-node or multi-node cluster, providing scalability and
high availability.
For more information, see: https://www.wazuh.com/ DEBroot@166d9bf9c8d0:/# dpkg -I /packages/wazuh-indexer_4.9.0-1_amd64.deb
new Debian package, version 2.0.
size 837113394 bytes: control archive=27479 bytes.
1704 bytes, 30 lines conffiles
676 bytes, 13 lines control
103182 bytes, 994 lines md5sums
1470 bytes, 53 lines * postinst #!/bin/bash
1118 bytes, 31 lines * preinst #!/bin/bash
828 bytes, 26 lines * prerm #!/bin/bash
Package: wazuh-indexer
Version: 4.9.0
Architecture: amd64
Maintainer: Wazuh Indexer Team <info@wazuh.com>
Installed-Size: 1036878
Section: web
Priority: optional
Homepage: https://www.wazuh.com/
Description: Wazuh indexer is a near real-time full-text search and analytics engine that gathers security-related data into one platform.
This Wazuh central component indexes and stores alerts generated by the Wazuh server.
Wazuh indexer can be configured as a single-node or multi-node cluster, providing scalability and high availability.
Documentation can be found at https://documentation.wazuh.com/current/getting-started/components/wazuh-indexer.html
License: Apache-2.0 |
A convenience workflow ( |
Description
In the context of the packages redesign project, new requirements have been defined or have changed slightly, so we need to update our tools to accomplish with these requirements, which in our case are:
is_stage
input).stage
. In such case, the old package must be overwritten with the new one.For a complete list of requirements, refer to https://github.com/wazuh/internal-devel-requests/issues/187.
The text was updated successfully, but these errors were encountered: