Skip to content

Commit

Permalink
PMM-7 run pmm client for api tests (#3204)
Browse files Browse the repository at this point in the history
* PMM-7 run pmm-client for API tests

* PMM-7 run pmm-client for API tests

* PMM-7 run pmm-client for API tests
  • Loading branch information
BupycHuk committed Sep 24, 2024
1 parent e7ae279 commit e6119b4
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions api-tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ services:
--sql-mode="ANSI_QUOTES"
--performance-schema --innodb_monitor_enable=all
--slow_query_log --slow_query_log_file=/mysql/slowlogs/slow.log --long_query_time=0
ports:
- 127.0.0.1:3306:3306
environment:
- MYSQL_ROOT_PASSWORD=root-password
- MYSQL_USER=pmm-agent
- MYSQL_PASSWORD=pmm-agent-password
- UMASK=0777 # for slowlog file
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot", "-proot-password"]
interval: 5s
timeout: 5s
retries: 20
volumes:
- test_db_mysql:/docker-entrypoint-initdb.d/:ro
- ./testdata/mysql:/mysql
Expand All @@ -51,8 +54,6 @@ services:
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:4.2}
container_name: pmm-agent_mongo
command: --profile 2
ports:
- 127.0.0.1:27017:27017
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root-password
Expand All @@ -67,14 +68,33 @@ services:
-c pg_stat_statements.track=all
-c pg_stat_statements.save=off
-c track_io_timing=on
ports:
- 127.0.0.1:5432:5432
environment:
- POSTGRES_USER=pmm-agent
- POSTGRES_PASSWORD=pmm-agent-password
volumes:
- test_db_postgres:/docker-entrypoint-initdb.d/


pmm-client-mysql:
image: percona/pmm-client:2
platform: "linux/amd64"
container_name: pmm-client-mysql
depends_on:
pmm-server:
condition: service_healthy
mysql:
condition: service_healthy
environment:
PMM_AGENT_SERVER_ADDRESS: pmm-server
PMM_AGENT_SERVER_USERNAME: admin
PMM_AGENT_SERVER_PASSWORD: admin
PMM_AGENT_SERVER_INSECURE_TLS: 1
PMM_AGENT_CONFIG_FILE: config/pmm-agent.yaml
PMM_AGENT_SETUP: 1
PMM_AGENT_SETUP_FORCE: 1
PMM_AGENT_SIDECAR: 1
# PMM_AGENT_PRERUN_SCRIPT: "pmm-admin status --wait=10s; pmm-admin add mysql --username=pmm-agent --password=pmm-agent-password --host=pmm-agent_mysql --port=3306"

sysbench:
image: perconalab/sysbench
container_name: pmm-agent_sysbench
Expand Down

0 comments on commit e6119b4

Please sign in to comment.