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

Update WPK documentation: adapt new names and paths #7246

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.. meta::
:description: Learn more about the agent upgrade module of Wazuh, responsible for carrying out the entire agent upgrade process remotely.

.. _agent-upgrade-module:

Agent upgrade module
Expand Down Expand Up @@ -48,7 +48,10 @@ The module expects 3 parameters:
| +-------------------+---------------+----------+------------------------------+----------------------------------------------------------------------------------+
| | **use_http** | true, false | no | false | Whether retrieve the WPK file over http or https |
| +-------------------+---------------+----------+------------------------------+----------------------------------------------------------------------------------+
| | **force_upgrade** | true, false | no | false | Forces the agents to upgrade, ignoring version validations |
| | **force_upgrade** | true, false | no | false | Forces the agents to upgrade, ignoring package type and version validations |
| +-------------------+---------------+----------+------------------------------+----------------------------------------------------------------------------------+
| | **package_type** | string | no | Manager-inferred | Specifies the package type for upgrading agents. For example rpm and deb. |
| | | | | | Especially useful for upgrading unrecognized system platforms |
+-----------------+-------------------+---------------+----------+------------------------------+----------------------------------------------------------------------------------+

Example message:
Expand All @@ -66,7 +69,8 @@ The module expects 3 parameters:
"wpk_repo": "packages.wazuh.com/wpk/",
"version": "v4.2.1",
"use_http": false,
"force_upgrade": false
"force_upgrade": false,
"package_type": "rpm"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@ WPK files must be named using the following pattern:

.. code-block:: none

wazuh_agent_W_X_Y_Z.wpk
wazuh_agent_W_X_Y.Z.wpk

Where:
TomasTurina marked this conversation as resolved.
Show resolved Hide resolved
- W is the version of the release,
- X is the name of the operating system,
- Y is the version of the operating system, and
- Z is the machine's architecture.

- ``W`` represents the release version.
- ``X`` denotes the target operating system.
- ``Y`` indicates the machine architecture. Empty for Windows.
- ``Z`` represents the package type included in the WPK file. Empty for Windows.

For instance:

.. code-block:: none

wazuh_agent_v3.0.0_centos_7_x86_64.wpk
wazuh_agent_v4.9.0_linux_x86_64.rpm.wpk


The structure of the repository should be as shown below:
Expand All @@ -32,24 +33,24 @@ The structure of the repository should be as shown below:
:class: output

/
└── centos
└── 7
└── linux
└── rpm
└── x86_64
├── versions
├── wazuh_agent_v3.0.0_centos_7_x86_64.wpk
└── wazuh_agent_v3.1.0_centos_7_x86_64.wpk
├── wazuh_agent_v4.9.0_linux_x86_64.rpm.wpk
└── wazuh_agent_v4.9.1_linux_x86_64.rpm.wpk

Every folder must contain a file named ``versions`` that lists each version represented in the folder, along with the file's SHA1 hash. The latest version must be placed in the first line of this file. For instance:

.. code-block:: console

# cat our_wpk_repo/centos/7/x86_64/versions
# cat our_wpk_repo/linux/rpm/x86_64/versions

.. code-block:: none
:class: output

v3.1.0 f835015c6bbf87356a62bdfd513c7f1ffc16e0af
v3.0.0 df5397c8c4a1b29c42726dfa821330fa1bac7058
v4.9.1 f835015c6bbf87356a62bdfd513c7f1ffc16e0af
v4.9.0 df5397c8c4a1b29c42726dfa821330fa1bac7058


This repository structure is necessary for the manager to check the agent OS, version, and architecture and look for the correct upgrade package. For example, for an agent installed on Centos 7 x86_64, the manager will look for the latest package in *our_wpk_repo/centos/7/x86_64/*.
The Wazuh manager checks the agent OS, architecture, and package type. This repository structure helps the manager look for the correct upgrade package. For example, for an agent installed on Centos 7 x86_64, the manager looks for the latest package in ``our_wpk_repo/linux/rpm/x86_64/``.
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,38 @@ WPK List
Linux
-----

.. |WPK_Linux| replace:: `wazuh_agent_v|WAZUH_CURRENT|_linux_x86_64.wpk <https://packages.wazuh.com/4.x/wpk/linux/x86_64/wazuh_agent_v|WAZUH_CURRENT|_linux_x86_64.wpk>`__ (`sha512 <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR|/checksums/wazuh/|WAZUH_CURRENT|/wazuh_agent_v|WAZUH_CURRENT|_linux_x86_64.wpk.sha512>`__)

+--------------+------------------+--------------+-------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+==================+==============+===============================+
| Linux | |WAZUH_CURRENT| | 64bit | |WPK_Linux| |
+--------------+------------------+--------------+-------------------------------+
.. |WPK_Linux_DEB| replace:: `wazuh_agent_v|WAZUH_CURRENT|_linux_amd64.deb.wpk <https://packages.wazuh.com/4.x/wpk/linux/deb/amd64/wazuh_agent_v|WAZUH_CURRENT|_linux_amd64.deb.wpk>`__ (`sha512 <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR|/checksums/wazuh/|WAZUH_CURRENT|/wazuh_agent_v|WAZUH_CURRENT|_linux_amd64.deb.wpk.sha512>`__)
.. |WPK_Linux_RPM| replace:: `wazuh_agent_v|WAZUH_CURRENT|_linux_x86_64.rpm.wpk <https://packages.wazuh.com/4.x/wpk/linux/rpm/x86_64/wazuh_agent_v|WAZUH_CURRENT|_linux_x86_64.rpm.wpk>`__ (`sha512 <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR|/checksums/wazuh/|WAZUH_CURRENT|/wazuh_agent_v|WAZUH_CURRENT|_linux_x86_64.rpm.wpk.sha512>`__)
.. |WAZUH_CUR_VER| replace:: |WAZUH_CURRENT|

TomasTurina marked this conversation as resolved.
Show resolved Hide resolved
+--------------+-----------------+--------------+-------------------------------+
| Distribution | Version | Architecture | WPK Package |
TomasTurina marked this conversation as resolved.
Show resolved Hide resolved
+==============+=================+==============+===============================+
| Linux (deb) | |WAZUH_CUR_VER| | 64bit | |WPK_Linux_DEB| |
+--------------+-----------------+--------------+-------------------------------+
| Linux (rpm) | |WAZUH_CUR_VER| | 64bit | |WPK_Linux_RPM| |
+--------------+-----------------+--------------+-------------------------------+

Windows
-------

.. |WPK_Windows| replace:: `wazuh_agent_v|WAZUH_CURRENT_WINDOWS|_windows.wpk <https://packages.wazuh.com/4.x/wpk/windows/wazuh_agent_v|WAZUH_CURRENT_WINDOWS|_windows.wpk>`__ (`sha512 <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_WINDOWS|/checksums/wazuh/|WAZUH_CURRENT_WINDOWS|/wazuh_agent_v|WAZUH_CURRENT_WINDOWS|_windows.wpk.sha512>`__)
TomasTurina marked this conversation as resolved.
Show resolved Hide resolved
.. |WAZUH_CUR_WIN| replace:: |WAZUH_CURRENT_WINDOWS|

TomasTurina marked this conversation as resolved.
Show resolved Hide resolved
+--------------+---------+--------------+------------------------------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+=========+==============+======================================================+
| Windows | |WAZUH_CURRENT_WINDOWS| | 32/64bit | |WPK_Windows| |
+--------------+---------+--------------+------------------------------------------------------+
+--------------+-------------------------+--------------+------------------------------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+=========================+==============+======================================================+
| Windows | |WAZUH_CUR_WIN| | 32/64bit | |WPK_Windows| |
+--------------+-------------------------+--------------+------------------------------------------------------+

macOS
-----

.. |WPK_macOS| replace:: `wazuh_agent_v|WAZUH_CURRENT_OSX|_macos_x86_64.wpk <https://packages.wazuh.com/4.x/wpk/macos/x86_64/pkg/wazuh_agent_v|WAZUH_CURRENT_OSX|_macos_x86_64.wpk>`__ (`sha512 <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/checksums/wazuh/|WAZUH_CURRENT_OSX|/wazuh_agent_v|WAZUH_CURRENT_OSX|_macos_x86_64.wpk.sha512>`__)
.. |WPK_macOS| replace:: `wazuh_agent_v|WAZUH_CURRENT_OSX|_macos_intel64.pkg.wpk <https://packages.wazuh.com/4.x/wpk/macos/pkg/intel64/wazuh_agent_v|WAZUH_CURRENT_OSX|_macos_intel64.pkg.wpk>`__ (`sha512 <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/checksums/wazuh/|WAZUH_CURRENT_OSX|/wazuh_agent_v|WAZUH_CURRENT_OSX|_macos_intel64.pkg.wpk.sha512>`__)
javimed marked this conversation as resolved.
Show resolved Hide resolved
.. |WAZUH_CUR_OSX| replace:: |WAZUH_CURRENT_OSX|

TomasTurina marked this conversation as resolved.
Show resolved Hide resolved
+--------------+------------------+--------------+---------------------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+==================+==============+=============================================+
| macOS | |WAZUH_CURRENT_OSX| | 64bit | |WPK_macOS| |
+--------------+------------------+--------------+---------------------------------------------+
+--------------+---------------------+--------------+---------------------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+=====================+==============+=============================================+
| macOS | |WAZUH_CUR_OSX| | 64bit | |WPK_macOS| |
+--------------+---------------------+--------------+---------------------------------------------+
Loading