![Luke Browning](/assets/img/avatar_default.png)
Ubuntu Trusty continues to get MySQL 5.6. The selection of the MySQL version is based on the version of Ubuntu that is installed. If the script trovestack is invoked on Xenial, the version that is chosen is 5.7. If it is invoked on Trusty, then version 5.6 is chosen. The only thing that is eliminated is the dubious combination of MySQL 5.6 on Ubuntu Xenial. This combination is probably not supported by Ubuntu as it is down level from their standard offering is probably not tested anywhere. Note Xenial does not provide the 5.6 version of mysql. This was accomplished by initializing the Apt repo with the Trusty software repository. The size of the root file system is increased from 3 to 4 GBs as the Mysql Xenial image does not fit in 3 GBs. This has an impact on the flavors that are used by Trove for testing as the name of the flavor includes the size of the root file system. This is turn caused a change to each of the db specific test config files as the trove falvors are referenced in them. Change-Id: I4f4e497208b8f4728580e48239a8ae208e0a96dd
66 lines
1.8 KiB
Bash
Executable File
66 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# CONTEXT: GUEST during CONSTRUCTION as ROOT
|
|
# PURPOSE: Install controller base required packages
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
apt-get --allow-unauthenticated -y install mysql-client mysql-server
|
|
|
|
# Xenial provides mysql 5.7 which requires percona-xtrabackup-24
|
|
|
|
PXB_VERSION_OVERRIDE=24
|
|
PKGS=$(apt-cache search percona-xtrabackup-${PXB_VERSION_OVERRIDE})
|
|
if [[ "$PKGS" == *"percona-xtrabackup-$PXB_VERSION_OVERRIDE"* ]]; then
|
|
apt-get --allow-unauthenticated -y install percona-xtrabackup-${PXB_VERSION_OVERRIDE}
|
|
else
|
|
# Architecture is not supported by percona website. Compile and install it
|
|
PXB_VERSION=${PXB_VERSION_OVERRIDE:0:1}.${PXB_VERSION_OVERRIDE:1:1}
|
|
|
|
apt-get --allow-unauthenticated -y install build-essential flex bison automake autoconf \
|
|
libtool cmake libaio-dev mysql-client libncurses-dev zlib1g-dev \
|
|
libgcrypt11-dev libev-dev libcurl4-gnutls-dev vim-common
|
|
|
|
pushd /tmp
|
|
|
|
git clone https://github.com/percona/percona-xtrabackup.git
|
|
cd percona-xtrabackup
|
|
git checkout $PXB_VERSION
|
|
|
|
mkdir /tmp/boost
|
|
cmake -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp/boost -DBUILD_CONFIG=xtrabackup_release -DWITH_MAN_PAGES=OFF && make -j4
|
|
make install
|
|
ln -s /usr/local/xtrabackup/bin/* /usr/bin/
|
|
|
|
dpkg -P build-essential automake autoconf libtool cmake
|
|
apt-get -y clean
|
|
|
|
popd
|
|
|
|
rm -rf /tmp/boost /tmp/percona-xtrabackup
|
|
fi
|
|
|
|
cat >/etc/mysql/conf.d/no_perf_schema.cnf <<_EOF_
|
|
[mysqld]
|
|
performance_schema = off
|
|
show_compatibility_56 = on
|
|
_EOF_
|
|
|
|
mv /etc/mysql/my.cnf.fallback /etc/mysql/my.cnf
|
|
chown mysql:mysql /etc/mysql/my.cnf
|
|
cat >/etc/mysql/my.cnf <<_EOF_
|
|
[mysql]
|
|
|
|
!includedir /etc/mysql/conf.d/
|
|
_EOF_
|
|
|
|
if [ -e /etc/init/mysql.conf ]; then
|
|
rm -f /etc/init/mysql.conf
|
|
fi
|
|
|
|
systemctl enable mysql
|
|
|