Closed okynos closed 5 months ago
I found a bug in the Debian 8 repositories for arm, the build worked with Debian 9, I have to confirm that this is valid
Sending build context to Docker daemon 5.12kB
Step 1/6 : FROM arm64v8/debian:8
8: Pulling from arm64v8/debian
559afc254be4: Pull complete
Digest: sha256:410257f511e4fe5cf234148cff2fddf5fc8586f4bb8a9a2d4c56e98190928e7c
Status: Downloaded newer image for arm64v8/debian:8
---> 89af0bd7c556
Step 2/6 : ENV DEBIAN_FRONTEND noninteractive
---> Running in 86595267fd11
Removing intermediate container 86595267fd11
---> d4f781a9fac4
Step 3/6 : RUN apt-get update && apt-get install -y apt-utils && apt-get install -y curl sudo wget expect gnupg build-essential devscripts equivs selinux-basics procps gawk
---> Running in ea3213046e05
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [16.3 kB]
Get:3 http://deb.debian.org jessie Release.gpg [1652 B]
Get:4 http://deb.debian.org jessie Release [77.3 kB]
Fetched 140 kB in 0s (1134 kB/s)
W: Failed to fetch http://security.debian.org/debian-security/dists/jessie/updates/InRelease Unable to find expected entry 'main/binary-arm64/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/binary-arm64/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie/Release Unable to find expected entry 'main/binary-arm64/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update && apt-get install -y apt-utils && apt-get install -y curl sudo wget expect gnupg build-essential devscripts equivs selinux-basics procps gawk' returned a non-zero code: 100
I managed to create the first Wazuh dashboard and indexer 4.3.5 packages for ARM64, I only managed to successfully test the installation of dashboard on both Ubuntu 20.04 and Amazon Linux 2.
It remains to test the installation of indexer and then the operation of the complete stack on these systems.
Another thing that I have to solve is the creation of these packages through the automatic process of Jenkins, I still need to create the necessary images for these processes.
Packages:
We do not have filebeat 7.10.2 packages for arm64 architecture, so this requires further investigation, the options are:
In the branch https://github.com/wazuh/wazuh-packages/tree/1637-RPMSuportfoStack-to4.3 are the changes made for the creation of the arm64 packages
@c-bordon I'm currently trying to test-compile your branch-changes on an arm64 bullseye node (debian 11) ...
How exactly do the commands look like to build the dashboard and indexer packages?
Following https://documentation.wazuh.com/current/development/packaging/generate-deb-package.html there's only the
manager and client
options for the shellscript in debs subdir
Edit I recon these are in here?
https://github.com/wazuh/wazuh-packages/tree/master/stack
Do they get used by the above shell script or are they unrelated?
Hi @thiscantbeserious, I share with you some steps that you should execute to build the packages.
You must work on the https://github.com/wazuh/wazuh-packages/tree/1637-RPMSuportfoStack-to4.3 branch since this development is not completed
You must run the scripts on an arm64 host
You must create the bases for both indexer and dashboard by executing the script as follows:
./generate_base.sh -a arm64 -s /tmp
This script is located at:
wazuh-packages/stack/dashboard/base
wazuh-packages/stack/indexer/base
The -s
is to put the base file in /tmp
, you can change the path or omit this parameter and an output
directory will be created in the directory where the script is located.
You must create the packages by executing the following script:
./build_package.sh -a arm64 -s /tmp --base local --base-path /tmp
This script is located at:
wazuh-packages/stack/dashboard/rpm
wazuh-packages/stack/dashboard/deb
wazuh-packages/stack/indexer/rpm
wazuh-packages/stack/indexer/deb
the -s
works the same as for step 3
--base-path
has to contain the directory where you put the base in step 3
With this, you should be able to build your Wazuh indexer and Wazuh dashboard arm64 packages
By the way, if it helps, I think I got filebeat 7.10.2 to package for ARM64 with this patch (its long lol):
Edit: It packaged! The package test also worked!
Also, while untested, the Wazuh indexer and dashboard package as DEBs successfully with this patch:
Note that RPMs do not package with this, as I have not modified the build scripts for them since I don't know how RPM packaging works xD
Update: Just a note that this was done on the master branch, but I had to change the contents of the VERSION
file since the version listed does not exist on the packages server, causing the builds to throw an error.
Hello, any update on that? Do you know when Wazuh will officially be supported for ARM devices?
I am waiting for this, the indexer and dashboard is not working on ARM. i have a five node ARM cluster in my lab. I really do not want to introduce x64 nodes for Wazuh
I might try to work on this again - I'll have to see if I have the time. I also wanted to say that the patches I made above are pretty outdated, likely won't work with current Wazuh code, and, well, are pretty garbage to be honest. I did all of this remotely with a web-based VS Code instance on an arm-based server, so I had many limitations. I'll try to make some better patches for the future, and even open a PR, but as far as filebeat may go, that might have to be an extra build step on Wazuh's part. I don't think that the version of filebeat Wazuh uses is still maintained. (I'm going off of memory, sorry if some of the details are wrong)
Currently, we have no plans on supporting ARM architectures on wazuh-dashboard
and wazuh-indexer
We might revisit this in the future.
Hello all,
Description
We need to include a procedure and scripts to build ARM packages from indexer and dashboard base package. Some users are requesting ARM support for our Wazuh indexer and dashboard products. We want to include a way to manage the ARM package build and include an automatic procedure to build and release them.
Tasks
Validation