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

Add documentation for Wazuh Indexer Packages generation #7297

Closed
wants to merge 7 commits into from

Conversation

f-galland
Copy link
Member

Description

This PR adds documentation for the generation of Wazuh Indexer packages.

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 requested a review from AlexRuiz7 May 8, 2024 19:12
@AlexRuiz7 AlexRuiz7 linked an issue May 9, 2024 that may be closed by this pull request
Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should guide the user towards the wazuh-indexer repo, instructing them to clone the repo and lead them to the appropriate folder containing the tools to build packages.

source/development/packaging/generate-indexer-package.rst Outdated Show resolved Hide resolved
source/development/packaging/generate-indexer-package.rst Outdated Show resolved Hide resolved
source/development/packaging/generate-indexer-package.rst Outdated Show resolved Hide resolved
AlexRuiz7
AlexRuiz7 previously approved these changes May 13, 2024
source/development/packaging/generate-indexer-package.rst Outdated Show resolved Hide resolved
@AlexRuiz7 AlexRuiz7 marked this pull request as ready for review May 13, 2024 15:56
@javimed javimed added level/task Task issue type/enhancement Enhancement issue labels May 14, 2024
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a new entry in redirects.js for the new generate-indexer-package page. For example:

/* Pages added in 4.9 */

newUrls['4.9'] = [
  '/release-notes/release-4-9-0.html',
  '/deployment-options/offline-installation/index.html',
  '/deployment-options/offline-installation/step-by-step.html',
  '/deployment-options/offline-installation/installation-assistant.html',
  '/development/packaging/generate-indexer-package.html',
];

/* Pages no longer available in 4.9 */

Comment on lines +1 to +3
=============
Wazuh Indexer
=============
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include the copyright notice and a meta description for search engines. For example

.. 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 indeer package in this section of our documentation.

Wazuh Indexer
=============

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't break sentences in multiple lines use one line paragraphs. For example

The packages' generation process is orchestrated by two scripts, which are found within the ``packaging_scripts`` folder of the repository:

Comment on lines +40 to +55
.. tabs::

.. group-tab:: RPM
.. code-block:: console

# docker exec -it wi-build_|WAZUH_CURRENT| bash packaging_scripts/build.sh -a x64 -d rpm

.. group-tab:: DEB
.. code-block:: console

# docker exec -it wi-build_|WAZUH_CURRENT| bash packaging_scripts/build.sh -a x64 -d deb

.. group-tab:: TAR
.. code-block:: console

# docker exec -it wi-build_|WAZUH_CURRENT| bash packaging_scripts/build.sh -a x64 -d tar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. tabs::
.. group-tab:: RPM
.. code-block:: console
# docker exec -it wi-build_|WAZUH_CURRENT| bash packaging_scripts/build.sh -a x64 -d rpm
.. group-tab:: DEB
.. code-block:: console
# docker exec -it wi-build_|WAZUH_CURRENT| bash packaging_scripts/build.sh -a x64 -d deb
.. group-tab:: TAR
.. code-block:: console
# docker exec -it wi-build_|WAZUH_CURRENT| bash packaging_scripts/build.sh -a x64 -d tar
.. tabs::
.. group-tab:: RPM
.. code-block:: console
# docker exec -it wi-build_|WAZUH_CURRENT| bash packaging_scripts/build.sh -a x64 -d rpm
.. group-tab:: DEB
.. code-block:: console
# docker exec -it wi-build_|WAZUH_CURRENT| bash packaging_scripts/build.sh -a x64 -d deb
.. group-tab:: TAR
.. code-block:: console
# docker exec -it wi-build_|WAZUH_CURRENT| bash packaging_scripts/build.sh -a x64 -d tar

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three spaces indentation for neat alignment

For local package generation, use the ``build.sh`` script. Take a look
at the ``build.yml`` workflow file for an example of usage.

.. code:: bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. code:: bash
.. code:: console

..

``rpmbuild`` is invoked from ``wazuh-indexer/artifacts/tmp/rpm``.
It creates the {BUILD,RPMS,SOURCES,SRPMS,SPECS,TMP} folders and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{BUILD,RPMS,SOURCES,SRPMS,SPECS,TMP} seems to need text formatting such as code font style.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use .. code-block:: none rather than simply :: for consistency and clarity

| -- prerm
| -- postinst

.. _rpm-1:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of .. _rpm-1: here?


# bash packaging_scripts/assemble.sh -a x64 -d tar -r 1

.. _deb-1:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here

The packages' generation process is guided through bash scripts. Below
is a reference of their inputs, outputs and code:

.. code:: console
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block doesn't seem to be for the terminal (console). Use proper syntax highlighting or none for just a code style formatted block.

@rauldpm
Copy link
Member

rauldpm commented May 31, 2024

Please use the correct branch convention, and create a new PR with the correct branch naming, check the following documentation:

@javimed when request changes are finished please close this PR and ask to open a new one with the latest changes

Copy link
Member

@rauldpm rauldpm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong branch naming

@f-galland f-galland closed this May 31, 2024
@f-galland f-galland deleted the wazuh-indexer-package-generation branch May 31, 2024 11:57
@f-galland
Copy link
Member Author

@javimed, @rauldpm, @AlexRuiz7:

I'm renaming the branch which closes this PR. I'll create a new one with your suggested changes.

@AlexRuiz7
Copy link
Member

Superseded by #7355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/enhancement Enhancement issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Document the generation of wazuh-indexer packages
4 participants