From ad61daa7dcce841556a69539c1838cbd0ca0094f Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Thu, 14 Nov 2024 21:31:05 +0300 Subject: [PATCH 1/3] PMM-7 Run supervisor as pmm during build --- build/ansible/roles/pmm-images/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/ansible/roles/pmm-images/tasks/main.yml b/build/ansible/roles/pmm-images/tasks/main.yml index 615e468d68..124e147c6f 100644 --- a/build/ansible/roles/pmm-images/tasks/main.yml +++ b/build/ansible/roles/pmm-images/tasks/main.yml @@ -160,6 +160,9 @@ # During build time, this will be the first start of supervisord. - name: Start supervisord shell: supervisord -c /etc/supervisord.conf & + become: true + become_user: pmm + become_method: su - name: Run initialization playbook include_role: From d2240d131181534fef714a70f69978b2998b53d8 Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Thu, 14 Nov 2024 22:28:26 +0300 Subject: [PATCH 2/3] PMM-7 Fix label assignment syntax warning --- build/docker/server/Dockerfile.el9 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/docker/server/Dockerfile.el9 b/build/docker/server/Dockerfile.el9 index 7e18d98c1e..db847e62ee 100644 --- a/build/docker/server/Dockerfile.el9 +++ b/build/docker/server/Dockerfile.el9 @@ -33,11 +33,11 @@ RUN install -T -p -m 644 /opt/ansible/ansible.cfg /etc/ansible/ansible.cfg && \ ansible-playbook -vvv /opt/ansible/pmm-docker/post-build.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} +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 From 88fba9f8c64dd768f13d0713f58d0174a598afa9 Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Fri, 15 Nov 2024 02:02:59 +0300 Subject: [PATCH 3/3] PMM-7 Clean yum cache as well --- build/ansible/pmm-docker/post-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/build/ansible/pmm-docker/post-build.yml b/build/ansible/pmm-docker/post-build.yml index 96d4945937..ec4fb089ce 100644 --- a/build/ansible/pmm-docker/post-build.yml +++ b/build/ansible/pmm-docker/post-build.yml @@ -69,6 +69,7 @@ - /var/log/nginx - /var/lib/pgsql - /srv/pmm-encryption.key + - /var/cache/yum - name: Remove users created by installers user: