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

Add Wazuh-Dashboards packages to big-product Branch #1233

Merged
merged 35 commits into from
Feb 8, 2022

Conversation

c-bordon
Copy link
Member

@c-bordon c-bordon commented Feb 4, 2022

Related issue
#1141

Description

A first stable version of the Wazuh-Dashboards package is obtained, this is obtained from opensearch-dashboards 1.2.0

Logs example

RPM

[root@centos7 ~]# yum localinstall /home/vagrant/wazuh-dashboards-4.3.0-1.x86_64.rpm                                                   
Loaded plugins: fastestmirror
Examining /home/vagrant/wazuh-dashboards-4.3.0-1.x86_64.rpm: wazuh-dashboards-4.3.0-1.x86_64
Marking /home/vagrant/wazuh-dashboards-4.3.0-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package wazuh-dashboards.x86_64 0:4.3.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                                   Arch                                            Version                                           Repository                                                                 Size
=============================================================================================================================================================================================================================================
Installing:
 wazuh-dashboards                                          x86_64                                          4.3.0-1                                           /wazuh-dashboards-4.3.0-1.x86_64                                          758 M

Transaction Summary
=============================================================================================================================================================================================================================================
Install  1 Package

Total size: 758 M
Installed size: 758 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : wazuh-dashboards-4.3.0-1.x86_64                                                                                                                                                                                           1/1 
  Verifying  : wazuh-dashboards-4.3.0-1.x86_64                                                                                                                                                                                           1/1 

Installed:
  wazuh-dashboards.x86_64 0:4.3.0-1                                                                                                                                                                                                          

Complete!
[root@centos7 ~]# systemctl start wazuh-dashboards.service                                          
[root@centos7 ~]# systemctl status wazuh-dashboards.service 
● wazuh-dashboards.service - wazuh-dashboards
   Loaded: loaded (/etc/systemd/system/wazuh-dashboards.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2022-02-04 11:46:46 UTC; 2s ago
  Process: 3863 ExecStartPost=/bin/sh -c umask 022; echo $MAINPID > $PID_DIR (code=exited, status=0/SUCCESS)
 Main PID: 3862 (node)
   CGroup: /system.slice/wazuh-dashboards.service
           └─3862 /usr/share/wazuh-dashboards/bin/../node/bin/node /usr/share/wazuh-dashboards/bin/../src/cli/dist -c /etc/wazuh-dashboards/dashboards.yml

Feb 04 11:46:46 centos7 systemd[1]: Starting wazuh-dashboards...
Feb 04 11:46:46 centos7 systemd[1]: Started wazuh-dashboards.

DEB

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'wazuh-dashboards' instead of './wazuh-dashboards_4.3.0-1_amd64.deb'
The following NEW packages will be installed:
  wazuh-dashboards
0 upgraded, 1 newly installed, 0 to remove and 50 not upgraded.
1 not fully installed or removed.
Need to get 0 B/156 MB of archives.
After this operation, 833 MB of additional disk space will be used.
Get:1 /root/wazuh-dashboards_4.3.0-1_amd64.deb wazuh-dashboards amd64 4.3.0-1 [156 MB]
Selecting previously unselected package wazuh-dashboards.
(Reading database ... 27949 files and directories currently installed.)
Preparing to unpack .../wazuh-dashboards_4.3.0-1_amd64.deb ...
Creating wazuh-dashboards group... OK
Creating wazuh-dashboards user... OK
Unpacking wazuh-dashboards (4.3.0-1) ...
Setting up wazuh-indexer (4.3.0-1) ...
/usr/share/wazuh-indexer/bin/opensearch-env: line 89: cd: /usr/share/wazuh-indexer/config: No such file or directory
/usr/share/wazuh-indexer/bin/opensearch-env: line 89: cd: /usr/share/wazuh-indexer/config: No such file or directory
Setting up wazuh-dashboards (4.3.0-1) ...
N: Download is performed unsandboxed as root as file '/root/wazuh-dashboards_4.3.0-1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
Created symlink /etc/systemd/system/multi-user.target.wants/wazuh-dashboards.service → /etc/systemd/system/wazuh-dashboards.service.
root@Debian-Buster:~# systemctl status wazuh-dashboards.service 
● wazuh-dashboards.service - wazuh-dashboards
   Loaded: loaded (/etc/systemd/system/wazuh-dashboards.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2022-02-04 12:12:52 UTC; 15s ago
  Process: 2705 ExecStartPost=/bin/sh -c umask 022; echo $MAINPID > $PID_DIR (code=exited, status=0/SUCCESS)
 Main PID: 2704 (node)
    Tasks: 11 (limit: 3558)
   Memory: 212.4M
   CGroup: /system.slice/wazuh-dashboards.service
           └─2704 /usr/share/wazuh-dashboards/bin/../node/bin/node /usr/share/wazuh-dashboards/bin/../src/cli/dist -c /etc/wazuh-dashboards/dashboards.yml

Feb 04 12:12:52 Debian-Buster systemd[1]: Starting wazuh-dashboards...
Feb 04 12:12:52 Debian-Buster systemd[1]: Started wazuh-dashboards.

Tests

  • Build the package in any supported platform
    • Linux
    • Windows
    • macOS
    • Solaris
    • AIX
    • HP-UX
  • Package installation
  • Package upgrade
  • Package downgrade
  • Package remove
  • Package install/remove/install
  • Change added to CHANGELOG.md
  • Tests for Linux RPM
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • %files section is correctly updated if necessary
  • Tests for Linux deb
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • Package install/remove/install
    • Package install/purge/install
    • Check file permissions after installing the package
  • Tests for macOS
    • Test the package from macOS Sierra to Mojave
  • Tests for Solaris
    • Test the package on Solaris 10
    • Test the package on Solaris 11
    • Check file permissions on Solaris 11 template
  • Tests for IBM AIX
    • %files section is correctly updated if necessary
    • Check the changes from IBM AIX 5 to 7

@c-bordon c-bordon changed the title 1141 wazuh dashboard packagesto4.3 Add Wazuh-Dashboards packages to big-product Branch Feb 4, 2022
@c-bordon c-bordon requested review from okynos and alberpilot February 4, 2022 14:02
@c-bordon c-bordon self-assigned this Feb 4, 2022
Copy link
Contributor

@okynos okynos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes, GJ

stack/dashboards/rpm/wazuh-dashboards.spec Outdated Show resolved Hide resolved
stack/dashboards/rpm/wazuh-dashboards.spec Show resolved Hide resolved
rpms/generate_rpm_package.sh Outdated Show resolved Hide resolved
stack/dashboards/deb/debian/changelog Outdated Show resolved Hide resolved
stack/dashboards/deb/debian/postinst Outdated Show resolved Hide resolved
stack/dashboards/deb/debian/preinst Outdated Show resolved Hide resolved
stack/dashboards/rpm/wazuh-dashboards.spec Outdated Show resolved Hide resolved
stack/dashboards/rpm/wazuh-dashboards.spec Outdated Show resolved Hide resolved
stack/dashboards/rpm/wazuh-dashboards.spec Outdated Show resolved Hide resolved
@c-bordon c-bordon requested a review from okynos February 4, 2022 16:32
Copy link
Contributor

@okynos okynos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes, thanks.

stack/dashboards/deb/debian/preinst Outdated Show resolved Hide resolved
stack/dashboards/rpm/wazuh-dashboards.spec Outdated Show resolved Hide resolved
stack/dashboards/deb/debian/postinst Show resolved Hide resolved
@c-bordon c-bordon requested a review from okynos February 7, 2022 16:35
Copy link
Contributor

@okynos okynos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes

stack/dashboards/deb/debian/preinst Outdated Show resolved Hide resolved
stack/dashboards/rpm/wazuh-dashboards.spec Outdated Show resolved Hide resolved
stack/dashboards/rpm/wazuh-dashboards.spec Show resolved Hide resolved
@c-bordon c-bordon requested a review from okynos February 8, 2022 12:38
Copy link
Contributor

@okynos okynos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@okynos okynos merged commit 575868e into big-product Feb 8, 2022
@okynos okynos deleted the 1141-WazuhDashboardPackagesto4.3 branch February 8, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants