Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion conf/pmm-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM debian:bullseye

MAINTAINER Nikolaos Vyzas <[email protected]>

RUN apt update && apt -y install lsb-release wget curl && wget https://downloads.percona.com/downloads/pmm2/2.34.0/binary/debian/bullseye/x86_64/pmm2-client_2.34.0-6.bullseye_amd64.deb && dpkg -i pmm2-client_2.34.0-6.bullseye_amd64.deb && rm -rf /var/lib/apt/lists/*
RUN apt update && apt -y install lsb-release wget curl gnupg2 && wget https://repo.percona.com/apt/percona-release_latest.generic_all.deb && dpkg -i percona-release_latest.generic_all.deb && percona-release enable pmm3-client release && apt update && apt -y install pmm-client && rm -rf /var/lib/apt/lists/*

CMD ["/entrypoint.bash"]

12 changes: 7 additions & 5 deletions conf/pmm-client/entrypoint.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
# Wait for pmm-server to start (this could be a loop checking the port)
sleep 15

pmm-agent setup --config-file=/usr/local/percona/pmm2/config/pmm-agent.yaml --server-address=pmm-server --server-insecure-tls --server-username=admin --server-password=admin
pmm-agent setup --debug --config-file=/usr/local/percona/pmm/config/pmm-agent.yaml --server-address=pmm-server:8443 --server-insecure-tls --server-username=admin --server-password=admin --force

# Add delay to ensure data is persisted
sleep 3

pmm-agent --config-file=/usr/local/percona/pmm2/config/pmm-agent.yaml
pmm-agent --config-file=/usr/local/percona/pmm/config/pmm-agent.yaml

# Add standard MySQL hosts
pmm-admin add mysql --username=root --password=root --tls --tls-skip-verify --server-url=http://admin:admin@pmm-server --query-source=perfschema mysql1 mysql1:3306
pmm-admin add mysql --username=root --password=root --tls --tls-skip-verify --server-url=http://admin:admin@pmm-server --query-source=perfschema mysql2 mysql2:3306
pmm-admin add mysql --username=root --password=root --tls --tls-skip-verify --server-url=http://admin:admin@pmm-server --query-source=perfschema mysql3 mysql3:3306
pmm-admin add mysql --username=root --password=root --query-source=perfschema mysql1 mysql1:3306
pmm-admin add mysql --username=root --password=root --query-source=perfschema mysql2 mysql2:3306
pmm-admin add mysql --username=root --password=root --query-source=perfschema mysql3 mysql3:3306

# Add ProxySQL hosts
pmm-admin add proxysql --username=radmin --password=radmin proxysql1 proxysql:6032
7 changes: 3 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "2.0"
services:
mysql1:
image: mysql:8.0.30
Expand Down Expand Up @@ -107,12 +106,12 @@ services:
environment:
- ORCHESTRATOR_API="http://orc1:3000/api http://orc2:3000/api http://orc3:3000/api"
pmm:
image: percona/pmm-server:2
image: percona/pmm-server:3
container_name: pmm-server
restart: always
ports:
- "8081:80"
- "4431:443"
- "8080:8080"
- "8443:8443"
networks:
- frontend
- backend
Expand Down