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

Modify the documentation including the new macOS Apple silicon installers #6296

Merged
merged 5 commits into from
Aug 4, 2023
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
1 change: 1 addition & 0 deletions source/development/packaging/generate-osx-package.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Execute the ``generate_wazuh_packages.sh`` script, with the different options yo
Usage: ./generate_wazuh_packages.sh [OPTIONS]

Build options:
-a, --architecture <arch> [Optional] Select architecture to build (intel64 or arm64). Default: intel64
-b, --branch <branch> [Required] Select Git branch or tag.
-s, --store-path <path> [Optional] Set the destination absolute path of package.
-j, --jobs <number> [Optional] Number of parallel jobs when compiling.
Expand Down
17 changes: 11 additions & 6 deletions source/installation-guide/packages-list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,21 @@ Windows
| XP or later | 32/64bits | |WindowsXP_32_64| |
+-----------------+--------------+---------------------------+

.. _packages_list_agent_macos:

macOS
^^^^^

.. |macOS_64| replace:: `wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.pkg <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/macos/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.pkg>`__ (`sha512 <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/checksums/wazuh/|WAZUH_CURRENT_OSX|/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.pkg.sha512>`__)
.. |macOS_intel_64| replace:: `wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.intel64.pkg <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/macos/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.intel64.pkg>`__ (`sha512 <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/checksums/wazuh/|WAZUH_CURRENT_OSX|/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.intel64.pkg.sha512>`__)
.. |macOS_arm64| replace:: `wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.arm64.pkg <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/macos/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.arm64.pkg>`__ (`sha512 <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/checksums/wazuh/|WAZUH_CURRENT_OSX|/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.arm64.pkg.sha512>`__)

+--------------+-------------------------+
| Architecture | Package |
+==============+=========================+
| 64bits | |macOS_64| |
+--------------+-------------------------+
+---------------+-------------------------+
| Architecture | Package |
+===============+=========================+
| Intel | |macOS_intel_64| |
+---------------+-------------------------+
| Apple silicon | |macOS_arm64| |
+---------------+-------------------------+

Solaris
^^^^^^^
Expand Down
102 changes: 57 additions & 45 deletions source/installation-guide/wazuh-agent/wazuh-agent-package-macos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,69 +3,81 @@
.. meta::
:description: Learn more about how to successfully install the Wazuh agent on macOS systems in this section of our Installation Guide.

.. _wazuh_agent_package_macos:

Installing Wazuh agents on macOS endpoints
==========================================

The agent runs on the endpoint you want to monitor and communicates with the Wazuh server, sending data in near real-time through an encrypted and authenticated.

.. note:: You need root user privileges to run all the commands described below.

#. To start the installation process, download the `Wazuh agent for macOS <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/macos/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.pkg>`_. The package is suitable for macOS Sierra or later.

#. Select the installation method you want to follow: command line interface (CLI) or graphical user interface (GUI).
.. |macOS_intel_64| replace:: `wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.intel64.pkg <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/macos/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.intel64.pkg>`__
.. |macOS_arm64| replace:: `wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.arm64.pkg <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/macos/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.arm64.pkg>`__

.. tabs::

.. group-tab:: CLI

#. To deploy the Wazuh agent on your endpoint, edit the ``WAZUH_MANAGER`` variable to contain your Wazuh manager IP address or hostname and run the following command.

.. code-block:: console

# echo "WAZUH_MANAGER='10.0.0.2'" > /tmp/wazuh_envs && installer -pkg wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.pkg -target /

.. note:: For version 4.4.2 and earlier, run the following command instead. Replace ``<WAZUH.VERSION-REV>`` with your package version, such as ``4.4.2-1``.
:class: not-long
#. To start the installation process, download the Wazuh agent according to your architecture:

.. code-block:: console

# launchctl setenv WAZUH_MANAGER "10.0.0.2" && installer -pkg wazuh-agent-<WAZUH.VERSION-REV>.pkg -target /
- **Intel**: |macOS_intel_64|. Suitable for macOS Sierra and later.

For additional deployment options such as agent name, agent group, and registration password, see the :doc:`Deployment variables for macOS </user-manual/deployment-variables/deployment-variables-macos>` section.

.. note:: Alternatively, if you want to install an agent without registering it, omit the deployment variables. To learn more about the different registration methods, see the :doc:`Wazuh agent enrollment </user-manual/agent-enrollment/index>` section.
- **Apple silicon**: |macOS_arm64|. Suitable for macOS Big Sur and later.

#. To complete the installation process, start the Wazuh agent.

.. code-block:: console

# /Library/Ossec/bin/wazuh-control start
#. Select the installation method you want to follow: Command line interface (CLI) or graphical user interface (GUI).

.. tabs::

The installation process is now complete, and the Wazuh agent is successfully deployed and running on your macOS endpoint.
.. group-tab:: CLI

#. To deploy the Wazuh agent on your endpoint, choose your architecture, edit the ``WAZUH_MANAGER`` variable to contain your Wazuh manager IP address or hostname, and run the following command.

.. tabs::

.. group-tab:: GUI

#. To install the Wazuh agent on your system, run the downloaded file and follow the steps in the installation wizard. If you are not sure how to answer some of the prompts, use the default answers.

.. thumbnail:: ../../images/installation/macos-agent.png
:align: center
:title: macOS agent installer
:alt: macOS agent installer

#. To complete the installation process, start the Wazuh agent.

.. code-block:: console

# sudo /Library/Ossec/bin/wazuh-control start

The installation process is now complete, and the Wazuh agent is successfully installed on your macOS endpoint. The next step is to register and configure the agent to communicate with the Wazuh server. To perform this action, see the :doc:`Wazuh agent enrollment </user-manual/agent-enrollment/index>` section.
.. group-tab:: Intel

.. code-block:: console

# echo "WAZUH_MANAGER='10.0.0.2'" > /tmp/wazuh_envs && installer -pkg wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.intel64.pkg -target /


.. group-tab:: Apple silicon

.. versionadded:: 4.5.1

.. code-block:: console

# echo "WAZUH_MANAGER='10.0.0.2'" > /tmp/wazuh_envs && installer -pkg wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.arm64.pkg -target /


For additional deployment options such as agent name, agent group, and registration password, see the :doc:`Deployment variables for macOS </user-manual/deployment-variables/deployment-variables-macos>` section.

.. note:: Alternatively, if you want to install an agent without registering it, omit the deployment variables. To learn more about the different registration methods, see the :doc:`Wazuh agent enrollment </user-manual/agent-enrollment/index>` section.

#. To complete the installation process, start the Wazuh agent.

.. code-block:: console

# /Library/Ossec/bin/wazuh-control start


The installation process is now complete, and the Wazuh agent is successfully deployed and running on your macOS endpoint.


.. group-tab:: GUI

#. To install the Wazuh agent on your system, run the downloaded file and follow the steps in the installation wizard. If you are not sure how to answer some of the prompts, use the default answers.

.. thumbnail:: ../../images/installation/macos-agent.png
:align: center
:title: macOS agent installer
:alt: macOS agent installer

#. To complete the installation process, start the Wazuh agent.

.. code-block:: console

# sudo /Library/Ossec/bin/wazuh-control start

The installation process is now complete, and the Wazuh agent is successfully installed on your macOS endpoint. The next step is to register and configure the agent to communicate with the Wazuh server. To perform this action, see the :doc:`Wazuh agent enrollment </user-manual/agent-enrollment/index>` section.

By default, all agent files are stored in ``/Library/Ossec/`` after the installation.


Uninstall a Wazuh agent
-----------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Follow these steps to update the Wazuh agent 1.x to the Wazuh agent 2.x:

On MacOS X system the Wazuh agent upgrade can be done by deleting the previous version and installing the Wazuh agent 2.x from scratch. As the Wazuh agent's ``ossec.conf`` configuration file will be overwritten, it is recommended to backup the old configuration file and import previous settings where needed.

More information about the process can be found in the :ref:`Wazuh agent installation on MacOS X <wazuh_agent_package_macos>` section.
More information about the process can be found in the :doc:`Wazuh agent installation on MacOS X </installation-guide/wazuh-agent/wazuh-agent-package-macos>` section.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ To upgrade the Wazuh agent, choose the appropriate tab for the desired operating

On MacOS X system the Wazuh agent upgrade can be done by deleting the previous version and installing the newest version of the Wazuh agent from scratch. As the Wazuh agent's ``ossec.conf`` configuration file will be overwritten it is recommended to backup the old configuration file and import previous settings where needed.

More information about the process can be found in the :ref:`Wazuh agent installation and deployment on MacOS X <wazuh_agent_package_macos>` section.
More information about the process can be found in the :doc:`Wazuh agent installation and deployment on MacOS X </installation-guide/wazuh-agent/wazuh-agent-package-macos>` section.


.. group-tab:: Unix based systems
Expand Down
30 changes: 26 additions & 4 deletions source/upgrade-guide/wazuh-agent/macos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,42 @@ Follow these steps to upgrade Wazuh agents locally on macOS systems. If you want

.. note:: To perform the agent upgrade, administrator privileges are required.

#. Download the latest `macOS installer <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/macos/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.pkg>`_.
.. |macOS_intel_64| replace:: `wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.intel64.pkg <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/macos/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.intel64.pkg>`__
.. |macOS_arm64| replace:: `wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.arm64.pkg <https://packages.wazuh.com/|WAZUH_CURRENT_MAJOR_OSX|/macos/wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.arm64.pkg>`__


#. Download the latest macOS installer:

- **Intel**: |macOS_intel_64|.

- **Apple silicon**: |macOS_arm64|.

#. Run the macOS installer by using the command line interface (CLI) or the graphical user interface (GUI).

.. tabs::

.. group-tab:: CLI

To upgrade the Wazuh agent by using the command line, run the installer:
To upgrade the Wazuh agent by using the command line, select your architecture, and run the installer:

.. tabs::

.. group-tab:: Intel

.. code-block:: console

# installer -pkg wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.intel64.pkg -target /


.. code-block:: console
.. group-tab:: Apple silicon

.. code-block:: console

# installer -pkg wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.pkg -target /
# installer -pkg wazuh-agent-|WAZUH_CURRENT_OSX|-|WAZUH_REVISION_OSX|.arm64.pkg -target /

.. note::

Packages earlier than 4.5.1 are not available for ARM64 architectures.

.. group-tab:: GUI

Expand Down
Loading