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

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

Closed
4 tasks done
c-bordon opened this issue Sep 17, 2024 · 2 comments · Fixed by #55
Closed
4 tasks done
Assignees
Labels
level/task Task issue type/change Change performed in a resource or Wazuh Cloud environment

Comments

@c-bordon
Copy link
Member

c-bordon commented Sep 17, 2024

related: wazuh/wazuh-installation-assistant#63

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

BUILDER_ARGS="-i"
if [[ "${PACKAGES_REPOSITORY}" == "dev" ]]; then
BUILDER_ARGS+=" -d"
elif [[ "${PACKAGES_REPOSITORY}" == "staging" ]]; then
BUILDER_ARGS+=" -d staging"
fi

bash builder.sh ${BUILDER_ARGS}

Tasks

  • Update Workflow and Workflow script to the new logic
  • Remove WAZUH_VIRTUAL_MACHINES_REFERENCE input
  • Change SUFFIX_AMI input to AMI_REVISION
  • Test Build AMI workflow

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

@c-bordon c-bordon added level/task Task issue type/change Change performed in a resource or Wazuh Cloud environment labels Sep 17, 2024
@wazuhci wazuhci moved this to Blocked in Release 4.10.0 Sep 17, 2024
@jnasselle
Copy link
Member

jnasselle commented Sep 19, 2024

Update

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

Specs:

  • Name (proposal. SHOULD HAVE ID)
run-name: Build AMI ${{ inputs.id }}
  • Inputs
      id:
        type: string
        required: false
      id:
        type: string
        description: |
          ID used to identify the workflow uniquely.
        required: false

@wazuhci wazuhci moved this from Blocked to In progress in Release 4.10.0 Sep 24, 2024
@Enaraque
Copy link
Member

Enaraque commented Sep 25, 2024

Update report

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

  • The input id has been added.
  • The input WAZUH_VIRTUAL_MACHINES_REFERENCE has been changed to be used as an environment variable.
  • The input name SUFFIX_AMI has been modified to AMI_REVISION.

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 [email protected]
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/change Change performed in a resource or Wazuh Cloud environment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants