wazuh / wazuh-virtual-machines

Wazuh - Virtual Machines (OVA and AMI)
https://wazuh.com/
GNU General Public License v2.0
0 stars 0 forks source link

Modify the provisioning scripts in AMI with the changes applied in the Wazuh installation assistant #48

Closed c-bordon closed 3 weeks ago

c-bordon commented 1 month ago

related: https://github.com/wazuh/wazuh-installation-assistant/issues/63

Regarding the issue, the installation assistant allows you to choose by parameter from which repository you want to install the packages.

https://github.com/wazuh/wazuh-virtual-machines/blob/192030f2b6388b143916b1204dfed02c3873773b/ova/generate_ova.sh#L232-L238

https://github.com/wazuh/wazuh-virtual-machines/blob/192030f2b6388b143916b1204dfed02c3873773b/ova/generate_ova.sh#L256

Tasks

[!IMPORTANT] The AMI_REVISION input must have a numeric format like wazuh-4.10.0-1 it is reserved for AMI candidates, to build a development AMI use another revision format, like -dev

jnasselle commented 1 month ago

Update

Please consider the next information, because our package generation script needs an undocumented mandatory input field and behaviors.

Specs:

run-name: Build AMI ${{ inputs.id }}
Enaraque commented 4 weeks ago

Update report

The changes related to the installation of Wazuh (Related: https://github.com/wazuh/wazuh-installation-assistant/issues/63) on the AMI have been made in the playbook. Additionally, necessary updates have been made to the workflow:

Testing

Workflow execution

All these changes have been tested by running the following workflow, which completed successfully:

AMI installation

After running the workflow, if we create an instance with the generated AMI, we can see that the packages are installed, and the dashboard is accessible without any issues.

$ ssh -i test-wvm-48-AMI.pem -p 2200 wazuh-user@XX.XX.XX.XX
Last login: Wed Sep 25 10:39:56 2024 from XX.XX.XX.XX

wwwwww.           wwwwwww.          wwwwwww.
wwwwwww.          wwwwwww.          wwwwwww.
 wwwwww.         wwwwwwwww.        wwwwwww.
 wwwwwww.        wwwwwwwww.        wwwwwww.
  wwwwww.       wwwwwwwwwww.      wwwwwww.
  wwwwwww.      wwwwwwwwwww.      wwwwwww.
   wwwwww.     wwwwww.wwwwww.    wwwwwww.
   wwwwwww.    wwwww. wwwwww.    wwwwwww.
    wwwwww.   wwwwww.  wwwwww.  wwwwwww.
    wwwwwww.  wwwww.   wwwwww.  wwwwwww.
     wwwwww. wwwwww.    wwwwww.wwwwwww.
     wwwwwww.wwwww.     wwwwww.wwwwwww.
      wwwwwwwwwwww.      wwwwwwwwwwww.
      wwwwwwwwwww.       wwwwwwwwwwww.      oooooo
       wwwwwwwwww.        wwwwwwwwww.      oooooooo
       wwwwwwwww.         wwwwwwwwww.     oooooooooo
        wwwwwwww.          wwwwwwww.      oooooooooo
        wwwwwww.           wwwwwwww.       oooooooo
         wwwwww.            wwwwww.         oooooo

         WAZUH Open Source Security Platform
                  https://wazuh.com/

[wazuh-user@wazuh-server ~]$ rpm -qa | grep wazuh
wazuh-indexer-4.9.0-1.x86_64
wazuh-manager-4.9.0-1.x86_64
wazuh-dashboard-4.9.0-2.x86_64

Captura de pantalla 2024-09-25 a las 12 44 21 Captura de pantalla 2024-09-25 a las 12 44 35