Skip to content

Commit

Permalink
PMM-13668 PMM-13678 Updates add PS 8.4 and MS 8.4 Support (#111)
Browse files Browse the repository at this point in the history
* Updates add PS 8.4 Support, Fix mysql_native_plugin for 8.4. Fix 8.0 and 57 URLS based on new GLIB versions

* Updates and also Add support for MS version 8.4 and 8.0.40

* Updates keep defaults as 8.0 only for PS and MySQL for now.
  • Loading branch information
saikumar-vs authored Jan 16, 2025
1 parent b15a7aa commit 9f409ee
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 18 deletions.
18 changes: 13 additions & 5 deletions pmm_qa/client_container_ms_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ fi

if [ -z "$ms_version" ]
then
export ms_version="8.0.33"
export ms_version="8.0"
fi

if [ -z "$ms_tarball" ]
then
export ms_tarball="https://dev.mysql.com/get/Downloads/MySQL-8/mysql-8.0.33-linux-glibc2.28-x86_64.tar.gz"
export ms_tarball="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.40-linux-glibc2.17-x86_64-minimal.tar.xz"
fi

if [ -z "$query_source" ]
Expand All @@ -49,17 +49,25 @@ dbdeployer unpack ${tar_ball_name} --sandbox-binary=~/ms${ms_version} --overwrit
export db_version_sandbox=$(ls ~/ms${ms_version})
export SERVICE_RANDOM_NUMBER=$((1 + $RANDOM % 9999))

# Initialize my_cnf_options
my_cnf_options=""

# Check if ps_version is 8.4 or greater to enable the plugin to change the password
if [[ "$ms_version" =~ ^8\.[4-9]([0-9])? || "$ms_version" =~ ^[9-9][0-9]\. ]]; then
my_cnf_options="mysql-native-password=ON"
fi

if [[ "$number_of_nodes" == 1 ]];then
if [[ ! -z $group_replication ]]; then
dbdeployer deploy --topology=group replication ${db_version_sandbox} --single-primary --sandbox-binary=~/ms${ms_version} --remote-access=% --bind-address=0.0.0.0 --force
dbdeployer deploy --topology=group replication ${db_version_sandbox} --single-primary --sandbox-binary=~/ms${ms_version} --remote-access=% --bind-address=0.0.0.0 --force ${my_cnf_options:+--my-cnf-options="$my_cnf_options"}
export db_sandbox=$(dbdeployer sandboxes | awk -F' ' '{print $1}')
node_port=`dbdeployer sandboxes --header | grep ${db_version_sandbox} | grep 'group-single-primary' | awk -F'[' '{print $2}' | awk -F' ' '{print $1}'`
mysql -h 127.0.0.1 -u msandbox -pmsandbox --port $node_port -e "ALTER USER 'msandbox'@'localhost' IDENTIFIED WITH mysql_native_password BY 'msandbox';"
mysql -h 127.0.0.1 -u msandbox -pmsandbox --port $node_port -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'GRgrO9301RuF';"
mysql -h 127.0.0.1 -u msandbox -pmsandbox --port $node_port -e "SET GLOBAL innodb_monitor_enable=all;"
mysql -h 127.0.0.1 -u msandbox -pmsandbox --port $node_port -e "UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME LIKE '%statements%';"
else
dbdeployer deploy single ${db_version_sandbox} --sandbox-binary=~/ms${ms_version} --port=$MS_PORT --remote-access=% --bind-address=0.0.0.0 --force
dbdeployer deploy single ${db_version_sandbox} --sandbox-binary=~/ms${ms_version} --port=$MS_PORT --remote-access=% --bind-address=0.0.0.0 --force ${my_cnf_options:+--my-cnf-options="$my_cnf_options"}
export db_sandbox=$(dbdeployer sandboxes | awk -F' ' '{print $1}')
node_port=`dbdeployer sandboxes --header | grep ${db_version_sandbox} | grep 'single' | awk -F'[' '{print $2}' | awk -F' ' '{print $1}'`
mysql -h 127.0.0.1 -u msandbox -pmsandbox --port $node_port -e "ALTER USER 'msandbox'@'localhost' IDENTIFIED WITH mysql_native_password BY 'msandbox';"
Expand Down Expand Up @@ -91,7 +99,7 @@ if [[ "$number_of_nodes" == 1 ]];then
pmm-admin add mysql --query-source=$query_source --username=msandbox --password=msandbox --environment=dev --cluster=dev-cluster --replication-set=repl1 ms-single-${SERVICE_RANDOM_NUMBER} 127.0.0.1:$node_port
fi
else
dbdeployer deploy multiple ${db_version_sandbox} --sandbox-binary=~/ms${ms_version} --nodes $number_of_nodes --force --remote-access=% --bind-address=0.0.0.0
dbdeployer deploy multiple ${db_version_sandbox} --sandbox-binary=~/ms${ms_version} --nodes $number_of_nodes --force --remote-access=% --bind-address=0.0.0.0 ${my_cnf_options:+--my-cnf-options="$my_cnf_options"}
export db_sandbox=$(dbdeployer sandboxes | awk -F' ' '{print $1}')
node_port=`dbdeployer sandboxes --header | grep ${db_version_sandbox} | grep 'multiple' | awk -F'[' '{print $2}' | awk -F' ' '{print $1}'`
mysql -h 127.0.0.1 -u msandbox -pmsandbox --port $node_port -e "ALTER USER 'msandbox'@'localhost' IDENTIFIED WITH mysql_native_password BY 'msandbox';"
Expand Down
18 changes: 13 additions & 5 deletions pmm_qa/client_container_ps_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ fi

if [ -z "$ps_version" ]
then
export ps_version=8
export ps_version=8.0
fi

if [ -z "$ps_tarball" ]
then
export ps_tarball=https://downloads.percona.com/downloads/Percona-Server-LATEST/Percona-Server-8.0.29-21/binary/tarball/Percona-Server-8.0.29-21-Linux.x86_64.glibc2.17-minimal.tar.gz
export ps_tarball="https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-8.0.40-31/binary/tarball/Percona-Server-8.0.40-31-Linux.x86_64.glibc2.35-minimal.tar.gz"
fi

if [ -z "$query_source" ]
Expand Down Expand Up @@ -53,15 +53,23 @@ export db_version_sandbox=$(ls ~/ps${ps_version})
export db_sandbox=$(dbdeployer sandboxes | awk -F' ' '{print $1}')
export SERVICE_RANDOM_NUMBER=$((1 + $RANDOM % 9999))

# Initialize my_cnf_options
my_cnf_options=""

# Check if ps_version is 8.4 or greater to enable the plugin to change the password
if [[ "$ps_version" =~ ^8\.[4-9]([0-9])? || "$ps_version" =~ ^[9-9][0-9]\. ]]; then
my_cnf_options="mysql-native-password=ON"
fi

if [[ "$number_of_nodes" == 1 ]];then
if [[ ! -z $group_replication ]]; then
dbdeployer deploy --topology=group replication ${db_version_sandbox} --single-primary --sandbox-binary=~/ps${ps_version} --remote-access=% --bind-address=0.0.0.0 --force
dbdeployer deploy --topology=group replication ${db_version_sandbox} --single-primary --sandbox-binary=~/ps${ps_version} --remote-access=% --bind-address=0.0.0.0 --force ${my_cnf_options:+--my-cnf-options="$my_cnf_options"}
export db_sandbox=$(dbdeployer sandboxes | awk -F' ' '{print $1}')
node_port=`dbdeployer sandboxes --header | grep ${db_version_sandbox} | grep 'group-single-primary' | awk -F'[' '{print $2}' | awk -F' ' '{print $1}'`
mysql -h 127.0.0.1 -u msandbox -pmsandbox --port $node_port -e "ALTER USER 'msandbox'@'localhost' IDENTIFIED WITH mysql_native_password BY 'msandbox';"
mysql -h 127.0.0.1 -u msandbox -pmsandbox --port $node_port -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'GRgrO9301RuF';"
else
dbdeployer deploy single ${db_version_sandbox} --sandbox-binary=~/ps${ps_version} --port=${PS_PORT} --remote-access=% --bind-address=0.0.0.0 --force
dbdeployer deploy single ${db_version_sandbox} --sandbox-binary=~/ps${ps_version} --port=${PS_PORT} --remote-access=% --bind-address=0.0.0.0 --force ${my_cnf_options:+--my-cnf-options="$my_cnf_options"}
export db_sandbox=$(dbdeployer sandboxes | awk -F' ' '{print $1}')
node_port=`dbdeployer sandboxes --header | grep ${db_version_sandbox} | grep 'single' | awk -F'[' '{print $2}' | awk -F' ' '{print $1}'`
mysql -h 127.0.0.1 -u msandbox -pmsandbox --port $node_port -e "ALTER USER 'msandbox'@'localhost' IDENTIFIED WITH mysql_native_password BY 'msandbox';"
Expand Down Expand Up @@ -115,7 +123,7 @@ if [[ "$number_of_nodes" == 1 ]];then
pmm-admin add mysql --query-source=$query_source --username=msandbox --password=msandbox --environment=dev --cluster=dev-cluster --replication-set=repl1 ps-single-${SERVICE_RANDOM_NUMBER} 127.0.0.1:$node_port
fi
else
dbdeployer deploy multiple ${db_version_sandbox} --sandbox-binary=~/ps${ps_version} --nodes $number_of_nodes --force --remote-access=% --bind-address=0.0.0.0
dbdeployer deploy multiple ${db_version_sandbox} --sandbox-binary=~/ps${ps_version} --nodes $number_of_nodes --force --remote-access=% --bind-address=0.0.0.0 ${my_cnf_options:+--my-cnf-options="$my_cnf_options"}
export db_sandbox=$(dbdeployer sandboxes | awk -F' ' '{print $1}')
node_port=`dbdeployer sandboxes --header | grep ${db_version_sandbox} | grep 'multiple' | awk -F'[' '{print $2}' | awk -F' ' '{print $1}'`
for j in `seq 1 $number_of_nodes`; do
Expand Down
2 changes: 1 addition & 1 deletion pmm_qa/ms_pmm_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
- docker cp ./pmm3-client-setup.sh {{ ms_container }}:/

- name: Get Product tarball URL based on the version
shell: cat product_version_download_helper | grep -v pxc | grep mysql | grep "\-{{ ms_version }}" | head -1 | awk -F'# ' '{print $3}'
shell: awk -F'# ' '/-{{ ms_version | regex_escape }}/ && /ms/ {print $3; exit}' product_version_download_helper
register: tarball
when: lookup('env', 'MS_TARBALL') == ''

Expand Down
6 changes: 3 additions & 3 deletions pmm_qa/pmm-framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
"TARBALL": ""}
},
"MYSQL": {
"versions": ["8.0"],
"versions": ["8.4", "8.0"],
"configurations": {"QUERY_SOURCE": "perfschema", "SETUP_TYPE": "", "CLIENT_VERSION": "3-dev-latest",
"TARBALL": ""}
},
"PS": {
"versions": ["5.7", "8.0"],
"versions": ["5.7", "8.4", "8.0"],
"configurations": {"QUERY_SOURCE": "perfschema", "SETUP_TYPE": "", "CLIENT_VERSION": "3-dev-latest",
"TARBALL": ""}
},
"SSL_MYSQL": {
"versions": ["5.7", "8.0"],
"versions": ["5.7", "8.4", "8.0"],
"configurations": {"QUERY_SOURCE": "perfschema", "SETUP_TYPE": "", "CLIENT_VERSION": "3-dev-latest",
"TARBALL": ""}
},
Expand Down
10 changes: 7 additions & 3 deletions pmm_qa/product_version_download_helper
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ psmdb # 6.0.2 # https://downloads.percona.com/downloads/percona-distribution-mon

psmdb # 7.0.2 # https://downloads.percona.com/downloads/percona-server-mongodb-7.0/percona-server-mongodb-7.0.2-1/binary/tarball/percona-server-mongodb-7.0.2-1-x86_64.glibc2.17.tar.gz

ps # 8.0.33 # https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-8.0.33-25/binary/tarball/Percona-Server-8.0.33-25-Linux.x86_64.glibc2.17-minimal.tar.gz
ps # 8.4.3 # https://downloads.percona.com/downloads/Percona-Server-8.4/Percona-Server-8.4.3-3/binary/tarball/Percona-Server-8.4.3-3-Linux.x86_64.glibc2.35-minimal.tar.gz

ps # 5.7.43 # https://downloads.percona.com/downloads/Percona-Server-5.7/Percona-Server-5.7.43-47/binary/tarball/Percona-Server-5.7.43-47-Linux.x86_64.glibc2.17-minimal.tar.gz
ps # 8.0.40 # https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-8.0.40-31/binary/tarball/Percona-Server-8.0.40-31-Linux.x86_64.glibc2.35-minimal.tar.gz

ms # 8.0.33 # https://dev.mysql.com/get/Downloads/MySQL-8/mysql-8.0.33-linux-glibc2.28-x86_64.tar.gz
ps # 5.7.44 # https://downloads.percona.com/downloads/Percona-Server-5.7/Percona-Server-5.7.44-48/binary/tarball/Percona-Server-5.7.44-48-Linux.x86_64.glibc2.35-minimal.tar.gz

ms # 8.4 # https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.3-linux-glibc2.17-x86_64-minimal.tar.xz

ms # 8.0.40 # https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.40-linux-glibc2.17-x86_64-minimal.tar.xz

proxysql # 2.6.2 # https://downloads.percona.com/downloads/proxysql2/proxysql2-2.6.2/binary/debian/jammy/x86_64/proxysql2_2.6.2-1.1.jammy_amd64.deb

2 changes: 1 addition & 1 deletion pmm_qa/ps_pmm_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
- docker cp ./pmm3-client-setup.sh {{ ps_container }}:/

- name: Get Product tarball URL based on the version
shell: cat product_version_download_helper | grep -v pxc | grep ps | grep "\-{{ ps_version }}" | head -1 | awk -F'# ' '{print $3}'
shell: awk -F'# ' '/-{{ ps_version | regex_escape }}/ && !/pxc/ && /ps/ {print $3; exit}' product_version_download_helper
register: tarball
when: lookup('env', 'PS_TARBALL') == ''

Expand Down

0 comments on commit 9f409ee

Please sign in to comment.