From 44e840ffdadb6ba74a021df511f133d6ce363a82 Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Wed, 9 Oct 2024 11:50:38 +0300 Subject: [PATCH] PMM-12641 Cleanup server build scripts (#3217) * PMM-12641 Improve server build scripts * PMM-12641 remove `pmm_running_in_docker` ansible vars --- build/docker/server/Dockerfile.el9 | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/build/docker/server/Dockerfile.el9 b/build/docker/server/Dockerfile.el9 index 7a6e95d046..d5feb02671 100644 --- a/build/docker/server/Dockerfile.el9 +++ b/build/docker/server/Dockerfile.el9 @@ -8,14 +8,6 @@ ENV LC_ALL=en_US.utf8 ENV GF_PLUGIN_DIR=/srv/grafana/plugins ENV PS1="[\u@\h \W] # " -LABEL org.opencontainers.image.created ${BUILD_DATE} -LABEL org.opencontainers.image.licenses AGPL-3.0 -LABEL org.opencontainers.image.title Percona Monitoring and Management -LABEL org.opencontainers.image.vendor Percona LLC -LABEL org.opencontainers.image.version ${VERSION} - -EXPOSE 8080 8443 - WORKDIR /opt RUN microdnf -y install epel-release && \ @@ -36,12 +28,23 @@ COPY gitCommit /tmp/gitCommit COPY pmm-client.tar.gz /tmp/ RUN install -T -p -m 644 /opt/ansible/ansible.cfg /etc/ansible/ansible.cfg && \ - ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/main.yml -e "pmm_running_in_docker=true" && \ - ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/update.yml -e "pmm_running_in_docker=true" && \ - ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm/post-build-actions.yml -e "pmm_running_in_docker=true" + ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/main.yml && \ + ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/update.yml && \ + ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm/post-build-actions.yml && \ + sed -i '/^assumeyes/d' /etc/dnf/dnf.conf + +LABEL org.opencontainers.image.created ${BUILD_DATE} +LABEL org.opencontainers.image.licenses AGPL-3.0 +LABEL org.opencontainers.image.title Percona Monitoring and Management +LABEL org.opencontainers.image.vendor Percona LLC +LABEL org.opencontainers.image.version ${VERSION} USER pmm +VOLUME [ "/srv" ] + +EXPOSE 8080 8443 + HEALTHCHECK --interval=3s --timeout=2s --start-period=10s --retries=3 CMD curl -sf http://127.0.0.1:8080/v1/server/readyz CMD ["/opt/entrypoint.sh"]