Skip to content

Commit

Permalink
Update WPK documentation: adapt new names and paths
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasTurina committed Apr 29, 2024
1 parent 05965bf commit 1e9d9cf
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 32 deletions.
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,9 @@ 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 version and package type validations |
| +-------------------+---------------+----------+------------------------------+----------------------------------------------------------------------------------+
| | **package_type** | string | no | Inferred by the manager | Specify the type of package to use to upgrade the agents (rpm, deb) |
+-----------------+-------------------+---------------+----------+------------------------------+----------------------------------------------------------------------------------+

Example message:
Expand All @@ -66,7 +68,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,19 @@ 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:
- 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.
- Y is the machine's architecture, and
- Z is the type of package included in the WPK file.

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 +32,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/*.
This repository structure is necessary for the manager to check the agent OS, version, architecture, and type of package 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/linux/rpm/x86_64/*.
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,35 @@ 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>`__)
.. |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>`__)

+--------------+------------------+--------------+-------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+==================+==============+===============================+
| Linux | |WAZUH_CURRENT| | 64bit | |WPK_Linux| |
+--------------+------------------+--------------+-------------------------------+
+--------------+-----------------+--------------+-------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+=================+==============+===============================+
| Linux (deb) | |WAZUH_CURRENT| | 64bit | |WPK_Linux_DEB| |
+--------------+-----------------+--------------+-------------------------------+
| Linux (rpm) | |WAZUH_CURRENT| | 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>`__)

+--------------+---------+--------------+------------------------------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+=========+==============+======================================================+
| Windows | |WAZUH_CURRENT_WINDOWS| | 32/64bit | |WPK_Windows| |
+--------------+---------+--------------+------------------------------------------------------+
+--------------+-------------------------+--------------+------------------------------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+=========================+==============+======================================================+
| Windows | |WAZUH_CURRENT_WINDOWS| | 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>`__)

+--------------+------------------+--------------+---------------------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+==================+==============+=============================================+
| macOS | |WAZUH_CURRENT_OSX| | 64bit | |WPK_macOS| |
+--------------+------------------+--------------+---------------------------------------------+
+--------------+---------------------+--------------+---------------------------------------------+
| Distribution | Version | Architecture | WPK Package |
+==============+=====================+==============+=============================================+
| macOS | |WAZUH_CURRENT_OSX| | 64bit | |WPK_macOS| |
+--------------+---------------------+--------------+---------------------------------------------+

0 comments on commit 1e9d9cf

Please sign in to comment.