You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, I tried to follow the Docker guide as I do not want to install dependencies and the process is more agile, here I see that the documentation does not state which requirements are necessary to generate a Wazuh indexer package using the local package generation
Following the Docker guide, it states to use a provided Docker environment, which redirects to the master branch, this is wrong as the 4.9 documentation should point to the v4.9.0 tag (or the last patch of that minor)
That link redirected to a GitHub readme which stated as the first sentence to install Docker Desktop, which I didn't want to install, so I returned to the local package generation.
The local package generation states to run the following command bash packaging_scripts/build.sh -a x64 -d tar -n $(bash packaging_scripts/baptizer.sh -a x64 -d tar -m), which created a TAR file successfully, then I followed the Assembly stage and used the DEB tab
This tab does not specify any command to be executed or redirect to any documentation about how to generate the final package, it just explains what to the assemble.sh script works, the same happens for the RPM tab, but, in exchange, the TAR tab does specify a command to generate the TAR package
This is confusing because as a user, I want to generate a package, I do not want to learn what the scripts do, I want to know which command I need to execute and how, if I want more info, I will look at the code, the repositories README or the description of the documentation itself, but a step by step seems to be excessive for me
By intuition, I executed the TAR tab command with deb instead of tar, and it worked until I got an error about command not found: mvn, as I didn't install any dependencies I expected this to happen.
As I can't generate a package using that method, I changed again to the Docker Desktop guide and tried to install it, but I got errors related to the qemu process, finally, I skipped the requisites section and deployed two containers that I used to generate and assemble the final package, I want to remark that the Docker Desktop install is not marked as optional and there is no reference about deploy those containers in the Wazuh documentation itself
The Wazuh documentation guide for package generation should be simple and clear, and should not depend on users to investigate how to build a package looking on the GitHub repository without any indication, as other package generation guides, it should:
Specify which requirements are needed to follow each method (docker or local)
How to get the Wazuh indexer code cloning the repository and how to checkout to the desired branch (specified by the documentation version - tag)
Which steps should the user follow to complete each method, instead of splitting methods, each method should say how to build and assemble it - One start, One end, No detours)
Examples of commands
Links references
Documentation should not
Reference to another GitHub branch version different from the documentation if any link is needed
Relay on the user to follow external guides on GitHub, those can be added as helpers instead
State a requirement in an external link as required if can be skipped (Docker Desktop)
An example of this would be (where local generation has different tabs for each system [rpm/deb/tar])
- Requirements
- Docker
- Docker engine, etc
- Local
- Maven x.y.z
- Docker generation
- Install requisites
- Setup environment
- ./dev.sh up
- Build
- docker exec -it wi-build_4.9.1 bash packaging_scripts/build.sh -a x64 -d deb
- Assemble
- docker exec -it wi-assemble_4.9.1 bash packaging_scripts/assemble.sh -a x64 -d deb
- Destroy environment
- ./dev.sh stop/down
- Local generation
- Install requisites
- Build
- Scripts help
- bash packaging_scripts/build.sh -a x64 -d deb -n $(bash packaging_scripts/baptizer.sh -a x64 -d deb -m)
- Assemble
- Scripts help
- bash packaging_scripts/assemble.sh -a x64 -d deb -r 1
- References
- Script info
- Links
- Repository
Actually, unless you have extensive knowledge about how the repository works, it is very difficult to generate a Wazuh indexer package following the official documentation, we should improve it
Description
In the testing done in the issue wazuh/wazuh-qa#5753, I tried to generate an RPM and a DEB package using the Wazuh documentation for package generation https://documentation.wazuh.com/current/development/packaging/generate-indexer-package.html
First, I tried to follow the Docker guide as I do not want to install dependencies and the process is more agile, here I see that the documentation does not state which requirements are necessary to generate a Wazuh indexer package using the local package generation
Following the Docker guide, it states to use a provided Docker environment, which redirects to the
master
branch, this is wrong as the 4.9 documentation should point to thev4.9.0
tag (or the last patch of that minor)That link redirected to a GitHub readme which stated as the first sentence to install
Docker Desktop
, which I didn't want to install, so I returned to the local package generation.The local package generation states to run the following command
bash packaging_scripts/build.sh -a x64 -d tar -n $(bash packaging_scripts/baptizer.sh -a x64 -d tar -m)
, which created aTAR
file successfully, then I followed theAssembly
stage and used the DEB tabThis tab does not specify any command to be executed or redirect to any documentation about how to generate the final package, it just explains what to the
assemble.sh
script works, the same happens for the RPM tab, but, in exchange, the TAR tab does specify a command to generate the TAR packageThis is confusing because as a user, I want to generate a package, I do not want to learn what the scripts do, I want to know which command I need to execute and how, if I want more info, I will look at the code, the repositories README or the description of the documentation itself, but a step by step seems to be excessive for me
By intuition, I executed the TAR tab command with
deb
instead oftar
, and it worked until I got an error aboutcommand not found: mvn
, as I didn't install any dependencies I expected this to happen.As I can't generate a package using that method, I changed again to the Docker Desktop guide and tried to install it, but I got errors related to the
qemu
process, finally, I skipped the requisites section and deployed two containers that I used to generate and assemble the final package, I want to remark that the Docker Desktop install is not marked as optional and there is no reference about deploy those containers in the Wazuh documentation itselfThe Wazuh documentation guide for package generation should be simple and clear, and should not depend on users to investigate how to build a package looking on the GitHub repository without any indication, as other package generation guides, it should:
Documentation should not
An example is the Wazuh manager/agent guide: https://documentation.wazuh.com/current/development/packaging/generate-deb-rpm-package.html
An example of this would be (where local generation has different tabs for each system [rpm/deb/tar])
Actually, unless you have extensive knowledge about how the repository works, it is very difficult to generate a Wazuh indexer package following the official documentation, we should improve it
Related #419
The text was updated successfully, but these errors were encountered: