diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index faa94c05..dd8e6fbf 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -75,7 +75,7 @@ jobs: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml - check-single-node: + check-intel-single-node: runs-on: ubuntu-22.04 needs: [prepare-variables, Execute-Goss-tests] #, build-images] env: @@ -245,7 +245,177 @@ jobs: - name: Check errors in ossec.log for Wazuh manager run: ./.github/single-node-log-check.sh - check-multi-node: + check-arm-single-node: + runs-on: ubuntu-22.04-arm + needs: [prepare-variables, Execute-Goss-tests] #, build-images] + env: + WAZUH_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.WAZUH_IMAGE_VERSION }} + WAZUH_MINOR_VERSION: ${{ needs.prepare-variables.outputs.WAZUH_MINOR_VERSION }} + WAZUH_REGISTRY: ${{ needs.prepare-variables.outputs.WAZUH_REGISTRY }} + steps: + + - name: Check out code + uses: actions/checkout@v4 + + - name: Configure aws credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_IAM_DOCKER_ROLE }} + aws-region: "${{ secrets.AWS_REGION }}" + + - name: Log in to Amazon ECR + uses: aws-actions/amazon-ecr-login@v2 + + - name: Create single node certficates + run: | + wazuh_certs_tool_url=$(aws s3 presign s3://${{ vars.AWS_S3_BUCKET_DEV }}/development/wazuh/5.x/secondary/installation-assistant/${{ env.WAZUH_IMAGE_VERSION }}/wazuh-certs-tool.sh --expires-in 3600 --region us-west-1) + curl -sL "$wazuh_certs_tool_url" -o ./wazuh-certs-tool.sh + cat > config.yml </$(ip addr show docker0 | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)/g" wazuh-agent/docker-compose.yml + + - name: Start Wazuh agent + run: docker compose up -d + working-directory: ./wazuh-agent + + - name: Check Wazuh agent enrollment + run: | + sleep 20 + curl -k -s -X GET "https://localhost:55000/agents?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" + env: + TOKEN: $(curl -s -u wazuh-wui:wazuh-wui -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + + - name: Check errors in ossec.log for Wazuh manager + run: ./.github/single-node-log-check.sh + + check-intel-multi-node: runs-on: ubuntu-22.04 needs: [prepare-variables, Execute-Goss-tests] #, build-images] env: @@ -429,3 +599,188 @@ jobs: - name: Check errors in ossec.log for Wazuh manager run: ./.github/multi-node-log-check.sh + + check-arm-multi-node: + runs-on: ubuntu-22.04-arm + needs: [prepare-variables, Execute-Goss-tests] #, build-images] + env: + WAZUH_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.WAZUH_IMAGE_VERSION }} + WAZUH_MINOR_VERSION: ${{ needs.prepare-variables.outputs.WAZUH_MINOR_VERSION }} + WAZUH_REGISTRY: ${{ needs.prepare-variables.outputs.WAZUH_REGISTRY }} + steps: + + - name: Check out code + uses: actions/checkout@v4 + + - name: free disk space + uses: ./.github/free-disk-space + + - name: Configure aws credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_IAM_DOCKER_ROLE }} + aws-region: "${{ secrets.AWS_REGION }}" + + - name: Log in to Amazon ECR + uses: aws-actions/amazon-ecr-login@v2 + + - name: Create multi node certficates + run: | + wazuh_certs_tool_url=$(aws s3 presign s3://${{ vars.AWS_S3_BUCKET_DEV }}/development/wazuh/5.x/secondary/installation-assistant/${{ env.WAZUH_IMAGE_VERSION }}/wazuh-certs-tool.sh --expires-in 3600 --region us-west-1) + curl -sL "$wazuh_certs_tool_url" -o ./wazuh-certs-tool.sh + cat > config.yml </$(ip addr show docker0 | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)/g" wazuh-agent/docker-compose.yml + + - name: Start Wazuh agent + run: docker compose -f wazuh-agent/docker-compose.yml up -d + + - name: Check Wazuh agent enrollment + run: | + sleep 20 + curl -k -s -X GET "https://localhost:55000/agents?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" + env: + TOKEN: $(curl -s -u wazuh-wui:wazuh-wui -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true") + + - name: Check errors in ossec.log for Wazuh manager + run: ./.github/multi-node-log-check.sh