Skip to content
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

Improve wazuh indexer package generation guide #7988

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

f-galland
Copy link
Member

Description

This PR intends to make the Indexer's package generation guide more concise and easier to follow, by providing simple instructions and commands with a clearer format.

Checks

Docs building

  • Compiles without warnings.

Code formatting and web optimization

  • Uses three spaces indentation.
  • Adds or updates meta descriptions accordingly.
  • Updates the redirects.js script if necessary (check this guide).

Writing style

  • Uses present tense, active voice, and semi-formal registry.
  • Uses short, simple sentences.
  • Uses bold for user interface elements, italics for key terms or emphasis, and code font for Bash commands, file names, REST paths, and code.

@f-galland f-galland marked this pull request as ready for review November 26, 2024 13:09
@f-galland f-galland self-assigned this Nov 26, 2024
@f-galland f-galland requested a review from a team November 26, 2024 13:16
@QU3B1M
Copy link
Member

QU3B1M commented Nov 26, 2024

Based on the changes proposed on the PR wazuh/wazuh-indexer#560, the package generation guide could be updated with something like this

.. Copyright (C) 2015, Wazuh, Inc.

.. meta::
   :description: Wazuh provides an automated way of building packages for the Wazuh components. Learn how to build your own Wazuh indexer package in this section of our documentation.

=============
Wazuh indexer
=============

Local packages generation
#########################

While official ``Wazuh Indexer`` packages are generated in a GitHub Actions pipeline, packages can also be compiled using a docker container.

.. contents:: Table of contents:
   :depth: 2
   :local:

.. raw:: html

  <div class="accordion-section open">

Pre-requisistes
===============

1. Clone the ``Wazuh Indexer`` GitHub repository and switch to the ``v|WAZUH_CURRENT|`` tag:

.. code:: console

   git clone https://github.com/wazuh/wazuh-indexer/
   git checkout v|WAZUH_CURRENT|

2. Bring the docker environment up:

.. code:: console

   cd wazuh-indexer/docker/builder
   docker build -t wazuh-indexer-builder .
   cd ../..

Build the wazuh-indexer package
=======================

A basic package including only the ``Wazuh Indexer`` engine without extra plugin is generated first.

1. Run the package build process:


.. code:: console

   docker run --rm -v ./artifacts/dist:/home/indexer/artifacts wazuh-indexer-builder

Environment Variables
=====================

You can customize the build process by setting the following environment variables:

- ``INDEXER_BRANCH``: The branch to use for the Wazuh Indexer (default: ``master``).
- ``INDEXER_PLUGINS_BRANCH``: The branch to use for the Wazuh Indexer plugins (default: ``master``).
- ``INDEXER_REPORTING_BRANCH``: The branch to use for the Wazuh Indexer reporting (default: ``master``).
- ``REVISION``: The revision number for the build (default: ``0``).
- ``IS_STAGE``: Whether the build is a staging build (default: ``false``).
- ``DISTRIBUTION``: The distribution format for the package (default: ``tar``).
- ``ARCHITECTURE``: The architecture for the package (default: ``x64``).

Example usage with custom environment variables

.. code:: console

   docker run --rm -e INDEXER_BRANCH="5.0.0" -e INDEXER_PLUGINS_BRANCH="5.0.0" -e INDEXER_REPORTING_BRANCH="5.0.0" -v ./artifacts/dist:/home/indexer/artifacts wazuh-indexer-builder

@QU3B1M QU3B1M linked an issue Nov 26, 2024 that may be closed by this pull request
7 tasks
@AlexRuiz7 AlexRuiz7 added Documentation improvements Documentation improvements level/task Task issue type/enhancement Enhancement issue labels Nov 27, 2024
@AlexRuiz7 AlexRuiz7 requested a review from javimed November 27, 2024 15:22
@AlexRuiz7 AlexRuiz7 marked this pull request as draft November 27, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation improvements Documentation improvements level/task Task issue type/enhancement Enhancement issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify wazuh-indexer build process Improve the Wazuh indexer package generation guide
3 participants