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

Indexer package v3 - Base generation #1240

Closed
13 tasks done
okynos opened this issue Feb 8, 2022 · 3 comments
Closed
13 tasks done

Indexer package v3 - Base generation #1240

okynos opened this issue Feb 8, 2022 · 3 comments
Assignees

Comments

@okynos
Copy link
Contributor

okynos commented Feb 8, 2022

Hello!

We want to improve our automatic procedure. We have to include an script to generate base image inside packages building.

  • Generate script to prepare base tar.gz
  • Use base inside package building script
  • Apply minor fixes and changes over SPECs
  • Test in officially supported systems
    • CentOS 7
    • CentOS 8
    • Amazon Linux 2
    • Ubuntu 16.04
    • Ubuntu 18.04
    • Ubuntu 20.04
    • RedHat Enterprise Linux 7
    • RedHat Enterprise Linux 8
  • Upload package to pre-release
@okynos okynos self-assigned this Feb 8, 2022
@okynos
Copy link
Contributor Author

okynos commented Feb 9, 2022

Hi!

We have performed a lot of changes to the V3 package

08/02/2022

  • c9c013d, performed minor fixes and improvements over builder script. Included generate_base.sh script to launch dockerfile.
  • 785ebce, Created the base generation scripts:
    • Added builder.sh that will run inside the docker image, this script will:
      1. Download wazuh-packages repo if need
      2. Download OpenSearch original tarball
      3. Remove unnecessary files (links, .bats, and .sh)
      4. Added required config from packages repository
      5. Compiled systemD module and added to the folder.
      6. Package result folder.
    • Added Dockerfile of Rocky Linux 8.5 to build the base
    • Added default service files:
      • etc/init.d/wazuh-indexer
      • etc/sysconfig/wazuh-indexer
      • etc/wazuh-indexer files (YML, jvm.options...)
      • systemd-entrypoint
      • usr/lib/sysctl.d/wazuh-indexer.conf
      • usr/lib/systemd/system/wazuh-indexer-performance-analyzer.service
      • usr/lib/systemd/system/wazuh-indexer.service
      • usr/lib/tmpfiles.d/wazuh-indexer.conf

09/02/2022

  • 6e836b0, Fix base script output of help message and -x flag.
  • 9c070e3, we have included here the wazuh-indexer.restart file to perform restart in case the indexer was stopped by the package in a previous installation stage. We have added such option into systemd, service, invoke-rc.d and init.d
  • 5b1b913, Improved postinst Debian script to manage configure step, moved code to such case. We have included the restart file too. WE have performed the stop procedure into preinst maintainer script.
  • 050e45b, Added a way to load local base from output base folder, modified rules file and generation scripts.
  • 21954f1, Removed .bat files from original tarball, added minor removals and files. Compressed with XZ instead of GZ (we gain storage).
  • 27b6b1c, Added base option to indexer packages scripts, included conditional to download base from S3 or use local.

@okynos
Copy link
Contributor Author

okynos commented Feb 10, 2022

Hello team,

We have performed testing over V3 packages with the following results:

Install

Remove

Purge

  • ✔️ CentOS 7
  • ✔️ CentOS 8
  • ✔️ AL2
  • ✔️ RH7
  • ✔️ RH8
  • ✔️ Ubuntu 16
  • ✔️ Ubuntu 18
  • ✔️ Ubuntu 20

Install + remove + install

  • ✔️ CentOS 7
  • ✔️ CentOS 8
  • ✔️ AL2
  • ❌ RH7 -> rh7_error.txt
  • ✔️ RH8
  • ❌ Ubuntu 16
  • ❌ Ubuntu 18
  • ❌ Ubuntu 20
    In ubuntu systems we have detected an error related with permission setup into dh_fixperms procedure.
    We have fixed it an we are testing again.
    The commit with such changes are -> 5d3f824
    We have also fixed a problem in unattended templates here -> 438d327

In RedHat 7 system we have detected an error related with securityadmin tool, seems to fail to obtain admin indices.
We could clean the error purging the data and reinstalling.
It appears randomly.

Install + purge + install

  • ✔️ CentOS 7
  • ✔️ CentOS 8
  • ✔️ AL2
  • ✔️ RH7
  • ✔️ RH8
  • ✔️ Ubuntu 16
  • ✔️ Ubuntu 18
  • ✔️ Ubuntu 20

Upgrade

  • ✔️ CentOS 7
  • ✔️ CentOS 8
  • ✔️ AL2
  • ✔️ RH7
  • ✔️ RH8
  • ✔️ Ubuntu 16
  • ✔️ Ubuntu 18
  • ✔️ Ubuntu 20

@okynos
Copy link
Contributor Author

okynos commented Feb 11, 2022

Package in pre-release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant