diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index cecc3e5c..c7d34d61 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -10,6 +10,11 @@ jobs: - name: Check out code uses: actions/checkout@v3 + - name: Install docker-compose + run: | + curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + chmod +x /usr/local/bin/docker-compose + - name: Build Wazuh images run: build-docker-images/build-images.sh @@ -63,6 +68,11 @@ jobs: - name: Check out code uses: actions/checkout@v3 + - name: Install docker-compose + run: | + curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + chmod +x /usr/local/bin/docker-compose + - name: Create enviroment variables run: cat .env > $GITHUB_ENV @@ -186,6 +196,11 @@ jobs: - name: Check out code uses: actions/checkout@v3 + - name: Install docker-compose + run: | + curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + chmod +x /usr/local/bin/docker-compose + - name: Create enviroment variables run: cat .env > $GITHUB_ENV @@ -232,7 +247,7 @@ jobs: echo 'Waiting for Wazuh indexer start' free -m df -h - sleep 10 + sleep 120 done status_green="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l`" if [[ $status_green -eq 1 ]]; then diff --git a/build-docker-images/wazuh-indexer/config/config.sh b/build-docker-images/wazuh-indexer/config/config.sh index b69f490f..ea907b7b 100644 --- a/build-docker-images/wazuh-indexer/config/config.sh +++ b/build-docker-images/wazuh-indexer/config/config.sh @@ -72,20 +72,6 @@ mkdir -p ${TARGET_DIR}/usr/lib/tmpfiles.d mkdir -p ${TARGET_DIR}/usr/lib/sysctl.d mkdir -p ${TARGET_DIR}/usr/lib/systemd/system mkdir -p ${TARGET_DIR}${CONFIG_DIR}/certs -# Move configuration files for wazuh-indexer -mv -f ${BASE_DIR}/etc/init.d/${NAME} ${TARGET_DIR}/etc/init.d/${NAME} -mv -f ${BASE_DIR}/etc/wazuh-indexer/* ${TARGET_DIR}${CONFIG_DIR} -mv -f ${BASE_DIR}/etc/sysconfig/${NAME} ${TARGET_DIR}/etc/default/ -mv -f ${BASE_DIR}/usr/lib/tmpfiles.d/* ${TARGET_DIR}/usr/lib/tmpfiles.d/ -mv -f ${BASE_DIR}/usr/lib/sysctl.d/* ${TARGET_DIR}/usr/lib/sysctl.d/ -mv -f ${BASE_DIR}/usr/lib/systemd/system/* ${TARGET_DIR}/usr/lib/systemd/system/ -rm -rf ${BASE_DIR}/etc -rm -rf ${BASE_DIR}/usr -# Copy installation files to final location -cp -pr ${BASE_DIR}/* ${TARGET_DIR}${INSTALLATION_DIR} -# Copy the security tools -cp /$CERT_TOOL ${TARGET_DIR}${INSTALLATION_DIR}/plugins/opensearch-security/tools/ -cp /$PASSWORD_TOOL ${TARGET_DIR}${INSTALLATION_DIR}/plugins/opensearch-security/tools/ # Copy Wazuh's config files for the security plugin cp -pr /roles_mapping.yml ${TARGET_DIR}${INSTALLATION_DIR}/opensearch-security/ cp -pr /roles.yml ${TARGET_DIR}${INSTALLATION_DIR}/opensearch-security/ @@ -101,9 +87,9 @@ cp -pr /wazuh-certificates/admin.pem ${TARGET_DIR}${CONFIG_DIR}/certs/admin.pem cp -pr /wazuh-certificates/admin-key.pem ${TARGET_DIR}${CONFIG_DIR}/certs/admin-key.pem # Delete xms and xmx parameters in jvm.options -sed '/-Xms/d' -i ${TARGET_DIR}${CONFIG_DIR}/jvm.options -sed '/-Xmx/d' -i ${TARGET_DIR}${CONFIG_DIR}/jvm.options -sed -i 's/-Djava.security.policy=file:\/\/\/etc\/wazuh-indexer\/opensearch-performance-analyzer\/opensearch_security.policy/-Djava.security.policy=file:\/\/\/usr\/share\/wazuh-indexer\/opensearch-performance-analyzer\/opensearch_security.policy/g' ${TARGET_DIR}${CONFIG_DIR}/jvm.options +sed '/-Xms/d' -i /etc/wazuh-indexer/jvm.options +sed '/-Xmx/d' -i /etc/wazuh-indexer/jvm.options +sed -i 's/-Djava.security.policy=file:\/\/\/etc\/wazuh-indexer\/opensearch-performance-analyzer\/opensearch_security.policy/-Djava.security.policy=file:\/\/\/usr\/share\/wazuh-indexer\/opensearch-performance-analyzer\/opensearch_security.policy/g' /etc/wazuh-indexer/jvm.options chmod -R 500 ${TARGET_DIR}${CONFIG_DIR}/certs diff --git a/build-docker-images/wazuh-manager/config/permanent_data.env b/build-docker-images/wazuh-manager/config/permanent_data.env index 5439b89b..9e0eac9d 100644 --- a/build-docker-images/wazuh-manager/config/permanent_data.env +++ b/build-docker-images/wazuh-manager/config/permanent_data.env @@ -79,7 +79,9 @@ PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/aws/subscribers/sqs_message_proc PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/aws/subscribers/sqs_queue.py" PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/azure/azure-logs" PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/azure/azure-logs.py" -PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/azure/orm.py" +PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/azure/db/orm.py" +PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/azure/db/utils.py" +PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/azure/db/__init__.py" PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/docker/DockerListener" PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/docker/DockerListener.py" PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/gcloud/gcloud"