Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-12641 Cleanup server build scripts #3217

Open
wants to merge 4 commits into
base: v3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions build/docker/server/Dockerfile.el9
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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"
Comment on lines -39 to -41
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is pmm_running_in_docker used anywhere?

Copy link
Member Author

@ademidoff ademidoff Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's still being used in v2, but not in v3 :)

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"]
Loading