From 75f80f8978671edc011e51fceb6c0aa21cf8a0be Mon Sep 17 00:00:00 2001 From: sych74 Date: Thu, 7 Sep 2023 14:04:57 +0200 Subject: [PATCH 1/9] JE-67504 --- scripts/proxy-common.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/proxy-common.yml b/scripts/proxy-common.yml index 7d6972bf..d8275244 100644 --- a/scripts/proxy-common.yml +++ b/scripts/proxy-common.yml @@ -4,7 +4,13 @@ actions: - cmd [proxy]: |- mysql -h 127.0.0.1 -P3360 -uroot -e "DROP DATABASE IF EXISTS orchestrator;" mysql -h 127.0.0.1 -P3360 -uroot -e "CREATE DATABASE IF NOT EXISTS orchestrator;" - mysql -h 127.0.0.1 -P3360 -uroot -e "GRANT ALL PRIVILEGES ON orchestrator.* TO 'admin'@'127.0.0.1' IDENTIFIED BY '${globals.ORCH_PASS}';" + major_version=$(rpm -qi mysql-community-server | grep Version | awk '{print $3}' | awk -F'.' '{print $1}'); + if [ $major_version -ge 8 ]; then + mysql -h 127.0.0.1 -P3360 -uroot -e "ALTER USER 'admin'@'127.0.0.1' IDENTIFIED BY '${globals.ORCH_PASS}';" + else + mysql -h 127.0.0.1 -P3360 -uroot -e "SET PASSWORD FOR 'admin'@'127.0.0.1' = PASSWORD('${globals.ORCH_PASS}');" + fi + FLUSH PRIVILEGES; wget ${baseUrl}/configs/orchestrator.conf.json -O /etc/orchestrator.conf.json &>> /var/log/run.log sed -i -e 's|orc_client_user|${globals.DB_USER}|g' /etc/orchestrator.conf.json sed -i -e 's|orc_client_password|${globals.DB_PASS}|g' /etc/orchestrator.conf.json From 7ba44137e93a08ce056a5acbd0b5e42fb74aadef Mon Sep 17 00:00:00 2001 From: sych74 Date: Thu, 7 Sep 2023 14:10:55 +0200 Subject: [PATCH 2/9] baseUrl --- scripts/proxy-master-slave.jps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/proxy-master-slave.jps b/scripts/proxy-master-slave.jps index e841e002..0a5f058f 100644 --- a/scripts/proxy-master-slave.jps +++ b/scripts/proxy-master-slave.jps @@ -3,7 +3,7 @@ id: mysql-proxy-master-slave-cluster name: MySQL/MariaDB/Percona Database Cluster with ProxySQL description: ProxySQL Load Balancer Entry Point -baseUrl: https://raw.githubusercontent.com/dimkadt/mysql-cluster/v3.0.0 +baseUrl: https://raw.githubusercontent.com/sych74/mysql-cluster/stage-cluster success: /texts/proxy-entrypoint.md From 4403b5d34543a9cfe6e74de087b3cabf1f836752 Mon Sep 17 00:00:00 2001 From: sych74 Date: Thu, 7 Sep 2023 14:12:29 +0200 Subject: [PATCH 3/9] baseUrl --- addons/auto-clustering/auto-cluster.jps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/auto-clustering/auto-cluster.jps b/addons/auto-clustering/auto-cluster.jps index bc842dd4..ff08170a 100644 --- a/addons/auto-clustering/auto-cluster.jps +++ b/addons/auto-clustering/auto-cluster.jps @@ -9,7 +9,7 @@ description: healthcheck and autodiscovery of newly added DB nodes short: Scalable MySQL cluster with ProxySQL for even load distribution -baseUrl: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/stage-cluster +baseUrl: https://raw.githubusercontent.com/sych74/mysql-cluster/stage-cluster logo: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/master/images/mysql-logo.png From 8b0457299f1b9b123be0cfaf6821b09b8fda3396 Mon Sep 17 00:00:00 2001 From: sych74 Date: Thu, 7 Sep 2023 14:13:24 +0200 Subject: [PATCH 4/9] Update manifest.yml --- manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.yml b/manifest.yml index b5f7e8ee..d046c827 100644 --- a/manifest.yml +++ b/manifest.yml @@ -16,7 +16,7 @@ logo: /images/mysql-mariadb-percona-logo.png?_r=1 onBeforeInit: /scripts/settings.js?_r=${fn.random} -baseUrl: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/stage-cluster +baseUrl: https://raw.githubusercontent.com/sych74/mysql-cluster/stage-cluster settings: fields: From 68321073401bbf6926b11f1646d78c1452c53837 Mon Sep 17 00:00:00 2001 From: sych74 Date: Thu, 7 Sep 2023 14:27:33 +0200 Subject: [PATCH 5/9] baseUrl --- manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.yml b/manifest.yml index d046c827..b5f7e8ee 100644 --- a/manifest.yml +++ b/manifest.yml @@ -16,7 +16,7 @@ logo: /images/mysql-mariadb-percona-logo.png?_r=1 onBeforeInit: /scripts/settings.js?_r=${fn.random} -baseUrl: https://raw.githubusercontent.com/sych74/mysql-cluster/stage-cluster +baseUrl: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/stage-cluster settings: fields: From ee6d9c480354d6f98f785d9fd87e64dc5ebd00ae Mon Sep 17 00:00:00 2001 From: sych74 Date: Thu, 7 Sep 2023 14:28:14 +0200 Subject: [PATCH 6/9] baseUrl --- addons/auto-clustering/auto-cluster.jps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/auto-clustering/auto-cluster.jps b/addons/auto-clustering/auto-cluster.jps index ff08170a..bc842dd4 100644 --- a/addons/auto-clustering/auto-cluster.jps +++ b/addons/auto-clustering/auto-cluster.jps @@ -9,7 +9,7 @@ description: healthcheck and autodiscovery of newly added DB nodes short: Scalable MySQL cluster with ProxySQL for even load distribution -baseUrl: https://raw.githubusercontent.com/sych74/mysql-cluster/stage-cluster +baseUrl: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/stage-cluster logo: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/master/images/mysql-logo.png From 7812b3ac7f65245ff2ba588392ce26b7529ff2be Mon Sep 17 00:00:00 2001 From: sych74 Date: Thu, 7 Sep 2023 14:29:03 +0200 Subject: [PATCH 7/9] baseUrl --- scripts/proxy-master-slave.jps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/proxy-master-slave.jps b/scripts/proxy-master-slave.jps index 0a5f058f..d89b97de 100644 --- a/scripts/proxy-master-slave.jps +++ b/scripts/proxy-master-slave.jps @@ -3,7 +3,7 @@ id: mysql-proxy-master-slave-cluster name: MySQL/MariaDB/Percona Database Cluster with ProxySQL description: ProxySQL Load Balancer Entry Point -baseUrl: https://raw.githubusercontent.com/sych74/mysql-cluster/stage-cluster +baseUrl: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/stage-cluster success: /texts/proxy-entrypoint.md From 339cd9d972445d217c3ef1a5896f6b4d568f9cb3 Mon Sep 17 00:00:00 2001 From: sych74 Date: Thu, 7 Sep 2023 14:29:54 +0200 Subject: [PATCH 8/9] baseUrl --- scripts/proxy-galera.jps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/proxy-galera.jps b/scripts/proxy-galera.jps index b633bc4c..e5fdcba2 100644 --- a/scripts/proxy-galera.jps +++ b/scripts/proxy-galera.jps @@ -3,7 +3,7 @@ id: mysql-proxy-galera-cluster name: Galera/XtraDB Cluster with ProxySQL description: Galera/XtraDB Cluster -baseUrl: https://raw.githubusercontent.com/dimkadt/mysql-cluster/v3.0.0 +baseUrl: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/stage-cluster success: /texts/proxy-entrypoint.md From c5b5b81f2981fcc3af5f185f5c714e3166d3343c Mon Sep 17 00:00:00 2001 From: sych74 Date: Thu, 7 Sep 2023 14:51:46 +0200 Subject: [PATCH 9/9] JE-67504 --- scripts/proxy-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/proxy-common.yml b/scripts/proxy-common.yml index d8275244..abe1d32b 100644 --- a/scripts/proxy-common.yml +++ b/scripts/proxy-common.yml @@ -10,7 +10,7 @@ actions: else mysql -h 127.0.0.1 -P3360 -uroot -e "SET PASSWORD FOR 'admin'@'127.0.0.1' = PASSWORD('${globals.ORCH_PASS}');" fi - FLUSH PRIVILEGES; + mysql -h 127.0.0.1 -P3360 -uroot -e "FLUSH PRIVILEGES;" wget ${baseUrl}/configs/orchestrator.conf.json -O /etc/orchestrator.conf.json &>> /var/log/run.log sed -i -e 's|orc_client_user|${globals.DB_USER}|g' /etc/orchestrator.conf.json sed -i -e 's|orc_client_password|${globals.DB_PASS}|g' /etc/orchestrator.conf.json