From 5b4502ee0d6b49c09a13644afca6c3efd99247aa Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 4 Dec 2024 14:08:02 -0300 Subject: [PATCH 01/27] Fix formatting for package paths in dashboard packaging documentation --- source/development/packaging/generate-dashboard-package.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 12a756ab8e..5e1e57ee5c 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -11,7 +11,7 @@ The packages generation process is orchestrated by the ``build-packages.sh`` scr - version - revision - distribution -- wazuh-dashboard, wazuh-dashboard-plugins, and wazuh-security-dashboards-plugin package paths +- ``wazuh-dashboard``, ``wazuh-dashboard-plugins``, and ``wazuh-security-dashboards-plugin`` package paths Official packages are built through a GitHub Actions pipeline, however, the process is designed to be independent enough for maximum portability. The building process is self-contained in the application code. From 09c52c06bbea2fa4d94d4630faf6a7c53b45457e Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 4 Dec 2024 14:08:13 -0300 Subject: [PATCH 02/27] Update generate-dashboard-package.rst to standardize console command format by replacing `#` with `$` --- .../packaging/generate-dashboard-package.rst | 186 +++++++++--------- 1 file changed, 93 insertions(+), 93 deletions(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 5e1e57ee5c..9987a96169 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -28,7 +28,7 @@ Generating zip packages To use the script you first need to generate the packages from these repositories: - ``wazuh-dashboard`` -- ``wazuh-security-dashboards-plugin`` +- ``wazuh-security-dashboards-plugin`` - ``wazuh-dashboard-plugins`` To build the packages, follow these steps: @@ -37,39 +37,39 @@ To build the packages, follow these steps: .. code:: console - # git clone -b https://github.com/wazuh/wazuh-dashboard.git - # cd wazuh-dashboard/ - # yarn osd bootstrap - # yarn build --linux --skip-os-packages --release + $ git clone -b https://github.com/wazuh/wazuh-dashboard.git + $ cd wazuh-dashboard/ + $ yarn osd bootstrap + $ yarn build --linux --skip-os-packages --release Example: .. code:: console - # git clone -b 4.9.0 https://github.com/wazuh/wazuh-dashboard.git - # cd wazuh-dashboard/ - # yarn osd bootstrap - # yarn build --linux --skip-os-packages --release + $ git clone -b 4.9.0 https://github.com/wazuh/wazuh-dashboard.git + $ cd wazuh-dashboard/ + $ yarn osd bootstrap + $ yarn build --linux --skip-os-packages --release #. Clone the Wazuh Security Dashboards Plugin repository in the plugins folder and build the plugin. .. code:: console - # cd plugins/ - # git clone -b https://github.com/wazuh/wazuh-security-dashboards-plugin.git - # cd wazuh-security-dashboards-plugin/ - # yarn - # yarn build + $ cd plugins/ + $ git clone -b https://github.com/wazuh/wazuh-security-dashboards-plugin.git + $ cd wazuh-security-dashboards-plugin/ + $ yarn + $ yarn build Example: .. code:: console - # cd plugins/ - # git clone -b 4.9.0 https://github.com/wazuh/wazuh-security-dashboards-plugin.git - # cd wazuh-security-dashboards-plugin/ - # yarn - # yarn build + $ cd plugins/ + $ git clone -b 4.9.0 https://github.com/wazuh/wazuh-security-dashboards-plugin.git + $ cd wazuh-security-dashboards-plugin/ + $ yarn + $ yarn build #. Clone the Wazuh dashboard plugins repository in the plugins folder, move the contents of the plugins folder to the folder where the repository was cloned and build the plugins. @@ -79,59 +79,59 @@ To build the packages, follow these steps: .. code:: console - # cd ../ - # git clone -b https://github.com/wazuh/wazuh-dashboard-plugins.git - # cd wazuh-dashboard-plugins/ - # cp -r plugins/* ../ - # cd ../main - # yarn - # yarn build - # cd ../wazuh-core/ - # yarn - # yarn build - # cd ../wazuh-check-updates/ - # yarn - # yarn build + $ cd ../ + $ git clone -b https://github.com/wazuh/wazuh-dashboard-plugins.git + $ cd wazuh-dashboard-plugins/ + $ cp -r plugins/* ../ + $ cd ../main + $ yarn + $ yarn build + $ cd ../wazuh-core/ + $ yarn + $ yarn build + $ cd ../wazuh-check-updates/ + $ yarn + $ yarn build Example: .. code:: console - # cd ../ - # git clone -b 4.9.0 https://github.com/wazuh/wazuh-dashboard-plugins.git - # cd wazuh-dashboard-plugins/ - # cp -r plugins/* ../ - # cd ../main - # yarn - # yarn build - # cd ../wazuh-core/ - # yarn - # yarn build - # cd ../wazuh-check-updates/ - # yarn - # yarn build + $ cd ../ + $ git clone -b 4.9.0 https://github.com/wazuh/wazuh-dashboard-plugins.git + $ cd wazuh-dashboard-plugins/ + $ cp -r plugins/* ../ + $ cd ../main + $ yarn + $ yarn build + $ cd ../wazuh-core/ + $ yarn + $ yarn build + $ cd ../wazuh-check-updates/ + $ yarn + $ yarn build #. Zip the packages and move them to the packages folder .. code:: console - # cd ../../../ - # mkdir packages - # cd packages - # zip -r -j ./dashboard-package.zip ../wazuh-dashboard/target/opensearch-dashboards-2.13.0-linux-x64.tar.gz - # zip -r -j ./security-package.zip ../wazuh-dashboard/plugins/wazuh-security-dashboards-plugin/build/security-dashboards-.0.zip - # zip -r -j ./wazuh-package.zip ../wazuh-dashboard/plugins/wazuh-check-updates/build/wazuhCheckUpdates-.zip ../wazuh-dashboard/plugins/main/build/wazuh-.zip ../wazuh-dashboard/plugins/wazuh-core/build/wazuhCore-.zip + $ cd ../../../ + $ mkdir packages + $ cd packages + $ zip -r -j ./dashboard-package.zip ../wazuh-dashboard/target/opensearch-dashboards-2.13.0-linux-x64.tar.gz + $ zip -r -j ./security-package.zip ../wazuh-dashboard/plugins/wazuh-security-dashboards-plugin/build/security-dashboards-.0.zip + $ zip -r -j ./wazuh-package.zip ../wazuh-dashboard/plugins/wazuh-check-updates/build/wazuhCheckUpdates-.zip ../wazuh-dashboard/plugins/main/build/wazuh-.zip ../wazuh-dashboard/plugins/wazuh-core/build/wazuhCore-.zip Example: .. code:: console - # cd ../../../ - # mkdir packages - # cd packages - # zip -r -j ./dashboard-package.zip ../wazuh-dashboard/target/opensearch-dashboards-2.13.0-linux-x64.tar.gz - # zip -r -j ./security-package.zip ../wazuh-dashboard/plugins/wazuh-security-dashboards-plugin/build/security-dashboards-2.13.0.0.zip - # zip -r -j ./wazuh-package.zip ../wazuh-dashboard/plugins/wazuh-check-updates/build/wazuhCheckUpdates-2.13.0.zip ../wazuh-dashboard/plugins/main/build/wazuh-2.13.0.zip ../wazuh-dashboard/plugins/wazuh-core/build/wazuhCore-2.13.0.zip + $ cd ../../../ + $ mkdir packages + $ cd packages + $ zip -r -j ./dashboard-package.zip ../wazuh-dashboard/target/opensearch-dashboards-2.13.0-linux-x64.tar.gz + $ zip -r -j ./security-package.zip ../wazuh-dashboard/plugins/wazuh-security-dashboards-plugin/build/security-dashboards-2.13.0.0.zip + $ zip -r -j ./wazuh-package.zip ../wazuh-dashboard/plugins/wazuh-check-updates/build/wazuhCheckUpdates-2.13.0.zip ../wazuh-dashboard/plugins/main/build/wazuh-2.13.0.zip ../wazuh-dashboard/plugins/wazuh-core/build/wazuhCore-2.13.0.zip At this point you must have three packages in the ``packages`` folder: @@ -153,15 +153,15 @@ Run the ``build-packages.sh`` script in the ``dev-tools/build-packages/`` folder .. code:: console - # cd ../wazuh-dashboard/dev-tools/build-packages/ - # ./build-packages.sh -v -r -- -a file:/// -s file:/// -b file:/// + $ cd ../wazuh-dashboard/dev-tools/build-packages/ + $ ./build-packages.sh -v -r -- -a file:/// -s file:/// -b file:/// Example: .. code:: console - # cd ../wazuh-dashboard/dev-tools/build-packages/ - # ./build-packages.sh -v 4.9.0 -r 1 --deb -a file:///packages/wazuh-package.zip -s file:///packages/security-package.zip -b file:///packages/dashboard-package.zip + $ cd ../wazuh-dashboard/dev-tools/build-packages/ + $ ./build-packages.sh -v 4.9.0 -r 1 --deb -a file:///packages/wazuh-package.zip -s file:///packages/security-package.zip -b file:///packages/dashboard-package.zip The package will be generated in the ``output`` folder of the same directory where the script is located. @@ -173,16 +173,16 @@ With this option you can create an image that has the package in tar.gz format a #. Clone the Wazuh dashboard repository. .. code:: console - - # git clone -b https://github.com/wazuh/wazuh-dashboard.git - # cd wazuh-dashboard/dev-tools/build-packages/ - + + $ git clone -b https://github.com/wazuh/wazuh-dashboard.git + $ cd wazuh-dashboard/dev-tools/build-packages/ + Example: - + .. code:: console - - # git clone -b 4.9.0 https://github.com/wazuh/wazuh-dashboard.git - # cd wazuh-dashboard/dev-tools/build-packages/ + + $ git clone -b 4.9.0 https://github.com/wazuh/wazuh-dashboard.git + $ cd wazuh-dashboard/dev-tools/build-packages/ #. Build the Docker image with the following parameters: @@ -194,21 +194,21 @@ With this option you can create an image that has the package in tar.gz format a - ``-t``: Tag of the image. .. code:: console - - # docker build \ + + $ docker build \ --build-arg NODE_VERSION= \ --build-arg WAZUH_DASHBOARDS_BRANCH= \ --build-arg WAZUH_DASHBOARDS_PLUGINS= \ --build-arg WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH= \ --build-arg OPENSEARCH_DASHBOARDS_VERSION= \ - -t \ + -t \ -f wazuh-dashboard.Dockerfile . Example: - + .. code:: console - - # docker build \ + + $ docker build \ --build-arg NODE_VERSION=18.19.0 \ --build-arg WAZUH_DASHBOARDS_BRANCH=4.9.0 \ --build-arg WAZUH_DASHBOARDS_PLUGINS=4.9.0 \ @@ -220,26 +220,26 @@ With this option you can create an image that has the package in tar.gz format a #. Run the Docker image: .. code:: console - - # docker run -d --rm --name wazuh-dashboard-package tail -f /dev/null - + + $ docker run -d --rm --name wazuh-dashboard-package tail -f /dev/null + Example: - + .. code:: console - - # docker run -d --rm --name wazuh-dashboard-package wzd:4.9.0 tail -f /dev/null + + $ docker run -d --rm --name wazuh-dashboard-package wzd:4.9.0 tail -f /dev/null #. Copy the package to the host: .. code:: console - - # docker cp wazuh-dashboard-package:/home/node/packages/. + + $ docker cp wazuh-dashboard-package:/home/node/packages/. Example: - + .. code:: console - - # docker cp wazuh-dashboard-package:/home/node/packages/. / + + $ docker cp wazuh-dashboard-package:/home/node/packages/. / This copies the final package and the packages that were used to generate the final package. @@ -248,15 +248,15 @@ With this option you can create an image that has the package in tar.gz format a - ``-v``: Version of the package. - ``-r``: Revision of the package. - ``-p``: Path to the package in tar.gz format generated in the previous step - + .. code:: console - - # ./launcher.sh -v -r -p - + + $ ./launcher.sh -v -r -p + Example: - + .. code:: console - - # ./launcher.sh -v 4.9.0 -r 1 -p file:///wazuh-dashboard-4.9.0-1-linux-x64.tar.gz + + $ ./launcher.sh -v 4.9.0 -r 1 -p file:///wazuh-dashboard-4.9.0-1-linux-x64.tar.gz The package will be generated in the ``output`` folder of the ``rpm`` or ``deb`` folder. \ No newline at end of file From 29740fcc4b7f4474c8b12bcb7dccbf15f202d510 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 4 Dec 2024 14:15:21 -0300 Subject: [PATCH 03/27] Standardize branch versioning in dashboard package commands to use v|WAZUH_CURRENT| instead of hardcoded version --- .../development/packaging/generate-dashboard-package.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 9987a96169..bbc360d3c3 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -46,7 +46,7 @@ To build the packages, follow these steps: .. code:: console - $ git clone -b 4.9.0 https://github.com/wazuh/wazuh-dashboard.git + $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-dashboard.git $ cd wazuh-dashboard/ $ yarn osd bootstrap $ yarn build --linux --skip-os-packages --release @@ -66,7 +66,7 @@ To build the packages, follow these steps: .. code:: console $ cd plugins/ - $ git clone -b 4.9.0 https://github.com/wazuh/wazuh-security-dashboards-plugin.git + $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-security-dashboards-plugin.git $ cd wazuh-security-dashboards-plugin/ $ yarn $ yarn build @@ -98,7 +98,7 @@ To build the packages, follow these steps: .. code:: console $ cd ../ - $ git clone -b 4.9.0 https://github.com/wazuh/wazuh-dashboard-plugins.git + $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-dashboard-plugins.git $ cd wazuh-dashboard-plugins/ $ cp -r plugins/* ../ $ cd ../main @@ -181,7 +181,7 @@ With this option you can create an image that has the package in tar.gz format a .. code:: console - $ git clone -b 4.9.0 https://github.com/wazuh/wazuh-dashboard.git + $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-dashboard.git $ cd wazuh-dashboard/dev-tools/build-packages/ #. Build the Docker image with the following parameters: From 5c7d7d3cc52c71b56b4afa200301ad3a05448f56 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 4 Dec 2024 14:16:04 -0300 Subject: [PATCH 04/27] Standardize versioning in package build command to use variable |WAZUH_CURRENT| for improved flexibility in documentation --- source/development/packaging/generate-dashboard-package.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index bbc360d3c3..6619c01e9e 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -161,7 +161,7 @@ Example: .. code:: console $ cd ../wazuh-dashboard/dev-tools/build-packages/ - $ ./build-packages.sh -v 4.9.0 -r 1 --deb -a file:///packages/wazuh-package.zip -s file:///packages/security-package.zip -b file:///packages/dashboard-package.zip + $ ./build-packages.sh -v |WAZUH_CURRENT| -r 1 --deb -a file:///packages/wazuh-package.zip -s file:///packages/security-package.zip -b file:///packages/dashboard-package.zip The package will be generated in the ``output`` folder of the same directory where the script is located. From a8ac9f0910011fd24f7e9492946bf6789327b627 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 4 Dec 2024 14:18:02 -0300 Subject: [PATCH 05/27] Standardize image tagging in generate-dashboard-package.rst to use variable |WAZUH_CURRENT| for better version management --- source/development/packaging/generate-dashboard-package.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 6619c01e9e..03860d9317 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -214,7 +214,7 @@ With this option you can create an image that has the package in tar.gz format a --build-arg WAZUH_DASHBOARDS_PLUGINS=4.9.0 \ --build-arg WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH=4.9.0 \ --build-arg OPENSEARCH_DASHBOARDS_VERSION=2.13.0 \ - -t wzd:4.9.0 \ + -t wzd:v|WAZUH_CURRENT| \ -f wazuh-dashboard.Dockerfile . #. Run the Docker image: @@ -227,7 +227,7 @@ With this option you can create an image that has the package in tar.gz format a .. code:: console - $ docker run -d --rm --name wazuh-dashboard-package wzd:4.9.0 tail -f /dev/null + $ docker run -d --rm --name wazuh-dashboard-package wzd:v|WAZUH_CURRENT| tail -f /dev/null #. Copy the package to the host: From f60f0a9f18e86660488a17f247e8e7e4e19631c0 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 4 Dec 2024 14:18:12 -0300 Subject: [PATCH 06/27] Standardize dashboard build arguments in generate-dashboard-package.rst to use |WAZUH_CURRENT| for enhanced version management --- source/development/packaging/generate-dashboard-package.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 03860d9317..cad5962672 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -210,9 +210,9 @@ With this option you can create an image that has the package in tar.gz format a $ docker build \ --build-arg NODE_VERSION=18.19.0 \ - --build-arg WAZUH_DASHBOARDS_BRANCH=4.9.0 \ - --build-arg WAZUH_DASHBOARDS_PLUGINS=4.9.0 \ - --build-arg WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH=4.9.0 \ + --build-arg WAZUH_DASHBOARDS_BRANCH=v|WAZUH_CURRENT| \ + --build-arg WAZUH_DASHBOARDS_PLUGINS=v|WAZUH_CURRENT| \ + --build-arg WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH=v|WAZUH_CURRENT| \ --build-arg OPENSEARCH_DASHBOARDS_VERSION=2.13.0 \ -t wzd:v|WAZUH_CURRENT| \ -f wazuh-dashboard.Dockerfile . From 57802649050560e5f57f1688de25617001b43896 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 4 Dec 2024 14:18:20 -0300 Subject: [PATCH 07/27] Standardize package build command in generate-dashboard-package.rst to use |WAZUH_CURRENT| for improved version management consistency --- source/development/packaging/generate-dashboard-package.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index cad5962672..3d82fcab83 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -257,6 +257,6 @@ With this option you can create an image that has the package in tar.gz format a .. code:: console - $ ./launcher.sh -v 4.9.0 -r 1 -p file:///wazuh-dashboard-4.9.0-1-linux-x64.tar.gz + $ ./launcher.sh -v |WAZUH_CURRENT| -r 1 -p file:///wazuh-dashboard-|WAZUH_CURRENT|-1-linux-x64.tar.gz The package will be generated in the ``output`` folder of the ``rpm`` or ``deb`` folder. \ No newline at end of file From ca52f3f50a0d11ddc2d2d5a73b379ea96c8341f7 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 4 Dec 2024 14:24:41 -0300 Subject: [PATCH 08/27] Fix formatting in generate-dashboard-package.rst to correctly emphasize distribution types for clarity in package generation process --- source/development/packaging/generate-dashboard-package.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 3d82fcab83..7f8b2363dc 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -6,7 +6,7 @@ Wazuh dashboard =============== -The packages generation process is orchestrated by the ``build-packages.sh`` script, which is found within the ``dev-tools/build-packages/`` folder of the repository. This script is responsible for bundling plugins into one single application in tar, rpm and/or deb distributions. It takes the following parameters: +The packages generation process is orchestrated by the ``build-packages.sh`` script, which is found within the ``dev-tools/build-packages/`` folder of the repository. This script is responsible for bundling plugins into one single application in ``tar``, ``rpm`` and/or ``deb`` distributions. It takes the following parameters: - version - revision From 6296c44a243edebd604966f41347336e0d9c746b Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 4 Dec 2024 14:36:36 -0300 Subject: [PATCH 09/27] Add Node.js version variable |NODE_VERSION| to replacements.py and update related documentation in generate-dashboard-package.rst --- source/_variables/replacements.py | 3 +++ .../packaging/generate-dashboard-package.rst | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/source/_variables/replacements.py b/source/_variables/replacements.py index ba1cf56dcf..416be0ff80 100644 --- a/source/_variables/replacements.py +++ b/source/_variables/replacements.py @@ -163,6 +163,9 @@ "|SPLUNK_LATEST_MINOR|" : "8.2", "|WAZUH_SPLUNK_REV_CURRENT_LATEST|" : "1", # 8.2 "|WAZUH_SPLUNK_REV_CURRENT_8.1|" : "1", + # + # === Node.js + "|NODE_VERSION|": "18.19.0", } if is_latest_release: diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 7f8b2363dc..196455469c 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -21,6 +21,12 @@ Build manually Requirements: - Docker +- NVM (Node Version Manager): see `NVM installation guide `_ + + - ``nvm install v|NODE_VERSION|``: installs Node.js version v|NODE_VERSION| + - ``nvm use v|NODE_VERSION|``: sets the current Node.js version to v|NODE_VERSION| + +- Yarn v1.22.22 (Node Package Manager): see `Yarn installation guide `_ Generating zip packages ~~~~~~~~~~~~~~~~~~~~~~~ @@ -39,6 +45,7 @@ To build the packages, follow these steps: $ git clone -b https://github.com/wazuh/wazuh-dashboard.git $ cd wazuh-dashboard/ + $ nvm use v|NODE_VERSION| $ yarn osd bootstrap $ yarn build --linux --skip-os-packages --release @@ -48,6 +55,7 @@ To build the packages, follow these steps: $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-dashboard.git $ cd wazuh-dashboard/ + $ nvm use v|NODE_VERSION| $ yarn osd bootstrap $ yarn build --linux --skip-os-packages --release @@ -58,6 +66,7 @@ To build the packages, follow these steps: $ cd plugins/ $ git clone -b https://github.com/wazuh/wazuh-security-dashboards-plugin.git $ cd wazuh-security-dashboards-plugin/ + $ nvm use v|NODE_VERSION| $ yarn $ yarn build @@ -68,6 +77,7 @@ To build the packages, follow these steps: $ cd plugins/ $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-security-dashboards-plugin.git $ cd wazuh-security-dashboards-plugin/ + $ nvm use v|NODE_VERSION| $ yarn $ yarn build @@ -82,6 +92,7 @@ To build the packages, follow these steps: $ cd ../ $ git clone -b https://github.com/wazuh/wazuh-dashboard-plugins.git $ cd wazuh-dashboard-plugins/ + $ nvm use v|NODE_VERSION| $ cp -r plugins/* ../ $ cd ../main $ yarn @@ -100,6 +111,7 @@ To build the packages, follow these steps: $ cd ../ $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-dashboard-plugins.git $ cd wazuh-dashboard-plugins/ + $ nvm use v|NODE_VERSION| $ cp -r plugins/* ../ $ cd ../main $ yarn @@ -209,7 +221,7 @@ With this option you can create an image that has the package in tar.gz format a .. code:: console $ docker build \ - --build-arg NODE_VERSION=18.19.0 \ + --build-arg NODE_VERSION=|NODE_VERSION| \ --build-arg WAZUH_DASHBOARDS_BRANCH=v|WAZUH_CURRENT| \ --build-arg WAZUH_DASHBOARDS_PLUGINS=v|WAZUH_CURRENT| \ --build-arg WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH=v|WAZUH_CURRENT| \ From 13c351fd5e6af8ef3d2e6435b6880f964e47fb19 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Tue, 10 Dec 2024 16:18:53 -0300 Subject: [PATCH 10/27] Update requirements in generate-dashboard-package.rst to include installation guides for Docker and zip utilities --- source/development/packaging/generate-dashboard-package.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 196455469c..1488a3d10b 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -20,7 +20,8 @@ Build manually Requirements: -- Docker +- Docker: see `Docker installation guide `_ +- zip: see `zip installation guide `_ - NVM (Node Version Manager): see `NVM installation guide `_ - ``nvm install v|NODE_VERSION|``: installs Node.js version v|NODE_VERSION| From 4ffd20a5c6746d48371d4e616e5652ea4e616aa5 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Tue, 10 Dec 2024 16:19:42 -0300 Subject: [PATCH 11/27] Replace |NODE_VERSION| with |WAZUH_DASHBOARD_NODE_VERSION| in replacements.py and update documentation in generate-dashboard-package.rst --- source/_variables/replacements.py | 2 +- .../packaging/generate-dashboard-package.rst | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/_variables/replacements.py b/source/_variables/replacements.py index 416be0ff80..e8b01c17d3 100644 --- a/source/_variables/replacements.py +++ b/source/_variables/replacements.py @@ -165,7 +165,7 @@ "|WAZUH_SPLUNK_REV_CURRENT_8.1|" : "1", # # === Node.js - "|NODE_VERSION|": "18.19.0", + "|WAZUH_DASHBOARD_NODE_VERSION|": "18.19.0", } if is_latest_release: diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 1488a3d10b..ead114b541 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -24,8 +24,8 @@ Requirements: - zip: see `zip installation guide `_ - NVM (Node Version Manager): see `NVM installation guide `_ - - ``nvm install v|NODE_VERSION|``: installs Node.js version v|NODE_VERSION| - - ``nvm use v|NODE_VERSION|``: sets the current Node.js version to v|NODE_VERSION| + - ``nvm install v|WAZUH_DASHBOARD_NODE_VERSION|``: installs Node.js version v|WAZUH_DASHBOARD_NODE_VERSION| + - ``nvm use v|WAZUH_DASHBOARD_NODE_VERSION|``: sets the current Node.js version to v|WAZUH_DASHBOARD_NODE_VERSION| - Yarn v1.22.22 (Node Package Manager): see `Yarn installation guide `_ @@ -46,7 +46,7 @@ To build the packages, follow these steps: $ git clone -b https://github.com/wazuh/wazuh-dashboard.git $ cd wazuh-dashboard/ - $ nvm use v|NODE_VERSION| + $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| $ yarn osd bootstrap $ yarn build --linux --skip-os-packages --release @@ -56,7 +56,7 @@ To build the packages, follow these steps: $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-dashboard.git $ cd wazuh-dashboard/ - $ nvm use v|NODE_VERSION| + $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| $ yarn osd bootstrap $ yarn build --linux --skip-os-packages --release @@ -67,7 +67,7 @@ To build the packages, follow these steps: $ cd plugins/ $ git clone -b https://github.com/wazuh/wazuh-security-dashboards-plugin.git $ cd wazuh-security-dashboards-plugin/ - $ nvm use v|NODE_VERSION| + $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| $ yarn $ yarn build @@ -78,7 +78,7 @@ To build the packages, follow these steps: $ cd plugins/ $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-security-dashboards-plugin.git $ cd wazuh-security-dashboards-plugin/ - $ nvm use v|NODE_VERSION| + $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| $ yarn $ yarn build @@ -93,7 +93,7 @@ To build the packages, follow these steps: $ cd ../ $ git clone -b https://github.com/wazuh/wazuh-dashboard-plugins.git $ cd wazuh-dashboard-plugins/ - $ nvm use v|NODE_VERSION| + $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| $ cp -r plugins/* ../ $ cd ../main $ yarn @@ -112,7 +112,7 @@ To build the packages, follow these steps: $ cd ../ $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-dashboard-plugins.git $ cd wazuh-dashboard-plugins/ - $ nvm use v|NODE_VERSION| + $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| $ cp -r plugins/* ../ $ cd ../main $ yarn @@ -222,7 +222,7 @@ With this option you can create an image that has the package in tar.gz format a .. code:: console $ docker build \ - --build-arg NODE_VERSION=|NODE_VERSION| \ + --build-arg NODE_VERSION=|WAZUH_DASHBOARD_NODE_VERSION| \ --build-arg WAZUH_DASHBOARDS_BRANCH=v|WAZUH_CURRENT| \ --build-arg WAZUH_DASHBOARDS_PLUGINS=v|WAZUH_CURRENT| \ --build-arg WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH=v|WAZUH_CURRENT| \ From 9bee04fae97d4334f3da95aa4c69ad581707254a Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 11 Dec 2024 15:26:01 -0300 Subject: [PATCH 12/27] Refine documentation in generate-dashboard-package.rst by removing external link for zip installation, simplifying requirements --- source/development/packaging/generate-dashboard-package.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index ead114b541..e95a8e8da7 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -21,7 +21,7 @@ Build manually Requirements: - Docker: see `Docker installation guide `_ -- zip: see `zip installation guide `_ +- zip - NVM (Node Version Manager): see `NVM installation guide `_ - ``nvm install v|WAZUH_DASHBOARD_NODE_VERSION|``: installs Node.js version v|WAZUH_DASHBOARD_NODE_VERSION| From 05eaf5e095a029ede00109eb668e5589a1e6b5f6 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 11 Dec 2024 15:27:42 -0300 Subject: [PATCH 13/27] Add WAZUH_DASHBOARD_YARN_VERSION to replacements.py and update documentation in generate-dashboard-package.rst accordingly --- source/_variables/replacements.py | 1 + source/development/packaging/generate-dashboard-package.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/_variables/replacements.py b/source/_variables/replacements.py index e8b01c17d3..f770dfba07 100644 --- a/source/_variables/replacements.py +++ b/source/_variables/replacements.py @@ -166,6 +166,7 @@ # # === Node.js "|WAZUH_DASHBOARD_NODE_VERSION|": "18.19.0", + "|WAZUH_DASHBOARD_YARN_VERSION|": "1.22.22", } if is_latest_release: diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index e95a8e8da7..4a2c82bca5 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -27,7 +27,7 @@ Requirements: - ``nvm install v|WAZUH_DASHBOARD_NODE_VERSION|``: installs Node.js version v|WAZUH_DASHBOARD_NODE_VERSION| - ``nvm use v|WAZUH_DASHBOARD_NODE_VERSION|``: sets the current Node.js version to v|WAZUH_DASHBOARD_NODE_VERSION| -- Yarn v1.22.22 (Node Package Manager): see `Yarn installation guide `_ +- Yarn v|WAZUH_DASHBOARD_YARN_VERSION| (Node Package Manager): see `Yarn installation guide `_ Generating zip packages ~~~~~~~~~~~~~~~~~~~~~~~ From b5570c9cf120426b164de8b3ca37c329e4fcbcd3 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Thu, 12 Dec 2024 09:17:11 -0300 Subject: [PATCH 14/27] Clarify comment in replacements.py and update generate-dashboard-package.rst to use .nvmrc for Node.js version management --- source/_variables/replacements.py | 3 +-- .../packaging/generate-dashboard-package.rst | 20 +++++++++---------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/source/_variables/replacements.py b/source/_variables/replacements.py index f770dfba07..c7af0dab79 100644 --- a/source/_variables/replacements.py +++ b/source/_variables/replacements.py @@ -164,8 +164,7 @@ "|WAZUH_SPLUNK_REV_CURRENT_LATEST|" : "1", # 8.2 "|WAZUH_SPLUNK_REV_CURRENT_8.1|" : "1", # - # === Node.js - "|WAZUH_DASHBOARD_NODE_VERSION|": "18.19.0", + # === Wazuh dashboard "|WAZUH_DASHBOARD_YARN_VERSION|": "1.22.22", } diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 4a2c82bca5..12acf7fa39 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -23,10 +23,6 @@ Requirements: - Docker: see `Docker installation guide `_ - zip - NVM (Node Version Manager): see `NVM installation guide `_ - - - ``nvm install v|WAZUH_DASHBOARD_NODE_VERSION|``: installs Node.js version v|WAZUH_DASHBOARD_NODE_VERSION| - - ``nvm use v|WAZUH_DASHBOARD_NODE_VERSION|``: sets the current Node.js version to v|WAZUH_DASHBOARD_NODE_VERSION| - - Yarn v|WAZUH_DASHBOARD_YARN_VERSION| (Node Package Manager): see `Yarn installation guide `_ Generating zip packages @@ -46,7 +42,8 @@ To build the packages, follow these steps: $ git clone -b https://github.com/wazuh/wazuh-dashboard.git $ cd wazuh-dashboard/ - $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| + $ nvm install $(cat .nvmrc) + $ nvm use $(cat .nvmrc) $ yarn osd bootstrap $ yarn build --linux --skip-os-packages --release @@ -56,7 +53,8 @@ To build the packages, follow these steps: $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-dashboard.git $ cd wazuh-dashboard/ - $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| + $ nvm install $(cat .nvmrc) + $ nvm use $(cat .nvmrc) $ yarn osd bootstrap $ yarn build --linux --skip-os-packages --release @@ -67,7 +65,6 @@ To build the packages, follow these steps: $ cd plugins/ $ git clone -b https://github.com/wazuh/wazuh-security-dashboards-plugin.git $ cd wazuh-security-dashboards-plugin/ - $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| $ yarn $ yarn build @@ -78,7 +75,6 @@ To build the packages, follow these steps: $ cd plugins/ $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-security-dashboards-plugin.git $ cd wazuh-security-dashboards-plugin/ - $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| $ yarn $ yarn build @@ -93,7 +89,8 @@ To build the packages, follow these steps: $ cd ../ $ git clone -b https://github.com/wazuh/wazuh-dashboard-plugins.git $ cd wazuh-dashboard-plugins/ - $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| + $ nvm install $(cat .nvmrc) + $ nvm use $(cat .nvmrc) $ cp -r plugins/* ../ $ cd ../main $ yarn @@ -112,7 +109,8 @@ To build the packages, follow these steps: $ cd ../ $ git clone -b v|WAZUH_CURRENT| https://github.com/wazuh/wazuh-dashboard-plugins.git $ cd wazuh-dashboard-plugins/ - $ nvm use v|WAZUH_DASHBOARD_NODE_VERSION| + $ nvm install $(cat .nvmrc) + $ nvm use $(cat .nvmrc) $ cp -r plugins/* ../ $ cd ../main $ yarn @@ -222,7 +220,7 @@ With this option you can create an image that has the package in tar.gz format a .. code:: console $ docker build \ - --build-arg NODE_VERSION=|WAZUH_DASHBOARD_NODE_VERSION| \ + --build-arg NODE_VERSION=$(cat ../../.nvmrc) \ --build-arg WAZUH_DASHBOARDS_BRANCH=v|WAZUH_CURRENT| \ --build-arg WAZUH_DASHBOARDS_PLUGINS=v|WAZUH_CURRENT| \ --build-arg WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH=v|WAZUH_CURRENT| \ From bba473cf304d48b58c6854f77170653e45a2fc0d Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Thu, 12 Dec 2024 10:43:49 -0300 Subject: [PATCH 15/27] Add comments in generate-dashboard-package.rst to clarify checking OpenSearch version in package.json during build steps --- source/development/packaging/generate-dashboard-package.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 12acf7fa39..164e9ff4aa 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -95,6 +95,7 @@ To build the packages, follow these steps: $ cd ../main $ yarn $ yarn build + $ # When prompted for the OpenSearch version, check the version specified in the package.json file. $ cd ../wazuh-core/ $ yarn $ yarn build @@ -115,6 +116,7 @@ To build the packages, follow these steps: $ cd ../main $ yarn $ yarn build + $ # When prompted for the OpenSearch version, check the version specified in the package.json file. $ cd ../wazuh-core/ $ yarn $ yarn build From 68a39057ce0488da993bf7d04896fc82d3a102ae Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Thu, 12 Dec 2024 10:45:20 -0300 Subject: [PATCH 16/27] Revert "Add comments in generate-dashboard-package.rst to clarify checking OpenSearch version in package.json during build steps" This reverts commit bba473cf304d48b58c6854f77170653e45a2fc0d. --- source/development/packaging/generate-dashboard-package.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 164e9ff4aa..12acf7fa39 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -95,7 +95,6 @@ To build the packages, follow these steps: $ cd ../main $ yarn $ yarn build - $ # When prompted for the OpenSearch version, check the version specified in the package.json file. $ cd ../wazuh-core/ $ yarn $ yarn build @@ -116,7 +115,6 @@ To build the packages, follow these steps: $ cd ../main $ yarn $ yarn build - $ # When prompted for the OpenSearch version, check the version specified in the package.json file. $ cd ../wazuh-core/ $ yarn $ yarn build From dbd33162c5fbff52e9b3e76f727939d51fdb638a Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Thu, 12 Dec 2024 10:48:46 -0300 Subject: [PATCH 17/27] Update generate-dashboard-package.rst to use 'yarn build-platform' instead of 'yarn build' for Linux package builds --- source/development/packaging/generate-dashboard-package.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 12acf7fa39..4f97f38f9a 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -45,7 +45,7 @@ To build the packages, follow these steps: $ nvm install $(cat .nvmrc) $ nvm use $(cat .nvmrc) $ yarn osd bootstrap - $ yarn build --linux --skip-os-packages --release + $ yarn build-platform --linux --skip-os-packages --release Example: @@ -56,7 +56,7 @@ To build the packages, follow these steps: $ nvm install $(cat .nvmrc) $ nvm use $(cat .nvmrc) $ yarn osd bootstrap - $ yarn build --linux --skip-os-packages --release + $ yarn build-platform --linux --skip-os-packages --release #. Clone the Wazuh Security Dashboards Plugin repository in the plugins folder and build the plugin. From 2fb2620f1258f7ee4e7aebb29315e6ecba8ad4f8 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Thu, 12 Dec 2024 12:34:39 -0300 Subject: [PATCH 18/27] Add Docker Compose requirement to generate-dashboard-package.rst for improved clarity on prerequisites --- source/development/packaging/generate-dashboard-package.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 4f97f38f9a..788d10d055 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -21,6 +21,7 @@ Build manually Requirements: - Docker: see `Docker installation guide `_ +- Docker Compose: see `Docker Compose installation guide `_ - zip - NVM (Node Version Manager): see `NVM installation guide `_ - Yarn v|WAZUH_DASHBOARD_YARN_VERSION| (Node Package Manager): see `Yarn installation guide `_ From 9b2c8f943409d7246fe30bd5066041835f57b42f Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Mon, 16 Dec 2024 09:30:31 -0300 Subject: [PATCH 19/27] Remove Docker Compose requirement from generate-dashboard-package.rst to streamline installation prerequisites --- source/development/packaging/generate-dashboard-package.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 788d10d055..4f97f38f9a 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -21,7 +21,6 @@ Build manually Requirements: - Docker: see `Docker installation guide `_ -- Docker Compose: see `Docker Compose installation guide `_ - zip - NVM (Node Version Manager): see `NVM installation guide `_ - Yarn v|WAZUH_DASHBOARD_YARN_VERSION| (Node Package Manager): see `Yarn installation guide `_ From 5e7ee1e0565fd8bef2952ede9133863de044a111 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Mon, 16 Dec 2024 18:14:21 -0300 Subject: [PATCH 20/27] Update replacements.py and generate-dashboard-package.rst for new OpenSearch Dashboard version variable handling and Docker build args --- source/_variables/replacements.py | 3 +++ .../packaging/generate-dashboard-package.rst | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/source/_variables/replacements.py b/source/_variables/replacements.py index c7af0dab79..116ef8fc7b 100644 --- a/source/_variables/replacements.py +++ b/source/_variables/replacements.py @@ -166,6 +166,9 @@ # # === Wazuh dashboard "|WAZUH_DASHBOARD_YARN_VERSION|": "1.22.22", + # + # === OpenSearch Dashboard + "|OPENSEARCH_DASHBOARDS_VERSION|": "2.13.0", } if is_latest_release: diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 4f97f38f9a..b94931bbf6 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -129,7 +129,7 @@ To build the packages, follow these steps: $ cd ../../../ $ mkdir packages $ cd packages - $ zip -r -j ./dashboard-package.zip ../wazuh-dashboard/target/opensearch-dashboards-2.13.0-linux-x64.tar.gz + $ zip -r -j ./dashboard-package.zip ../wazuh-dashboard/target/opensearch-dashboards--linux-x64.tar.gz $ zip -r -j ./security-package.zip ../wazuh-dashboard/plugins/wazuh-security-dashboards-plugin/build/security-dashboards-.0.zip $ zip -r -j ./wazuh-package.zip ../wazuh-dashboard/plugins/wazuh-check-updates/build/wazuhCheckUpdates-.zip ../wazuh-dashboard/plugins/main/build/wazuh-.zip ../wazuh-dashboard/plugins/wazuh-core/build/wazuhCore-.zip @@ -140,9 +140,9 @@ To build the packages, follow these steps: $ cd ../../../ $ mkdir packages $ cd packages - $ zip -r -j ./dashboard-package.zip ../wazuh-dashboard/target/opensearch-dashboards-2.13.0-linux-x64.tar.gz - $ zip -r -j ./security-package.zip ../wazuh-dashboard/plugins/wazuh-security-dashboards-plugin/build/security-dashboards-2.13.0.0.zip - $ zip -r -j ./wazuh-package.zip ../wazuh-dashboard/plugins/wazuh-check-updates/build/wazuhCheckUpdates-2.13.0.zip ../wazuh-dashboard/plugins/main/build/wazuh-2.13.0.zip ../wazuh-dashboard/plugins/wazuh-core/build/wazuhCore-2.13.0.zip + $ zip -r -j ./dashboard-package.zip ../wazuh-dashboard/target/opensearch-dashboards-|OPENSEARCH_DASHBOARDS_VERSION|-linux-x64.tar.gz + $ zip -r -j ./security-package.zip ../wazuh-dashboard/plugins/wazuh-security-dashboards-plugin/build/security-dashboards-|OPENSEARCH_DASHBOARDS_VERSION|.0.zip + $ zip -r -j ./wazuh-package.zip ../wazuh-dashboard/plugins/wazuh-check-updates/build/wazuhCheckUpdates-|OPENSEARCH_DASHBOARDS_VERSION|.zip ../wazuh-dashboard/plugins/main/build/wazuh-|OPENSEARCH_DASHBOARDS_VERSION|.zip ../wazuh-dashboard/plugins/wazuh-core/build/wazuhCore-|OPENSEARCH_DASHBOARDS_VERSION|.zip At this point you must have three packages in the ``packages`` folder: @@ -224,7 +224,7 @@ With this option you can create an image that has the package in tar.gz format a --build-arg WAZUH_DASHBOARDS_BRANCH=v|WAZUH_CURRENT| \ --build-arg WAZUH_DASHBOARDS_PLUGINS=v|WAZUH_CURRENT| \ --build-arg WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH=v|WAZUH_CURRENT| \ - --build-arg OPENSEARCH_DASHBOARDS_VERSION=2.13.0 \ + --build-arg OPENSEARCH_DASHBOARDS_VERSION=|OPENSEARCH_DASHBOARDS_VERSION| \ -t wzd:v|WAZUH_CURRENT| \ -f wazuh-dashboard.Dockerfile . From 19b75a343ea5d2b4f5dbc8ad46974dc468cc8830 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Mon, 16 Dec 2024 18:14:36 -0300 Subject: [PATCH 21/27] Fix variable handling in generate-dashboard-package.rst example command for correct packaging process --- source/development/packaging/generate-dashboard-package.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index b94931bbf6..b0da4151a9 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -172,7 +172,7 @@ Example: .. code:: console $ cd ../wazuh-dashboard/dev-tools/build-packages/ - $ ./build-packages.sh -v |WAZUH_CURRENT| -r 1 --deb -a file:///packages/wazuh-package.zip -s file:///packages/security-package.zip -b file:///packages/dashboard-package.zip + $ ./build-packages.sh -v v|WAZUH_CURRENT| -r 1 --deb -a file:///packages/wazuh-package.zip -s file:///packages/security-package.zip -b file:///packages/dashboard-package.zip The package will be generated in the ``output`` folder of the same directory where the script is located. From 8651e4331ba373484586b771123e1f07d2e324d6 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Mon, 16 Dec 2024 18:14:48 -0300 Subject: [PATCH 22/27] Refine example command syntax in generate-dashboard-package.rst for clarity in packaging options handling --- source/development/packaging/generate-dashboard-package.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index b0da4151a9..a3bc296353 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -165,7 +165,7 @@ Run the ``build-packages.sh`` script in the ``dev-tools/build-packages/`` folder .. code:: console $ cd ../wazuh-dashboard/dev-tools/build-packages/ - $ ./build-packages.sh -v -r -- -a file:/// -s file:/// -b file:/// + $ ./build-packages.sh -v -r (--deb|--rpm) -a file:/// -s file:/// -b file:/// Example: From 0d027a177fd53c3cbb5acec8baad541374fc3990 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Mon, 16 Dec 2024 18:16:24 -0300 Subject: [PATCH 23/27] Enhance clarity in requirements section of generate-dashboard-package.rst with structured formatting and better emphasis on tools --- .../development/packaging/generate-dashboard-package.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index a3bc296353..82fd52eeb0 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -20,10 +20,10 @@ Build manually Requirements: -- Docker: see `Docker installation guide `_ -- zip -- NVM (Node Version Manager): see `NVM installation guide `_ -- Yarn v|WAZUH_DASHBOARD_YARN_VERSION| (Node Package Manager): see `Yarn installation guide `_ +- **Docker**: Refer to `Docker installation guide `__. +- **NVM (Node Version Manager)**: Refer to `NVM installation guide `__. +- **Yarn v|WAZUH_DASHBOARD_YARN_VERSION| (Node Package Manager)**: Refer to `Yarn installation guide `__. +- **zip**: Ensure the ``zip`` utility is available. Generating zip packages ~~~~~~~~~~~~~~~~~~~~~~~ From 5525b9e6b6f50f3f09c6cd33cd46fa92ec496465 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Mon, 16 Dec 2024 18:28:36 -0300 Subject: [PATCH 24/27] Correct version flag formatting in example command of generate-dashboard-package.rst for improved accuracy in usage --- source/development/packaging/generate-dashboard-package.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 82fd52eeb0..ac1014d130 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -268,6 +268,6 @@ With this option you can create an image that has the package in tar.gz format a .. code:: console - $ ./launcher.sh -v |WAZUH_CURRENT| -r 1 -p file:///wazuh-dashboard-|WAZUH_CURRENT|-1-linux-x64.tar.gz + $ ./launcher.sh -v v|WAZUH_CURRENT| -r 1 -p file:///wazuh-dashboard-|WAZUH_CURRENT|-1-linux-x64.tar.gz The package will be generated in the ``output`` folder of the ``rpm`` or ``deb`` folder. \ No newline at end of file From d38a97ee77c66813c1c32c73a950f488c72ccaf2 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Mon, 16 Dec 2024 18:28:46 -0300 Subject: [PATCH 25/27] Update requirements in generate-dashboard-package.rst to include additional utilities needed for packaging and Docker usage --- .../packaging/generate-dashboard-package.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index ac1014d130..5eee712f61 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -24,6 +24,10 @@ Requirements: - **NVM (Node Version Manager)**: Refer to `NVM installation guide `__. - **Yarn v|WAZUH_DASHBOARD_YARN_VERSION| (Node Package Manager)**: Refer to `Yarn installation guide `__. - **zip**: Ensure the ``zip`` utility is available. +- **unzip**: Ensure the ``unzip`` utility is available. +- **gzip**: Ensure the ``gzip`` utility is available. +- **brotli**: Ensure the ``brotli`` utility is available. +- **curl**: Ensure the ``curl`` utility is available. Generating zip packages ~~~~~~~~~~~~~~~~~~~~~~~ @@ -181,6 +185,14 @@ Build with Docker image With this option you can create an image that has the package in tar.gz format and then if desired you can use the created package to generate the .deb or .rpm file. +Requirements +~~~~~~~~~~~~ + +- **Docker**: Refer to `Docker installation guide `__. +- **Internet connection** to download the Docker images for the first time. +- **jq**: Ensure the ``jq`` utility is available. +- **curl**: Ensure the ``curl`` utility is available. + #. Clone the Wazuh dashboard repository. .. code:: console From 5f36d2377fdf90e5f1c40275f0c146428cdd6f2b Mon Sep 17 00:00:00 2001 From: Javier Medeot Date: Tue, 17 Dec 2024 17:16:55 -0300 Subject: [PATCH 26/27] Add changes from review --- source/_variables/replacements.py | 16 +++++++-------- .../packaging/generate-dashboard-package.rst | 20 +++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/source/_variables/replacements.py b/source/_variables/replacements.py index 116ef8fc7b..a706119d7e 100644 --- a/source/_variables/replacements.py +++ b/source/_variables/replacements.py @@ -23,12 +23,15 @@ # "|CTI_URL|" : "https://cti.wazuh.com/api/v1/catalog/contexts/vd_1.0.0/consumers/vd_4.8.0", # + # === Environment + "|PYTHON_CLOUD_CONTAINERS_MIN|": "3.8", + "|PYTHON_CLOUD_CONTAINERS_MAX|": "3.12", + "|WAZUH_DASHBOARD_YARN_VERSION|": "1.22.22", + # # === Global and Wazuh version (wazuh agent, manager, indexer, and dashboard) "|WAZUH_CURRENT_MAJOR|" : "4.x", "|WAZUH_CURRENT_MINOR|" : version, "|WAZUH_CURRENT|" : release, - "|PYTHON_CLOUD_CONTAINERS_MIN|": "3.8", - "|PYTHON_CLOUD_CONTAINERS_MAX|": "3.12", # --- Revision numbers for Wazuh agent and manager packages versions # Yum packages revisions @@ -143,6 +146,9 @@ "|WAZUH_CURRENT_HPUX|" : release, "|WAZUH_REVISION_HPUX|" : "1", # + # === OpenSearch + "|OPENSEARCH_DASHBOARDS_VERSION|": "2.13.0", + # # === Elastic # --- Filebeat "|FILEBEAT_LATEST|" : "7.10.2", @@ -163,12 +169,6 @@ "|SPLUNK_LATEST_MINOR|" : "8.2", "|WAZUH_SPLUNK_REV_CURRENT_LATEST|" : "1", # 8.2 "|WAZUH_SPLUNK_REV_CURRENT_8.1|" : "1", - # - # === Wazuh dashboard - "|WAZUH_DASHBOARD_YARN_VERSION|": "1.22.22", - # - # === OpenSearch Dashboard - "|OPENSEARCH_DASHBOARDS_VERSION|": "2.13.0", } if is_latest_release: diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 5eee712f61..00d96849ac 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -6,7 +6,7 @@ Wazuh dashboard =============== -The packages generation process is orchestrated by the ``build-packages.sh`` script, which is found within the ``dev-tools/build-packages/`` folder of the repository. This script is responsible for bundling plugins into one single application in ``tar``, ``rpm`` and/or ``deb`` distributions. It takes the following parameters: +The ``build-packages.sh`` script, located in the ``dev-tools/build-packages/`` folder, orchestrates the package generation process. This script bundles plugins into a single application and supports ``tar``, ``rpm``, and ``deb`` distributions. It accepts the following parameters: - version - revision @@ -23,11 +23,13 @@ Requirements: - **Docker**: Refer to `Docker installation guide `__. - **NVM (Node Version Manager)**: Refer to `NVM installation guide `__. - **Yarn v|WAZUH_DASHBOARD_YARN_VERSION| (Node Package Manager)**: Refer to `Yarn installation guide `__. -- **zip**: Ensure the ``zip`` utility is available. -- **unzip**: Ensure the ``unzip`` utility is available. -- **gzip**: Ensure the ``gzip`` utility is available. -- **brotli**: Ensure the ``brotli`` utility is available. -- **curl**: Ensure the ``curl`` utility is available. +- **Utilities**: Ensure the following are available: + + - ``zip`` + - ``unzip`` + - ``gzip`` + - ``brotli`` + - ``curl`` Generating zip packages ~~~~~~~~~~~~~~~~~~~~~~~ @@ -190,8 +192,10 @@ Requirements - **Docker**: Refer to `Docker installation guide `__. - **Internet connection** to download the Docker images for the first time. -- **jq**: Ensure the ``jq`` utility is available. -- **curl**: Ensure the ``curl`` utility is available. +- **Utilities**: Ensure the following are available: + + - ``jq`` + - ``curl`` #. Clone the Wazuh dashboard repository. From bbd7cf7b0c911d9008d0d2a0fb03010d80f3ca69 Mon Sep 17 00:00:00 2001 From: Guido Modarelli <38738725+guidomodarelli@users.noreply.github.com> Date: Wed, 18 Dec 2024 01:04:16 -0300 Subject: [PATCH 27/27] Update source/development/packaging/generate-dashboard-package.rst Co-authored-by: Javier Medeot --- source/development/packaging/generate-dashboard-package.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/development/packaging/generate-dashboard-package.rst b/source/development/packaging/generate-dashboard-package.rst index 00d96849ac..81a1e5bfa7 100644 --- a/source/development/packaging/generate-dashboard-package.rst +++ b/source/development/packaging/generate-dashboard-package.rst @@ -171,7 +171,9 @@ Run the ``build-packages.sh`` script in the ``dev-tools/build-packages/`` folder .. code:: console $ cd ../wazuh-dashboard/dev-tools/build-packages/ - $ ./build-packages.sh -v -r (--deb|--rpm) -a file:/// -s file:/// -b file:/// + $ ./build-packages.sh -v -r -- -a file:/// -s file:/// -b file:/// + +Where ``--`` is either ``--deb`` or ``--rpm``. Example: