diff --git a/deployability/modules/testing/tests/helpers/executor.py b/deployability/modules/testing/tests/helpers/executor.py index 843704e630..4f7b17d78b 100644 --- a/deployability/modules/testing/tests/helpers/executor.py +++ b/deployability/modules/testing/tests/helpers/executor.py @@ -112,25 +112,49 @@ def _execute_command(data, command) -> dict: class MacosExecutor(): @staticmethod def _execute_command(data, command) -> dict: - try: - ssh_client = paramiko.SSHClient() - ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - ssh_client.connect(hostname=data.get('host'), port=data.get('port'), username=data.get('username'), password=data.get('password')) - stdin, stdout, stderr = ssh_client.exec_command(f"sudo {command}") + if data.get('private_key_path') == None: + try: + ssh_client = paramiko.SSHClient() + ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + ssh_client.connect(hostname=data.get('host'), port=data.get('port'), username=data.get('username'), password=data.get('password')) + stdin, stdout, stderr = ssh_client.exec_command(f"sudo {command}") - stdout_str = ''.join(stdout.readlines()) - stderr_str = ''.join(stderr.readlines()) + stdout_str = ''.join(stdout.readlines()) + stderr_str = ''.join(stderr.readlines()) - ssh_client.close() + ssh_client.close() - if stdout_str: - return {'success': True, 'output': stdout_str.replace('\n', '')} - if stderr_str: - return {'success': False, 'output': stderr_str.replace('\n', '')} - return {'success': False, 'output': None} + if stdout_str: + return {'success': True, 'output': stdout_str.replace('\n', '')} + if stderr_str: + return {'success': False, 'output': stderr_str.replace('\n', '')} + return {'success': False, 'output': None} - except Exception as e: - raise Exception(f'Error executing command: {command} with error: {e}') + except Exception as e: + raise Exception(f'Error executing command: {command} with error: {e}') + else: + ssh_command = [ + "ssh", + "-i", data.get('private_key_path'), + "-o", "StrictHostKeyChecking=no", + "-o", "UserKnownHostsFile=/dev/null", + "-p", str(data.get('port')), + f"{data.get('username')}@{data.get('host')}", + "sudo", + command + ] + + try: + ret = subprocess.run(ssh_command, stdout=subprocess.PIPE, text=True) + if ret.stdout: + return {'success': True, 'output': ret.stdout.replace('\n', '')} + if ret.stderr: + return {'success': False, 'output': ret.stderr.replace('\n', '')} + return {'success': False, 'output': None} + + except Exception as e: + #return {'success': False, 'output': ret.stderr} + raise Exception(f'Error executing command: {command} with error: {e}') # ------------------------------------------------------ diff --git a/deployability/modules/testing/tests/helpers/utils.py b/deployability/modules/testing/tests/helpers/utils.py index 05e7622f75..3a78cfb739 100644 --- a/deployability/modules/testing/tests/helpers/utils.py +++ b/deployability/modules/testing/tests/helpers/utils.py @@ -62,7 +62,7 @@ def check_inventory_connection(inventory_path, attempts=10, sleep=30) -> bool: except Exception as e: logger.error(f"An unexpected error occurred: {e}") - if os_type == 'linux': + if private_key_path != None: ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) private_key = paramiko.RSAKey.from_private_key_file(private_key_path) @@ -83,45 +83,46 @@ def check_inventory_connection(inventory_path, attempts=10, sleep=30) -> bool: logger.warning(f'Error on attempt {attempt} of {attempts}: {e}') time.sleep(sleep) - elif os_type == 'windows': - if port == 5986: - protocol = 'https' - else: - protocol = 'http' - endpoint_url = f'{protocol}://{host}:{port}' + else: + if os_type == 'windows': + if port == 5986: + protocol = 'https' + else: + protocol = 'http' + endpoint_url = f'{protocol}://{host}:{port}' + + for attempt in range(1, attempts + 1): + try: + session = winrm.Session(endpoint_url, auth=(username, password),transport='ntlm', server_cert_validation='ignore') + cmd = session.run_cmd('ipconfig') + if cmd.status_code == 0: + logger.info("WinRM connection successful.") + return True + else: + logger.error('WinRM connection failed. Check the credentials in the inventory file.') + return False + except Exception as e: + logger.warning(f'Error on attempt {attempt} of {attempts}: {e}') + time.sleep(sleep) + + elif os_type == 'macos': + ssh = paramiko.SSHClient() + ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - for attempt in range(1, attempts + 1): - try: - session = winrm.Session(endpoint_url, auth=(username, password),transport='ntlm', server_cert_validation='ignore') - cmd = session.run_cmd('ipconfig') - if cmd.status_code == 0: - logger.info("WinRM connection successful.") + for attempt in range(1, attempts + 1): + ssh = paramiko.SSHClient() + ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + try: + ssh.connect(hostname=host, port=port, username=username, password=password) + logger.info(f'Connection established successfully in {os_name}') + ssh.close() return True - else: - logger.error('WinRM connection failed. Check the credentials in the inventory file.') + except paramiko.AuthenticationException: + logger.error(f'Authentication error. Check SSH credentials in {os_name}') return False - except Exception as e: - logger.warning(f'Error on attempt {attempt} of {attempts}: {e}') - time.sleep(sleep) - - elif os_type == 'macos': - ssh = paramiko.SSHClient() - ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - - for attempt in range(1, attempts + 1): - ssh = paramiko.SSHClient() - ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - try: - ssh.connect(hostname=host, port=port, username=username, password=password) - logger.info(f'Connection established successfully in {os_name}') - ssh.close() - return True - except paramiko.AuthenticationException: - logger.error(f'Authentication error. Check SSH credentials in {os_name}') - return False - except Exception as e: - logger.warning(f'Error on attempt {attempt} of {attempts}: {e}') - time.sleep(sleep) + except Exception as e: + logger.warning(f'Error on attempt {attempt} of {attempts}: {e}') + time.sleep(sleep) logger.error(f'Connection attempts failed after {attempts} tries. Connection timeout in {os_name}') return False diff --git a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete-macOS.yaml b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete-macOS.yaml index 1db2fb91cc..dd067ecbcd 100644 --- a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete-macOS.yaml +++ b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete-macOS.yaml @@ -84,7 +84,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -105,8 +105,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "install,registration,basic_info,connection,restart,stop,uninstall" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete-macOs.yaml b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete-macOs.yaml deleted file mode 100755 index 1db2fb91cc..0000000000 --- a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete-macOs.yaml +++ /dev/null @@ -1,115 +0,0 @@ -version: 0.1 -description: This workflow is used to test agents deployment for DDT1 PoC -variables: - agent-os: - # Run one at a time as there are limitations on the number of hosts (Inform @dev-devops-team about your usage, dedicated hosts) - - macos-sonoma-14.3-arm64 - #- macos-ventura-13.6.4-arm64 - #- macos-sonoma-14.3-amd64 - #- macos-ventura-13.6.4-amd64 - manager-os: linux-ubuntu-22.04-amd64 - infra-provider: aws - working-dir: /tmp/dtt1-poc - -tasks: - # Unique manager allocate task - - task: "allocate-manager-{manager-os}" - description: "Allocate resources for the manager." - do: - this: process - with: - path: python3 - args: - - modules/allocation/main.py - - action: create - - provider: "{infra-provider}" - - size: large - - composite-name: "{manager-os}" - - inventory-output: "{working-dir}/manager-{manager-os}/inventory.yaml" - - track-output: "{working-dir}/manager-{manager-os}/track.yaml" - - label-termination-date: "1d" - - label-team: "qa" - on-error: "abort-all" - cleanup: - this: process - with: - path: python3 - args: - - modules/allocation/main.py - - action: delete - - track-output: "{working-dir}/manager-{manager-os}/track.yaml" - - # Unique agent allocate task - - task: "allocate-agent-{agent}" - description: "Allocate resources for the agent." - do: - this: process - with: - path: python3 - args: - - modules/allocation/main.py - - action: create - - provider: "{infra-provider}" - - size: small - - composite-name: "{agent}" - - inventory-output: "{working-dir}/agent-{agent}/inventory.yaml" - - track-output: "{working-dir}/agent-{agent}/track.yaml" - - label-termination-date: "1d" - - label-team: "qa" - on-error: "abort-all" - foreach: - - variable: agent-os - as: agent - cleanup: - this: process - with: - path: python3 - args: - - modules/allocation/main.py - - action: delete - - track-output: "{working-dir}/agent-{agent}/track.yaml" - depends-on: - - "provision-manager-{manager-os}" - - # Unique manager provision task - - task: "provision-manager-{manager-os}" - description: "Provision the manager." - do: - this: process - with: - path: python3 - args: - - modules/provision/main.py - - inventory: "{working-dir}/manager-{manager-os}/inventory.yaml" - - install: - - component: wazuh-manager - type: assistant - version: 4.7.3 - live: True - depends-on: - - "allocate-manager-{manager-os}" - on-error: "abort-all" - - - # Generic agent test task - - task: "run-agent-{agent}-tests" - description: "Run tests install for the agent {agent}." - do: - this: process - with: - path: python3 - args: - - modules/testing/main.py - - targets: - - wazuh-1: "{working-dir}/manager-{manager-os}/inventory.yaml" - - agent: "{working-dir}/agent-{agent}/inventory.yaml" - - tests: "install,registration,basic_info,connection,restart,stop,uninstall" - - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" - - live: "True" - foreach: - - variable: agent-os - as: agent - depends-on: - - "allocate-agent-{agent}" diff --git a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete.yaml b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete.yaml index 8c21f1e8f4..6d5f0a247a 100755 --- a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete.yaml +++ b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-complete.yaml @@ -92,7 +92,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -112,8 +112,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "install,registration,connection,basic_info,restart,stop,uninstall" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-restart-ins-prov.yaml b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-restart-ins-prov.yaml index cd12531247..bc1d4970e6 100755 --- a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-restart-ins-prov.yaml +++ b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-restart-ins-prov.yaml @@ -90,7 +90,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -111,7 +111,7 @@ tasks: - install: - component: wazuh-agent type: package - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-agent-{agent}" @@ -135,8 +135,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "restart" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-stop-ins-prov.yaml b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-stop-ins-prov.yaml index c01800b3f5..08caa17057 100755 --- a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-stop-ins-prov.yaml +++ b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-stop-ins-prov.yaml @@ -90,7 +90,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -111,7 +111,7 @@ tasks: - install: - component: wazuh-agent type: package - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-agent-{agent}" @@ -135,8 +135,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "stop" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-suse.yaml b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-suse.yaml index 5f2c1e1047..88eaaa4823 100644 --- a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-suse.yaml +++ b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-suse.yaml @@ -82,7 +82,7 @@ tasks: - component: curl - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -124,8 +124,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "install,registration,basic_info,connection,restart,stop,uninstall" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-uninstall-ins-prov.yaml b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-uninstall-ins-prov.yaml index 4cc042b41e..4c33dc5e45 100755 --- a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-uninstall-ins-prov.yaml +++ b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-uninstall-ins-prov.yaml @@ -90,7 +90,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -111,7 +111,7 @@ tasks: - install: - component: wazuh-agent type: package - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-agent-{agent}" @@ -135,8 +135,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "uninstall" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-windows-complete.yaml b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-windows-complete.yaml index 9c820e127f..e657bbf8ad 100755 --- a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-windows-complete.yaml +++ b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-windows-complete.yaml @@ -89,7 +89,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -109,11 +109,12 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "install,registration,connection,basic_info,restart,stop,uninstall" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os as: agent depends-on: - "allocate-agent-{agent}" + - "provision-manager-{manager-os}" \ No newline at end of file diff --git a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-windows-install.yaml b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-windows-install.yaml index 9b237868aa..3ef28dac15 100755 --- a/deployability/modules/workflow_engine/examples/agent/aws/test-agent-windows-install.yaml +++ b/deployability/modules/workflow_engine/examples/agent/aws/test-agent-windows-install.yaml @@ -22,7 +22,7 @@ tasks: - agent: "{working-dir}/agent-windows-server-2016-amd64/inventory.yaml" - tests: "install" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" diff --git a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-1.yaml b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-1.yaml index 1b10763219..bee7abe6f2 100755 --- a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-1.yaml +++ b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-1.yaml @@ -85,7 +85,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -106,8 +106,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "install,registration,connection,basic_info,restart,stop,uninstall" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-2.yaml b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-2.yaml index db0299dbb1..4c799c6530 100755 --- a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-2.yaml +++ b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-2.yaml @@ -85,7 +85,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -106,8 +106,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "install,registration,connection,basic_info,restart,stop,uninstall" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-macOS.yaml b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-macOS.yaml index e5dbe718c9..202cda44bd 100644 --- a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-macOS.yaml +++ b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-macOS.yaml @@ -82,7 +82,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -103,8 +103,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "install,registration,basic_info,connection,restart,stop,uninstall" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-macOs.yaml b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-macOs.yaml deleted file mode 100755 index e5dbe718c9..0000000000 --- a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-complete-macOs.yaml +++ /dev/null @@ -1,113 +0,0 @@ -version: 0.1 -description: This workflow is used to test agents deployment for DDT1 PoC -variables: - agent-os: - # Run one at a time as there are limitations on the number of hosts - - macos-sonoma-14.0-arm64 - #- macos-ventura-13.4.1-arm64 - manager-os: linux-ubuntu-22.04-amd64 - infra-provider: vagrant - working-dir: /tmp/dtt1-poc - -tasks: - # Unique manager allocate task - - task: "allocate-manager-{manager-os}" - description: "Allocate resources for the manager." - do: - this: process - with: - path: python3 - args: - - modules/allocation/main.py - - action: create - - provider: "aws" - - size: large - - composite-name: "{manager-os}" - - inventory-output: "{working-dir}/manager-{manager-os}/inventory.yaml" - - track-output: "{working-dir}/manager-{manager-os}/track.yaml" - - label-termination-date: "1d" - - label-team: "qa" - on-error: "abort-all" - cleanup: - this: process - with: - path: python3 - args: - - modules/allocation/main.py - - action: delete - - track-output: "{working-dir}/manager-{manager-os}/track.yaml" - - # Unique agent allocate task - - task: "allocate-agent-{agent}" - description: "Allocate resources for the agent." - do: - this: process - with: - path: python3 - args: - - modules/allocation/main.py - - action: create - - provider: "{infra-provider}" - - size: small - - composite-name: "{agent}" - - inventory-output: "{working-dir}/agent-{agent}/inventory.yaml" - - track-output: "{working-dir}/agent-{agent}/track.yaml" - - label-termination-date: "1d" - - label-team: "qa" - on-error: "abort-all" - foreach: - - variable: agent-os - as: agent - cleanup: - this: process - with: - path: python3 - args: - - modules/allocation/main.py - - action: delete - - track-output: "{working-dir}/agent-{agent}/track.yaml" - depends-on: - - "provision-manager-{manager-os}" - - # Unique manager provision task - - task: "provision-manager-{manager-os}" - description: "Provision the manager." - do: - this: process - with: - path: python3 - args: - - modules/provision/main.py - - inventory: "{working-dir}/manager-{manager-os}/inventory.yaml" - - install: - - component: wazuh-manager - type: assistant - version: 4.7.3 - live: True - depends-on: - - "allocate-manager-{manager-os}" - on-error: "abort-all" - - - # Generic agent test task - - task: "run-agent-{agent}-tests" - description: "Run tests install for the agent {agent}." - do: - this: process - with: - path: python3 - args: - - modules/testing/main.py - - targets: - - wazuh-1: "{working-dir}/manager-{manager-os}/inventory.yaml" - - agent: "{working-dir}/agent-{agent}/inventory.yaml" - - tests: "install,registration,basic_info,connection,restart,stop,uninstall" - - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" - - live: "True" - foreach: - - variable: agent-os - as: agent - depends-on: - - "allocate-agent-{agent}" diff --git a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-restart-ins-prov-1.yaml b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-restart-ins-prov-1.yaml index 7a41aa7c4f..4402fc08ad 100755 --- a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-restart-ins-prov-1.yaml +++ b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-restart-ins-prov-1.yaml @@ -79,7 +79,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -100,7 +100,7 @@ tasks: - install: - component: wazuh-agent type: package - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-agent-{agent}" @@ -124,8 +124,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "restart" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-restart-ins-prov-2.yaml b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-restart-ins-prov-2.yaml index 7c36f9c872..aecb476577 100755 --- a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-restart-ins-prov-2.yaml +++ b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-restart-ins-prov-2.yaml @@ -79,7 +79,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -100,7 +100,7 @@ tasks: - install: - component: wazuh-agent type: package - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-agent-{agent}" @@ -124,8 +124,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "restart" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-stop-ins-prov-1.yaml b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-stop-ins-prov-1.yaml index 1f2330125b..9f1dc32ac9 100755 --- a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-stop-ins-prov-1.yaml +++ b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-stop-ins-prov-1.yaml @@ -79,7 +79,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -100,7 +100,7 @@ tasks: - install: - component: wazuh-agent type: package - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-agent-{agent}" @@ -124,8 +124,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "stop" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-stop-ins-prov-2.yaml b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-stop-ins-prov-2.yaml index b09c24c05e..2b42d06698 100755 --- a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-stop-ins-prov-2.yaml +++ b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-stop-ins-prov-2.yaml @@ -79,7 +79,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -100,7 +100,7 @@ tasks: - install: - component: wazuh-agent type: package - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-agent-{agent}" @@ -124,8 +124,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "stop" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-uninstall-ins-prov-1.yaml b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-uninstall-ins-prov-1.yaml index cb2dff4cb3..01c9f95c9c 100755 --- a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-uninstall-ins-prov-1.yaml +++ b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-uninstall-ins-prov-1.yaml @@ -79,7 +79,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -100,7 +100,7 @@ tasks: - install: - component: wazuh-agent type: package - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-agent-{agent}" @@ -124,8 +124,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "uninstall" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-uninstall-ins-prov-2.yaml b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-uninstall-ins-prov-2.yaml index be28e87d6b..f917254e44 100755 --- a/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-uninstall-ins-prov-2.yaml +++ b/deployability/modules/workflow_engine/examples/agent/vagrant/test-agent-uninstall-ins-prov-2.yaml @@ -79,7 +79,7 @@ tasks: - install: - component: wazuh-manager type: assistant - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-manager-{manager-os}" @@ -100,7 +100,7 @@ tasks: - install: - component: wazuh-agent type: package - version: 4.7.3 + version: 4.7.4 live: True depends-on: - "allocate-agent-{agent}" @@ -124,8 +124,8 @@ tasks: - agent: "{working-dir}/agent-{agent}/inventory.yaml" - tests: "uninstall" - component: "agent" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" foreach: - variable: agent-os diff --git a/deployability/modules/workflow_engine/examples/central_components/aws/dtt1-central_components-poc-aws.yaml b/deployability/modules/workflow_engine/examples/central_components/aws/dtt1-central_components-poc-aws.yaml index 4f210e8b92..d5781b5538 100644 --- a/deployability/modules/workflow_engine/examples/central_components/aws/dtt1-central_components-poc-aws.yaml +++ b/deployability/modules/workflow_engine/examples/central_components/aws/dtt1-central_components-poc-aws.yaml @@ -60,8 +60,8 @@ tasks: - wazuh-1: "{working-dir}/central_components-{central_components}/inventory.yaml" - tests: "install,restart,stop,uninstall" - component: "central_components" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" on-error: "abort-all" foreach: diff --git a/deployability/modules/workflow_engine/examples/central_components/vagrant/dtt1-central_components-poc-vagrant.yaml b/deployability/modules/workflow_engine/examples/central_components/vagrant/dtt1-central_components-poc-vagrant.yaml index 952dcfc953..dd18640ae6 100644 --- a/deployability/modules/workflow_engine/examples/central_components/vagrant/dtt1-central_components-poc-vagrant.yaml +++ b/deployability/modules/workflow_engine/examples/central_components/vagrant/dtt1-central_components-poc-vagrant.yaml @@ -2,9 +2,8 @@ version: 0.1 description: This workflow is used to test the Wazuh manager deployment for DDT1 PoC variables: central_components-os: + - linux-ubuntu-20.04-amd64 - linux-ubuntu-22.04-amd64 - - linux-ubuntu-22.04-amd64 - - linux-oracle-9-amd64 - linux-amazon-2-amd64 - linux-redhat-7-amd64 - linux-redhat-8-amd64 @@ -33,10 +32,20 @@ tasks: - composite-name: "{central_components}" - inventory-output: "{working-dir}/central_components-{central_components}/inventory.yaml" - track-output: "{working-dir}/central_components-{central_components}/track.yaml" + - label-termination-date: "1d" + - label-team: "qa" on-error: "abort-all" foreach: - variable: central_components-os as: central_components + cleanup: + this: process + with: + path: python3 + args: + - modules/allocation/main.py + - action: delete + - track-output: "{working-dir}/central_components-{central_components-os}/track.yaml" # Generic manager test task - task: "run-central_components-{central_components}-tests" diff --git a/deployability/modules/workflow_engine/examples/manager/aws/dtt1-managers-poc-aws.yaml b/deployability/modules/workflow_engine/examples/manager/aws/dtt1-managers-poc-aws.yaml index 2471660ebe..762609c97b 100644 --- a/deployability/modules/workflow_engine/examples/manager/aws/dtt1-managers-poc-aws.yaml +++ b/deployability/modules/workflow_engine/examples/manager/aws/dtt1-managers-poc-aws.yaml @@ -62,6 +62,6 @@ tasks: - wazuh-11: "{working-dir}/manager-linux-debian-12-amd64/inventory.yaml" - tests: "install,restart,stop,uninstall" - component: "manager" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True" \ No newline at end of file diff --git a/deployability/modules/workflow_engine/examples/manager/vagrant/dtt1-managers-poc-vagrant.yaml b/deployability/modules/workflow_engine/examples/manager/vagrant/dtt1-managers-poc-vagrant.yaml index 4b2fa717a2..cf38c86619 100644 --- a/deployability/modules/workflow_engine/examples/manager/vagrant/dtt1-managers-poc-vagrant.yaml +++ b/deployability/modules/workflow_engine/examples/manager/vagrant/dtt1-managers-poc-vagrant.yaml @@ -62,6 +62,6 @@ tasks: - wazuh-12: "{working-dir}/manager-linux-debian-12-amd64/inventory.yaml" - tests: "install,restart,stop,uninstall" - component: "manager" - - wazuh-version: "4.7.3" - - wazuh-revision: "40714" + - wazuh-version: "4.7.4" + - wazuh-revision: "40717" - live: "True"