From d2f8222c75d092624c7eb34dd4584d0ff51864e6 Mon Sep 17 00:00:00 2001 From: Javier Medeot Date: Tue, 25 Jul 2023 17:49:02 -0300 Subject: [PATCH] Replace 4.4 installation and upgrade commands to not latest published version --- .../dashboard/apt/install_dashboard.rst | 7 --- .../dashboard/yum/install_dashboard.rst | 7 --- .../indexer/common/install-indexer.rst | 21 ------- .../wazuh/apk/deploy_wazuh_agent.rst | 18 ------ .../wazuh/deb/deploy_wazuh_agent.rst | 12 ---- .../wazuh/deb/install_wazuh_manager.rst | 7 --- .../wazuh/yum/deploy_wazuh_agent.rst | 11 ---- .../wazuh/yum/install_wazuh_manager.rst | 7 --- .../wazuh/zypp/deploy_wazuh_agent.rst | 11 ---- source/conf.py | 23 ++++++++ .../wazuh-agent/wazuh-agent-package-linux.rst | 56 ++++++++++++------- .../wazuh-dashboard/step-by-step.rst | 20 +++---- .../wazuh-indexer/step-by-step.rst | 16 +++++- .../wazuh-server/step-by-step.rst | 29 +++++----- source/migration-guide/wazuh-dashboard.rst | 17 +++--- source/migration-guide/wazuh-indexer.rst | 13 ++--- .../upgrading-central-components.rst | 12 ++-- source/upgrade-guide/wazuh-agent/linux.rst | 10 ++-- 18 files changed, 120 insertions(+), 177 deletions(-) delete mode 100644 source/_templates/installations/dashboard/apt/install_dashboard.rst delete mode 100644 source/_templates/installations/dashboard/yum/install_dashboard.rst delete mode 100644 source/_templates/installations/indexer/common/install-indexer.rst delete mode 100644 source/_templates/installations/wazuh/apk/deploy_wazuh_agent.rst delete mode 100644 source/_templates/installations/wazuh/deb/deploy_wazuh_agent.rst delete mode 100644 source/_templates/installations/wazuh/deb/install_wazuh_manager.rst delete mode 100644 source/_templates/installations/wazuh/yum/deploy_wazuh_agent.rst delete mode 100644 source/_templates/installations/wazuh/yum/install_wazuh_manager.rst delete mode 100644 source/_templates/installations/wazuh/zypp/deploy_wazuh_agent.rst diff --git a/source/_templates/installations/dashboard/apt/install_dashboard.rst b/source/_templates/installations/dashboard/apt/install_dashboard.rst deleted file mode 100644 index 340380d909..0000000000 --- a/source/_templates/installations/dashboard/apt/install_dashboard.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -.. code-block:: console - - # apt-get -y install wazuh-dashboard - -.. End of include file diff --git a/source/_templates/installations/dashboard/yum/install_dashboard.rst b/source/_templates/installations/dashboard/yum/install_dashboard.rst deleted file mode 100644 index a4e15841dd..0000000000 --- a/source/_templates/installations/dashboard/yum/install_dashboard.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -.. code-block:: console - - # yum -y install wazuh-dashboard - -.. End of include file diff --git a/source/_templates/installations/indexer/common/install-indexer.rst b/source/_templates/installations/indexer/common/install-indexer.rst deleted file mode 100644 index e8c2a1a034..0000000000 --- a/source/_templates/installations/indexer/common/install-indexer.rst +++ /dev/null @@ -1,21 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -#. Install the Wazuh indexer package. - - .. tabs:: - - .. group-tab:: Yum - - .. code-block:: console - - # yum -y install wazuh-indexer - - - - .. group-tab:: APT - - .. code-block:: console - - # apt-get -y install wazuh-indexer - -.. End of include file diff --git a/source/_templates/installations/wazuh/apk/deploy_wazuh_agent.rst b/source/_templates/installations/wazuh/apk/deploy_wazuh_agent.rst deleted file mode 100644 index f32fc2b163..0000000000 --- a/source/_templates/installations/wazuh/apk/deploy_wazuh_agent.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -#. Install the Wazuh agent: - - .. code-block:: console - - # apk add wazuh-agent - -#. Edit the agent configuration to add the address of your Wazuh manager: - - .. code-block:: console - - # export WAZUH_MANAGER="10.0.0.2" && sed -i "s|MANAGER_IP|$WAZUH_MANAGER|g" /var/ossec/etc/ossec.conf - - For more customization options, like agent name or group, see the :doc:`Linux/Unix endpoint configuration ` page. For more security options, check the :doc:`Additional security options ` section. - - -.. End of include file diff --git a/source/_templates/installations/wazuh/deb/deploy_wazuh_agent.rst b/source/_templates/installations/wazuh/deb/deploy_wazuh_agent.rst deleted file mode 100644 index 10771bf012..0000000000 --- a/source/_templates/installations/wazuh/deb/deploy_wazuh_agent.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -.. code-block:: console - - # WAZUH_MANAGER="10.0.0.2" apt-get install wazuh-agent - - -For additional deployment options such as agent name, agent group, and registration password, see the :doc:`Deployment variables for Linux ` 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 ` section. - -.. End of include file diff --git a/source/_templates/installations/wazuh/deb/install_wazuh_manager.rst b/source/_templates/installations/wazuh/deb/install_wazuh_manager.rst deleted file mode 100644 index c2c06d0479..0000000000 --- a/source/_templates/installations/wazuh/deb/install_wazuh_manager.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -.. code-block:: console - - # apt-get -y install wazuh-manager - -.. End of include file diff --git a/source/_templates/installations/wazuh/yum/deploy_wazuh_agent.rst b/source/_templates/installations/wazuh/yum/deploy_wazuh_agent.rst deleted file mode 100644 index ec3ed8a618..0000000000 --- a/source/_templates/installations/wazuh/yum/deploy_wazuh_agent.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -.. code-block:: console - - # WAZUH_MANAGER="10.0.0.2" yum install wazuh-agent - -For additional deployment options such as agent name, agent group, and registration password, see the :doc:`Deployment variables for Linux ` 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 ` section. - -.. End of include file diff --git a/source/_templates/installations/wazuh/yum/install_wazuh_manager.rst b/source/_templates/installations/wazuh/yum/install_wazuh_manager.rst deleted file mode 100644 index 67445bbec9..0000000000 --- a/source/_templates/installations/wazuh/yum/install_wazuh_manager.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -.. code-block:: console - - # yum -y install wazuh-manager - -.. End of include file diff --git a/source/_templates/installations/wazuh/zypp/deploy_wazuh_agent.rst b/source/_templates/installations/wazuh/zypp/deploy_wazuh_agent.rst deleted file mode 100644 index 408cea3044..0000000000 --- a/source/_templates/installations/wazuh/zypp/deploy_wazuh_agent.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. Copyright (C) 2015, Wazuh, Inc. - -.. code-block:: console - - # WAZUH_MANAGER="10.0.0.2" zypper install wazuh-agent - -For additional deployment options such as agent name, agent group, and registration password, see the :doc:`Deployment variables for Linux ` 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 ` section. - -.. End of include file diff --git a/source/conf.py b/source/conf.py index 56f0d3ef33..9946185a46 100644 --- a/source/conf.py +++ b/source/conf.py @@ -639,6 +639,29 @@ def customReplacements(app, docname, source): "|WAZUH_SPLUNK_REV_CURRENT_8.1|" : "1", } +if is_latest_release: + custom_replacements["|WAZUH_INDEXER_RPM_PKG_INSTALL|"] = '' + custom_replacements["|WAZUH_MANAGER_RPM_PKG_INSTALL|"] = '' + custom_replacements["|WAZUH_DASHBOARD_RPM_PKG_INSTALL|"] = '' + custom_replacements["|WAZUH_INDEXER_DEB_PKG_INSTALL|"] = '' + custom_replacements["|WAZUH_MANAGER_DEB_PKG_INSTALL|"] = '' + custom_replacements["|WAZUH_DASHBOARD_DEB_PKG_INSTALL|"] = '' + custom_replacements["|WAZUH_AGENT_RPM_PKG_INSTALL|"] = '' + custom_replacements["|WAZUH_AGENT_DEB_PKG_INSTALL|"] = '' + custom_replacements["|WAZUH_AGENT_ZYPP_PKG_INSTALL|"] = '' + custom_replacements["|WAZUH_AGENT_APK_PKG_INSTALL|"] = '' +else: + custom_replacements["|WAZUH_INDEXER_RPM_PKG_INSTALL|"] = '-' + custom_replacements["|WAZUH_CURRENT|"] + '-' + custom_replacements["|WAZUH_INDEXER_CURRENT_REV|"] + custom_replacements["|WAZUH_MANAGER_RPM_PKG_INSTALL|"] = '-' + custom_replacements["|WAZUH_CURRENT|"] + '-' + custom_replacements["|WAZUH_REVISION_YUM_MANAGER_X86|"] + custom_replacements["|WAZUH_DASHBOARD_RPM_PKG_INSTALL|"] = '-' + custom_replacements["|WAZUH_CURRENT|"] + '-' + custom_replacements["|WAZUH_DASHBOARD_CURRENT_REV_RPM|"] + custom_replacements["|WAZUH_INDEXER_DEB_PKG_INSTALL|"] = '=' + custom_replacements["|WAZUH_CURRENT|"] + '-' + custom_replacements["|WAZUH_INDEXER_CURRENT_REV|"] + custom_replacements["|WAZUH_MANAGER_DEB_PKG_INSTALL|"] = '=' + custom_replacements["|WAZUH_CURRENT|"] + '-' + custom_replacements["|WAZUH_REVISION_DEB_MANAGER_X86|"] + custom_replacements["|WAZUH_DASHBOARD_DEB_PKG_INSTALL|"] = '=' + custom_replacements["|WAZUH_CURRENT|"] + '-' + custom_replacements["|WAZUH_DASHBOARD_CURRENT_REV_DEB|"] + custom_replacements["|WAZUH_AGENT_RPM_PKG_INSTALL|"] = '-' + custom_replacements["|WAZUH_CURRENT|"] + '-' + custom_replacements["|WAZUH_REVISION_YUM_AGENT_X86|"] + custom_replacements["|WAZUH_AGENT_DEB_PKG_INSTALL|"] = '=' + custom_replacements["|WAZUH_CURRENT|"] + '-' + custom_replacements["|WAZUH_REVISION_DEB_AGENT_X86|"] + custom_replacements["|WAZUH_AGENT_ZYPP_PKG_INSTALL|"] = '-' + custom_replacements["|WAZUH_CURRENT|"] + '-' + '1' + custom_replacements["|WAZUH_AGENT_APK_PKG_INSTALL|"] = '=' + custom_replacements["|WAZUH_CURRENT|"] + '-' + custom_replacements["|WAZUH_REVISION_APK_AGENT_X86_64|"] + # -- Customizations --------------------------------------------------------- ## emptyTocNodes ## diff --git a/source/installation-guide/wazuh-agent/wazuh-agent-package-linux.rst b/source/installation-guide/wazuh-agent/wazuh-agent-package-linux.rst index de0f307a2e..f6c1d29972 100644 --- a/source/installation-guide/wazuh-agent/wazuh-agent-package-linux.rst +++ b/source/installation-guide/wazuh-agent/wazuh-agent-package-linux.rst @@ -55,37 +55,53 @@ Deploy a Wazuh agent #. To deploy the Wazuh agent on your endpoint, select your package manager and edit the ``WAZUH_MANAGER`` variable to contain your Wazuh manager IP address or hostname. - - .. tabs:: - - - .. group-tab:: Yum - - - .. include:: ../../_templates/installations/wazuh/yum/deploy_wazuh_agent.rst - + .. tabs:: + .. group-tab:: Yum - .. group-tab:: APT - + .. code-block:: console + + # WAZUH_MANAGER="10.0.0.2" yum install wazuh-agent|WAZUH_AGENT_RPM_PKG_INSTALL| + + For additional deployment options such as agent name, agent group, and registration password, see the :doc:`Deployment variables for Linux ` 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 ` section. - .. include:: ../../_templates/installations/wazuh/deb/deploy_wazuh_agent.rst - + .. group-tab:: APT + .. code-block:: console + + # WAZUH_MANAGER="10.0.0.2" apt-get install wazuh-agent|WAZUH_AGENT_DEB_PKG_INSTALL| + + For additional deployment options such as agent name, agent group, and registration password, see the :doc:`Deployment variables for Linux ` 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 ` section. - .. group-tab:: ZYpp - + .. group-tab:: ZYpp - .. include:: ../../_templates/installations/wazuh/zypp/deploy_wazuh_agent.rst + .. code-block:: console + + # WAZUH_MANAGER="10.0.0.2" zypper install wazuh-agent|WAZUH_AGENT_ZYPP_PKG_INSTALL| + For additional deployment options such as agent name, agent group, and registration password, see the :doc:`Deployment variables for Linux ` 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 ` section. - .. group-tab:: APK - + .. group-tab:: APK - .. include:: ../../_templates/installations/wazuh/apk/deploy_wazuh_agent.rst + #. Install the Wazuh agent: + + .. code-block:: console - + # apk add wazuh-agent|WAZUH_AGENT_APK_PKG_INSTALL| + + #. Edit the agent configuration to add the address of your Wazuh manager: + + .. code-block:: console + + # export WAZUH_MANAGER="10.0.0.2" && sed -i "s|MANAGER_IP|$WAZUH_MANAGER|g" /var/ossec/etc/ossec.conf + + For more customization options, like agent name or group, see the :doc:`Linux/Unix endpoint configuration ` page. For more security options, check the :doc:`Additional security options ` section. #. Enable and start the Wazuh agent service. diff --git a/source/installation-guide/wazuh-dashboard/step-by-step.rst b/source/installation-guide/wazuh-dashboard/step-by-step.rst index 74d9dc79ac..c150631490 100644 --- a/source/installation-guide/wazuh-dashboard/step-by-step.rst +++ b/source/installation-guide/wazuh-dashboard/step-by-step.rst @@ -46,23 +46,21 @@ Adding the Wazuh repository Installing the Wazuh dashboard ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - #. Install the Wazuh dashboard package. +#. Install the Wazuh dashboard package. - .. tabs:: + .. tabs:: - .. group-tab:: Yum - - - .. include:: /_templates/installations/dashboard/yum/install_dashboard.rst - - - - .. group-tab:: APT + .. group-tab:: Yum + .. code-block:: console - .. include:: /_templates/installations/dashboard/apt/install_dashboard.rst + # yum -y install wazuh-dashboard|WAZUH_DASHBOARD_RPM_PKG_INSTALL| + .. group-tab:: APT + .. code-block:: console + + # apt-get -y install wazuh-dashboard|WAZUH_DASHBOARD_DEB_PKG_INSTALL| Configuring the Wazuh dashboard ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/source/installation-guide/wazuh-indexer/step-by-step.rst b/source/installation-guide/wazuh-indexer/step-by-step.rst index 2921f062d3..3391da6993 100644 --- a/source/installation-guide/wazuh-indexer/step-by-step.rst +++ b/source/installation-guide/wazuh-indexer/step-by-step.rst @@ -66,7 +66,21 @@ Adding the Wazuh repository Installing the Wazuh indexer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - .. include:: /_templates/installations/indexer/common/install-indexer.rst +#. Install the Wazuh indexer package. + + .. tabs:: + + .. group-tab:: Yum + + .. code-block:: console + + # yum -y install wazuh-indexer|WAZUH_INDEXER_RPM_PKG_INSTALL| + + .. group-tab:: APT + + .. code-block:: console + + # apt-get -y install wazuh-indexer|WAZUH_INDEXER_DEB_PKG_INSTALL| Configuring the Wazuh indexer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/source/installation-guide/wazuh-server/step-by-step.rst b/source/installation-guide/wazuh-server/step-by-step.rst index bab2792289..84a7f03289 100644 --- a/source/installation-guide/wazuh-server/step-by-step.rst +++ b/source/installation-guide/wazuh-server/step-by-step.rst @@ -54,22 +54,19 @@ Installing the Wazuh manager #. Install the Wazuh manager package. - .. tabs:: - - - .. group-tab:: Yum - - - .. include:: /_templates/installations/wazuh/yum/install_wazuh_manager.rst - - - - .. group-tab:: APT - - - .. include:: /_templates/installations/wazuh/deb/install_wazuh_manager.rst - - + .. tabs:: + + .. group-tab:: Yum + + .. code-block:: console + + # yum -y install wazuh-manager|WAZUH_MANAGER_RPM_PKG_INSTALL| + + .. group-tab:: APT + + .. code-block:: console + + # apt-get -y install wazuh-manager|WAZUH_MANAGER_DEB_PKG_INSTALL| #. Enable and start the Wazuh manager service. diff --git a/source/migration-guide/wazuh-dashboard.rst b/source/migration-guide/wazuh-dashboard.rst index 695c615900..283b73f5e2 100644 --- a/source/migration-guide/wazuh-dashboard.rst +++ b/source/migration-guide/wazuh-dashboard.rst @@ -51,20 +51,19 @@ To guarantee a correct operation of Wazuh, make sure to also migrate from Open D #. Install the Wazuh dashboard package. - .. tabs:: - - .. group-tab:: Yum - - - .. include:: /_templates/installations/dashboard/yum/install_dashboard.rst - + .. tabs:: + .. group-tab:: Yum - .. group-tab:: APT + .. code-block:: console + # yum -y install wazuh-dashboard|WAZUH_DASHBOARD_RPM_PKG_INSTALL| - .. include:: /_templates/installations/dashboard/apt/install_dashboard.rst + .. group-tab:: APT + .. code-block:: console + + # apt-get -y install wazuh-dashboard|WAZUH_DASHBOARD_DEB_PKG_INSTALL| .. note:: diff --git a/source/migration-guide/wazuh-indexer.rst b/source/migration-guide/wazuh-indexer.rst index 20370823e2..9d8b1e2226 100644 --- a/source/migration-guide/wazuh-indexer.rst +++ b/source/migration-guide/wazuh-indexer.rst @@ -60,22 +60,19 @@ Follow this guide to migrate from Open Distro for Elasticsearch 1.13 to the Wazu #. Install the Wazuh indexer. - .. tabs:: + .. tabs:: .. group-tab:: Yum - .. code-block:: console - - # yum -y install wazuh-indexer - + .. code-block:: console + # yum -y install wazuh-indexer|WAZUH_INDEXER_RPM_PKG_INSTALL| .. group-tab:: APT - .. code-block:: console - - # apt-get -y install wazuh-indexer + .. code-block:: console + # apt-get -y install wazuh-indexer|WAZUH_INDEXER_DEB_PKG_INSTALL| #. Create the ``/etc/wazuh-indexer/certs`` directory, copy your old certificates to the new location and change ownership and permissions. Note that the ``admin.pem`` and ``admin-key.pem`` certificates do not exist on every Elasticsearch node. diff --git a/source/upgrade-guide/upgrading-central-components.rst b/source/upgrade-guide/upgrading-central-components.rst index 2c0ae5f501..d568691c4d 100644 --- a/source/upgrade-guide/upgrading-central-components.rst +++ b/source/upgrade-guide/upgrading-central-components.rst @@ -110,13 +110,13 @@ In the case of having a Wazuh indexer cluster with multiple nodes, the cluster w .. code-block:: console - # yum upgrade wazuh-indexer + # yum upgrade wazuh-indexer|WAZUH_INDEXER_RPM_PKG_INSTALL| .. group-tab:: APT .. code-block:: console - # apt-get install wazuh-indexer + # apt-get install wazuh-indexer|WAZUH_INDEXER_DEB_PKG_INSTALL| #. Restart the service. @@ -163,13 +163,13 @@ When upgrading a multi-node Wazuh manager cluster, run the upgrade in every node .. code-block:: console - # yum upgrade wazuh-manager + # yum upgrade wazuh-manager|WAZUH_MANAGER_RPM_PKG_INSTALL| .. group-tab:: APT .. code-block:: console - # apt-get install wazuh-manager + # apt-get install wazuh-manager|WAZUH_MANAGER_DEB_PKG_INSTALL| .. note:: @@ -217,13 +217,13 @@ Upgrading the Wazuh dashboard .. code-block:: console - # yum upgrade wazuh-dashboard + # yum upgrade wazuh-dashboard|WAZUH_DASHBOARD_RPM_PKG_INSTALL| .. group-tab:: APT .. code-block:: console - # apt-get install wazuh-dashboard + # apt-get install wazuh-dashboard|WAZUH_DASHBOARD_DEB_PKG_INSTALL| #. Restart the Wazuh dashboard: diff --git a/source/upgrade-guide/wazuh-agent/linux.rst b/source/upgrade-guide/wazuh-agent/linux.rst index 3a51517418..8d7d6a2ad1 100644 --- a/source/upgrade-guide/wazuh-agent/linux.rst +++ b/source/upgrade-guide/wazuh-agent/linux.rst @@ -46,7 +46,7 @@ Select your package manager and follow the instructions to upgrade the Wazuh age .. code-block:: console - # yum upgrade wazuh-agent + # yum upgrade wazuh-agent|WAZUH_AGENT_RPM_PKG_INSTALL| #. It is recommended to disable the Wazuh repository in order to avoid undesired upgrades and compatibility issues as the Wazuh agent should always be in the same or an older version than the Wazuh manager. @@ -73,10 +73,10 @@ Select your package manager and follow the instructions to upgrade the Wazuh age #. Upgrade the Wazuh agent to the latest version. - .. code-block:: console + .. code-block:: console # apt-get update - # apt-get install wazuh-agent + # apt-get install wazuh-agent|WAZUH_AGENT_DEB_PKG_INSTALL| #. It is recommended to disable the Wazuh repository in order to avoid undesired upgrades and compatibility issues as the Wazuh agent should always be in the same or an older version than the Wazuh manager. Skip this step if the package is set to a ``hold`` state. @@ -128,9 +128,9 @@ Select your package manager and follow the instructions to upgrade the Wazuh age #. Upgrade the Wazuh agent to the latest version. - .. code-block:: console + .. code-block:: console - # zypper update wazuh-agent + # zypper update wazuh-agent|WAZUH_AGENT_ZYPP_PKG_INSTALL| #. It is recommended to disable the Wazuh repository in order to avoid undesired upgrades and compatibility issues as the Wazuh agent should always be in the same or an older version than the Wazuh manager.