Skip to content

JE-67504 #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
896607b
change base URL
dimkadt May 19, 2023
f60e26a
JE-66507 [Review JPS packages and addons for AlmaLinux9] MySQL cluster
dimkadt May 19, 2023
4244961
change base URL
dimkadt May 19, 2023
d234693
baseUrl
sych74 Jun 14, 2023
6b2811a
baseUrl
sych74 Jun 14, 2023
87aa5c8
baseUrl
sych74 Jun 14, 2023
8078d90
baseUrl
sych74 Jun 14, 2023
7fa2fb5
Update master-master.jps
sych74 Jun 14, 2023
d1c51fa
baseUrl
sych74 Jun 14, 2023
9192c90
baseUrl
sych74 Jun 14, 2023
a1e0832
baseUrl
sych74 Jun 20, 2023
6fdac58
baseUrl
sych74 Jun 20, 2023
0d2968c
JE-66507 [Review JPS packages and addons for AlmaLinux9] MySQL cluster
dimkadt Aug 15, 2023
21dc49a
Merge branch 'stage-cluster' into v3.0.0
sych74 Aug 21, 2023
176b1b2
Merge pull request #335 from dimkadt/v3.0.0
sych74 Aug 21, 2023
2cf0a64
Merge pull request #22 from jelastic-jps/stage-cluster
sych74 Aug 21, 2023
e615147
Merge pull request #336 from sych74/v3.0.0
sych74 Aug 21, 2023
75f80f8
JE-67504
sych74 Sep 7, 2023
7ba4413
baseUrl
sych74 Sep 7, 2023
4403b5d
baseUrl
sych74 Sep 7, 2023
8b04572
Update manifest.yml
sych74 Sep 7, 2023
6832107
baseUrl
sych74 Sep 7, 2023
ee6d9c4
baseUrl
sych74 Sep 7, 2023
7812b3a
baseUrl
sych74 Sep 7, 2023
339cd9d
baseUrl
sych74 Sep 7, 2023
c5b5b81
JE-67504
sych74 Sep 7, 2023
529e45c
Merge pull request #338 from sych74/stage-cluster
sych74 Sep 7, 2023
5b24fb4
baseUrl
sych74 Sep 26, 2023
a16fe75
baseUrl
sych74 Sep 26, 2023
e8bc671
baseUrl
sych74 Sep 26, 2023
8fd80ef
baseUrl
sych74 Sep 26, 2023
c0fbe30
baseUrl
sych74 Sep 26, 2023
68c62ad
baseUrl
sych74 Sep 26, 2023
45688a3
baseUrl
sych74 Sep 26, 2023
6d49074
baseUrl
sych74 Sep 26, 2023
bafb42e
baseUrl
sych74 Sep 26, 2023
16ae166
baseUrl
sych74 Sep 26, 2023
f3affca
baseurl
sych74 Sep 26, 2023
37cea3b
baseUrl
sych74 Sep 26, 2023
ca29601
baseUrl
sych74 Sep 26, 2023
ad61c90
baseUrl
sych74 Sep 26, 2023
d17d147
baseUrl
sych74 Sep 26, 2023
912230c
Merge branch 'v3.0.0' into stage-cluster
sych74 Sep 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/auto-clustering/scripts/auto-cluster-logic.jps
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ onInstall:
REPLICA_PSWD: ${fn.password(20)}
SCHEME: ${settings.scheme}

- install:
- install:
jps: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/master/addons/recovery/manifest.yml?_r=${fn.random}
nodeGroup: sqldb
targetNodes: sqldb
Expand Down
2 changes: 1 addition & 1 deletion addons/mariadb-cluster.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"jps": "https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/v2.4.1/addons/auto-clustering/auto-cluster.jps",
"jps": "https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/v3.0.0/addons/auto-clustering/auto-cluster.jps",
"defaultState": false,
"skipOnEnvInstall": true,
"nodeGroupData": {
Expand Down
2 changes: 1 addition & 1 deletion addons/mariadb104-cluster.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"jps": "https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/v2.3.0/addons/auto-clustering/auto-cluster.jps",
"jps": "https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/v3.0.0/addons/auto-clustering/auto-cluster.jps",
"defaultState": false,
"skipOnEnvInstall": true,
"nodeGroupData": {
Expand Down
2 changes: 1 addition & 1 deletion addons/mysql-cluster.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"jps": "https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/v2.4.1/addons/auto-clustering/auto-cluster.jps",
"jps": "https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/v3.0.0/addons/auto-clustering/auto-cluster.jps",
"defaultState": false,
"skipOnEnvInstall": true,
"nodeGroupData": {
Expand Down
2 changes: 1 addition & 1 deletion addons/recovery/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description:
text: The Database Cluster Recovery add-on performs a comprehensive diagnostic of your MySQL/MariaDB Cluster (Galera, Primary-Primary, Primary-Secondary) to detect any disruptions of the provisioned service. In case of errors, the automatic Cluster Recovery functionality can restore the cluster operability after most of the problems.
short: The add-on performs a comprehensive diagnostic of your database cluster and can perform automatic recovery.

baseUrl: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/v2.5.0/addons/recovery
baseUrl: https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/v3.0.0/addons/recovery

targetNodes:
nodeGroup: sqldb
Expand Down
2 changes: 1 addition & 1 deletion scripts/master-master.jps
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ actions:

setupSecondaryReplication:
- cmd[${this}]: |-
curl --silent https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/stage-addon/addons/recovery/scripts/db-recovery.sh > /tmp/db-recovery.sh;
curl --silent https://raw.githubusercontent.com/jelastic-jps/mysql-cluster/master/addons/recovery/scripts/db-recovery.sh > /tmp/db-recovery.sh;
bash /tmp/db-recovery.sh --scenario restore_secondary_from_primary --donor-ip ${globals.primary1_ip} --additional-primary ${globals.primary2_ip};
user: root
8 changes: 7 additions & 1 deletion scripts/proxy-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
Expand Down
12 changes: 10 additions & 2 deletions scripts/setupUser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ cmd="CREATE USER '$USER'@'localhost' IDENTIFIED BY '$PASSWORD'; CREATE USER '$US
unset resp;
resp=$(mysql -u$USER -p$PASSWORD mysql --execute="SHOW COLUMNS FROM user")
[ -z "$resp" ] && {
encPass=$(echo $ADMIN_PASSWORD | openssl enc -e -a -A -aes-128-cbc -nosalt -pass "pass:TFVhBKDOSBspeSXesw8fElCcOzbJzYed")
$JEM passwd set -p static:$encPass
openssl_version="$(openssl version | sed -r 's/^OpenSSL[[:blank:]]+([0-9]+)[.][^[:space:]]+[[:blank:]]+.*/\1/')"
if (( $openssl_version >= 3 )); then
openssl_parameters='-aes-256-cbc -pbkdf2 -md sha512 -iter 10000 -salt -S 429488b2f3870b4a -iv dcb9fe5ecb4011cd20114119930aadc3'
STATIC="static:"
else
openssl_parameters='-aes-128-cbc -nosalt -A -nosalt'
STATIC="static"
fi
encPass=$(echo $ADMIN_PASSWORD | openssl enc -e -a $openssl_parameters -pass "pass:TFVhBKDOSBspeSXesw8fElCcOzbJzYed")
$JEM passwd set -p $STATIC:$encPass
$MYSQL -uroot -p${ADMIN_PASSWORD} --execute="$cmd"
} || {
echo "[Info] User $user has the required access to the database."
Expand Down