Skip to content

Commit 1898e79

Browse files
PMM-7: Percona server enable MyRocks engine (#163)
* PMM-7: Read mysql config * PMM-7: Change mysql config * PMM-7: Append mysql config before start * PMM-7: Remove append mysql config before start * PMM-7: Env variable for myrocks and enable it * PMM-7: When condition for enabling my rocks * PMM-7: When condition for enabling my rocks * PMM-7: Code cleanup
1 parent 9d1ce1d commit 1898e79

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

pmm_qa/percona_server/percona-server-setup.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
metrics_mode: "{{ lookup('env', 'metrics_mode') }}"
2525
setup_type: "{{ lookup('env', 'SETUP_TYPE') }}"
2626
random_service_name_value: ""
27+
my_rocks: "{{ lookup('env', 'MY_ROCKS') | default(false, true) }}"
28+
2729

2830
tasks:
2931
- name: Mofidy the node count for group replication
@@ -250,4 +252,14 @@
250252
mysql -uroot -p{{ root_password }} school < /ps_load.sql
251253
'
252254
loop: "{{ range(1, nodes_count | int + 1) | list }}"
253-
when: setup_type != "gr" and setup_type != "replication"
255+
when: setup_type != "gr" and setup_type != "replication"
256+
257+
- name: Enable MySQL MyRocks
258+
community.docker.docker_container_exec:
259+
container: "ps_pmm_{{ ps_version }}_{{ item }}"
260+
command: >
261+
/bin/sh -c '
262+
ps-admin --enable-rocksdb -u root -p{{ root_password }}
263+
'
264+
loop: "{{ range(1, nodes_count | int + 1) | list }}"
265+
when: my_rocks | bool

pmm_qa/pmm-framework.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def setup_ps(db_type, db_version=None, db_config=None, args=None):
7676
'PS_VERSION': ps_version,
7777
'CLIENT_VERSION': get_value('CLIENT_VERSION', db_type, args, db_config),
7878
'ADMIN_PASSWORD': os.getenv('ADMIN_PASSWORD') or args.pmm_server_password or 'admin',
79+
'MY_ROCKS': get_value('MY_ROCKS', db_type, args, db_config),
7980
}
8081

8182
run_ansible_playbook('percona_server/percona-server-setup.yml', env_vars, args)

pmm_qa/scripts/database_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"PS": {
3131
"versions": ["5.7", "8.4", "8.0"],
3232
"configurations": {"QUERY_SOURCE": "perfschema", "SETUP_TYPE": "", "CLIENT_VERSION": "3-dev-latest",
33-
"TARBALL": "", "NODES_COUNT": 1}
33+
"TARBALL": "", "NODES_COUNT": 1, "MY_ROCKS": "false"}
3434
},
3535
"SSL_MYSQL": {
3636
"versions": ["5.7", "8.4", "8.0"],

0 commit comments

Comments
 (0)