Skip to content

Commit

Permalink
PMM-7 Update compose file for PMM 3 (#1655)
Browse files Browse the repository at this point in the history
* PMM-7 Update compose file for PMM 3

* PMM-7 use oraclelinux image for pmm client

* PMM-7 Use latest image for percona-server

* PMM-7 Use dev-container image and optional env variable for pmm server

* PMM-7 Fix typo in image tag
  • Loading branch information
matejkubinec authored Feb 20, 2025
1 parent a2fe68f commit 275581f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 30 deletions.
19 changes: 1 addition & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,7 @@ docker-compose up -d
yarn dev
```

For a much simpler development environment you could create a local file `docker-compose.local.yml` inside of `pmm-app` folder:

```yml
version: "3"
services:
pmm-server:
container_name: pmm-server
image: percona/pmm-server:2
environment:
- ENABLE_DBAAS=1
- ENABLE_BACKUP_MANAGEMENT=1
- ENABLE_ALERTING=1
volumes:
- ./dist:/srv/grafana/plugins/pmm-app/dist
ports:
- 80:80
restart: always
```
For a much simpler development environment you could run `docker compose up -d pmm-server` just to start setup the PMM server inside of `pmm-app` folder.

Please note, that we map the `./pmm-app/dist` folder as a subfolder of `/var/lib/grafana/plugins` so that front-end artifacts,
i.e. panels and dashboards, can be picked up by grafana server running in the docker container.
Expand Down
30 changes: 18 additions & 12 deletions pmm-app/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
version: "3"
services:
pmm-server:
container_name: pmm-server
image: perconalab/pmm-server:dev-latest
# Temporary till we have arm builds
platform: linux/amd64
image: ${PMM_SERVER_IMAGE:-perconalab/pmm-server:3-dev-container}
volumes:
- "./dist:/srv/grafana/plugins/pmm-app/dist"
- './dist:/srv/grafana/plugins/pmm-app/dist'
environment:
- PMM_DEBUG=1
- PMM_DEV_PORTAL_URL=https://portal-dev.percona.com
- PMM_DEV_PERCONA_PLATFORM_ADDRESS=https://check-dev.percona.com:443
- PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY=RWTkF7Snv08FCboTne4djQfN5qbrLfAjb8SY3/wwEP+X5nUrkxCEvUDJ
ports:
- 80:80
- 443:443
- 80:8080
- 443:8443
- 29000:9000
- 9933:9933
restart: always
Expand All @@ -24,19 +30,19 @@ services:

pmm-client:
container_name: pmm-client
image: centos
image: oraclelinux:9
depends_on:
- pmm-server
- sysbench-ps
command: >
bash -c "
yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm -y
percona-release disable all
percona-release enable original testing
percona-release enable pmm3-client
yum update -y
yum install pmm2-client -y
pmm-agent setup --config-file=/usr/local/percona/pmm2/config/pmm-agent.yaml --server-address=pmm-server:443 --server-insecure-tls --server-username=admin --server-password=admin
nohup pmm-agent --config-file=/usr/local/percona/pmm2/config/pmm-agent.yaml &
yum install pmm-client -y
pmm-agent setup --config-file=/usr/local/percona/pmm/config/pmm-agent.yaml --server-address=pmm-server:8443 --server-insecure-tls --server-username=admin --server-password=admin
nohup pmm-agent --config-file=/usr/local/percona/pmm/config/pmm-agent.yaml &
sleep 60
pmm-admin add mysql --cluster=cl1 --environment=dev --custom-labels='app=wp1' --username=root --password=secret --query-source=slowlog MySQLSlowLog ps:3306
pmm-admin add mysql --cluster=cl2 --environment=prod --custom-labels='app=wp2' --username=root --password=secret --query-source=perfschema MySQLPerfSchema ps:3306
Expand All @@ -62,15 +68,15 @@ services:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=secret
ports:
- "5432:5432"
- '5432:5432'

mongo:
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=mongo
- MONGO_INITDB_ROOT_PASSWORD=secret
ports:
- "27017:27017"
- '27017:27017'

sysbench-ps:
container_name: sysbench-ps
Expand Down

0 comments on commit 275581f

Please sign in to comment.