-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
198 lines (187 loc) · 6.19 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
---
version: '3.7'
volumes:
pmm-server-data:
networks:
pmm-network:
driver: bridge
ipam:
config:
- subnet: 192.168.0.0/24
gateway: 192.168.0.1
services:
pmm-server:
image: ${PMM_SERVER_IMAGE:-perconalab/pmm-server:dev-latest}
container_name: pmm-server
ports:
- "80:80"
- "443:443"
environment:
- PMM_DEBUG=1
- ENABLE_RBAC=1
- PERCONA_TEST_SAAS_HOST=check-dev.percona.com:443
- GF_AUTH_OAUTH_ALLOW_INSECURE_EMAIL_LOOKUP=1
- PERCONA_PORTAL_URL=https://portal-dev.percona.com
- PERCONA_TEST_CHECKS_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
- PERCONA_TEST_PLATFORM_ADDRESS=https://check-dev.percona.com:443
- PERCONA_TEST_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
- PERCONA_TEST_VERSION_SERVICE_URL=https://check-dev.percona.com/versions/v1
- PERCONA_TEST_TELEMETRY_INTERVAL=10s
- PERCONA_TEST_TELEMETRY_RETRY_BACKOFF=10s
volumes:
- pmm-server-data:/srv
networks:
- pmm-network
# It is essential to have an extra directory `/slowlogs/` between host and container;
# Otherwise, MySQL in Docker for Mac completely locks during/after slowlog rotation tests.
mysql:
image: ${MYSQL_IMAGE:-percona:5.7.30}
container_name: pmm-agent_mysql_5_7
command: >
--sql-mode="ANSI_QUOTES"
--performance-schema --innodb_monitor_enable=all --userstat
--slow_query_log --log_slow_rate_limit=1 --log_slow_admin_statements --log_slow_slave_statements --slow_query_log_file=/tmp/mysql/log/ps5_slow_log.log --long_query_time=0
--character-set-server=utf8 --default-authentication-plugin=mysql_native_password --collation-server=utf8_unicode_ci
ports:
- "3309:3306"
environment:
- MYSQL_ROOT_PASSWORD=^O6VrIoC1@9b
- MYSQL_USER=pmm-agent
- MYSQL_PASSWORD=pmm%*&agent-password
- UMASK=0777 # for slowlog file
volumes:
- /tmp/mysql/log:/tmp/mysql/log:rw
networks:
- pmm-network
mysql8:
image: ${MYSQL_IMAGE:-percona:8.0}
container_name: pmm-agent_mysql_8_0
command: >
--sql-mode="ANSI_QUOTES"
--performance-schema --innodb_monitor_enable=all --userstat
--slow_query_log --log_slow_rate_limit=1 --log_slow_admin_statements --log_slow_slave_statements --slow_query_log_file=/tmp/mysql/log/ps8_slow_log.log --long_query_time=0
--character-set-server=utf8 --default-authentication-plugin=mysql_native_password --collation-server=utf8_unicode_ci
ports:
- "3307:3306"
environment:
- MYSQL_ROOT_PASSWORD=^O6VrIoC1@9b
- MYSQL_USER=pmm-agent
- MYSQL_PASSWORD=pmm%*&agent-password
- UMASK=0777 # for slowlog file
volumes:
- /tmp/mysql/log:/tmp/mysql/log
networks:
- pmm-network
mongo:
image: ${MONGO_IMAGE:-percona/percona-server-mongodb:4.4.24}
container_name: pmm-agent_mongo
command: --profile 2
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root-!@#%^password
networks:
- pmm-network
postgres:
image: ${POSTGRES_IMAGE:-perconalab/percona-distribution-postgresql:15.4}
container_name: pmm-agent_postgres
command: >
-c shared_preload_libraries=pg_stat_monitor,pg_stat_statements
-c track_activity_query_size=2048
-c pg_stat_statements.max=10000
-c pg_stat_monitor.pgsm_query_max_len=10000
-c pg_stat_monitor.pgsm_normalized_query=0
-c pg_stat_statements.track=all
-c pg_stat_statements.save=off
-c track_io_timing=on
ports:
- "5433:5432"
environment:
- POSTGRES_PASSWORD=pmm-^*&@agent-password
networks:
- pmm-network
# it needs for deleting postgres db for test T1087
postgresremovedefaultdb:
image: ${POSTGRES_IMAGE:-perconalab/percona-distribution-postgresql:15}
command: >
psql -Utest -hpostgresnodb -dnot_default_db -c 'DROP DATABASE postgres WITH (FORCE);'
depends_on:
postgresnodb:
condition: service_healthy
environment:
- PGPASSWORD=50mFC#z7lHZ1
networks:
- pmm-network
postgresnodb:
image: ${POSTGRES_IMAGE:-perconalab/percona-distribution-postgresql:15}
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 1s
retries: 120
ports:
- "6435:5432"
environment:
- POSTGRES_PASSWORD=50mFC#z7lHZ1
- POSTGRES_USER=test
- POSTGRES_DB=not_default_db
networks:
- pmm-network
proxysql:
image: ${PROXYSQL_IMAGE:-proxysql/proxysql:2.1.1}
container_name: pmm-agent_proxysql
ports:
- "6032:6032"
- "6033:6033"
- "6070:6070"
volumes:
- ./testdata/proxysql/proxysql.cnf:/etc/proxysql.cnf:rw
networks:
- pmm-network
sysbench:
image: perconalab/sysbench
container_name: pmm-agent_sysbench
depends_on:
- mysql
networks:
- pmm-network
command: >
bash -c "
set -o xtrace
sleep 20
mysql \
--host=mysql \
--port=3306 \
--user=root \
--password=^O6VrIoC1@9b \
-e 'CREATE DATABASE IF NOT EXISTS sbtest'
sysbench \
--db-driver=mysql \
--mysql-host=mysql \
--mysql-port=3306 \
--mysql-user=root \
--mysql-password=^O6VrIoC1@9b \
--mysql-db=sbtest \
--mysql-table-engine=innodb \
--oltp-table-size=1000000 \
/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua \
prepare
sysbench \
--rate=200 \
--threads=64 \
--report-interval=10 \
--time=0 \
--events=0 \
--rand-type=pareto \
--db-driver=mysql \
--mysql-host=mysql \
--mysql-port=3306 \
--mysql-user=root \
--mysql-password=^O6VrIoC1@9b \
--mysql-db=sbtest \
--mysql-table-engine=innodb \
--oltp-reconnect \
--oltp-table-size=1000000 \
/usr/share/sysbench/tests/include/oltp_legacy/select.lua \
run
"