mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-23 00:44:33 +00:00
52 lines
1.3 KiB
Bash
Executable File
52 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
source ../build/utils.sh
|
|
|
|
set -xeuo pipefail
|
|
|
|
VERSION="$1"
|
|
RESULT="$2"
|
|
ARCH="$3"
|
|
LINK="$4"
|
|
UPGRADE_TOKEN="$5"
|
|
|
|
yum install -y wget which procps-ng diffutils
|
|
wget https://dlm.mariadb.com/enterprise-release-helpers/mariadb_es_repo_setup -O mariadb_es_repo_setup
|
|
chmod +x mariadb_es_repo_setup
|
|
bash -c "./mariadb_es_repo_setup --token=${UPGRADE_TOKEN} --apply --mariadb-server-version=${VERSION} --skip-maxscale --skip-tools --skip-check-installed"
|
|
yum -y install MariaDB-server MariaDB-client MariaDB-columnstore-engine MariaDB-columnstore-engine-debuginfo
|
|
|
|
systemctl start mariadb
|
|
systemctl start mariadb-columnstore
|
|
|
|
INITIAL_VERSION=$(mariadb -e "select @@version;")
|
|
|
|
bash -c "./upgrade_data.sh"
|
|
bash -c "./upgrade_verify.sh"
|
|
|
|
cd /etc/yum.repos.d/
|
|
touch repo.repo
|
|
cat <<EOF > repo.repo
|
|
[repo]
|
|
name = repo
|
|
baseurl = ${LINK}${RESULT}/
|
|
enabled = 1
|
|
gpgcheck = 0
|
|
module_hotfixes=1
|
|
EOF
|
|
|
|
cd /
|
|
|
|
yum -y update MariaDB-server MariaDB-client MariaDB-columnstore-engine MariaDB-columnstore-engine-debuginfo
|
|
UPGRADED_VERSION=$(mariadb -e "select @@version;")
|
|
|
|
if [[ "$INITIAL_VERSION" == "$UPGRADED_VERSION" ]]; then
|
|
error "The upgrade didn't happen!"
|
|
exit 1
|
|
else
|
|
message_splitted "The upgrade from "$INITIAL_VERSION" to "$UPGRADED_VERSION" succeded!"
|
|
bash -c "./upgrade_verify.sh"
|
|
fi
|
|
|
|
|