Add mysql-8.0 tests and remove mysql-5.7 support
1. This commit removes the Mysql-5.7 support and replaces it with Mysql 8.0 2. build guest image base on ubuntu noble by default Change-Id: I9cd1a99a46c4fbf30672f0bb5b6ca158674683ec
This commit is contained in:
@@ -3,7 +3,7 @@ FROM quay.io/openstack.trove/ubuntu:$BASE_OS_VERSION
|
||||
LABEL maintainer="Trove Project (https://storyboard.openstack.org/#!/project/openstack/trove)"
|
||||
|
||||
ARG DATASTORE="mysql"
|
||||
ARG DATASTORE_VERSION="5.7"
|
||||
ARG DATASTORE_VERSION="8.0"
|
||||
ARG APTOPTS="-y -qq --no-install-recommends --allow-unauthenticated"
|
||||
|
||||
RUN export DEBIAN_FRONTEND="noninteractive" \
|
||||
|
@@ -27,12 +27,7 @@ OPT_DATASTORE=""
|
||||
OPT_DATASTORE_VERSION=""
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
# TODO(hiwkby) We should avoid hardcoding of datastore versions but
|
||||
# for compatibility, we must accept the hardcoded version string.
|
||||
if [ "$1" = "mysql5.7" ]; then
|
||||
OPT_DATASTORE="mysql"
|
||||
OPT_DATASTORE_VERSION="5.7"
|
||||
elif [ "$1" = "mysql8.0" ]; then
|
||||
if [ "$1" = "mysql" ]; then
|
||||
OPT_DATASTORE="mysql"
|
||||
OPT_DATASTORE_VERSION="8.0"
|
||||
elif [ "$1" = "mariadb" ]; then
|
||||
@@ -70,24 +65,12 @@ else
|
||||
fi
|
||||
|
||||
if [ "${OPT_DATASTORE}" = "mysql" ]; then
|
||||
if [ "${OPT_DATASTORE_VERSION}" = "5.7" ]; then
|
||||
curl -sSL https://repo.percona.com/apt/percona-release_latest.${OS_RELEASE_CODENAME}_all.deb -o percona-release.deb
|
||||
dpkg -i percona-release.deb
|
||||
percona-release enable-only tools release
|
||||
apt-get update
|
||||
apt-get install ${APTOPTS} percona-xtrabackup-24
|
||||
rm -f percona-release.deb
|
||||
elif [ "${OPT_DATASTORE_VERSION}" = "8.0" ]; then
|
||||
curl -sSL https://repo.percona.com/apt/percona-release_latest.${OS_RELEASE_CODENAME}_all.deb -o percona-release.deb
|
||||
dpkg -i percona-release.deb
|
||||
percona-release enable-only tools release
|
||||
apt-get update
|
||||
apt-get install ${APTOPTS} percona-xtrabackup-80
|
||||
rm -f percona-release.deb
|
||||
else
|
||||
echo "datastore ${OPT_DATASTORE} with ${OPT_DATASTORE_VERSION} not supported"
|
||||
exit 1
|
||||
fi
|
||||
curl -sSL https://repo.percona.com/apt/percona-release_latest.${OS_RELEASE_CODENAME}_all.deb -o percona-release.deb
|
||||
dpkg -i percona-release.deb
|
||||
percona-release enable-only tools release
|
||||
apt-get update
|
||||
apt-get install ${APTOPTS} percona-xtrabackup-80
|
||||
rm -f percona-release.deb
|
||||
elif [ "${OPT_DATASTORE}" = "mariadb" ]; then
|
||||
# See the url below about the supported version.
|
||||
# https://mariadb.com/docs/xpand/ref/repo/cli/mariadb_repo_setup/mariadb-server-version/
|
||||
|
@@ -527,19 +527,18 @@ function create_registry_container {
|
||||
container=$(sudo docker ps -a --format "{{.Names}}" --filter name=registry)
|
||||
if [ -z $container ]; then
|
||||
sudo docker run -d --net=host -e REGISTRY_HTTP_ADDR=0.0.0.0:4000 --restart=always -v /opt/trove_registry/:/var/lib/registry --name registry quay.io/openstack.trove/registry:2
|
||||
for img in {"mysql:5.7","mysql:8.0","mariadb:10.4","postgres:12"};
|
||||
for img in {"mysql:8.0","mariadb:10.4","postgres:12"};
|
||||
do
|
||||
sudo docker pull quay.io/openstack.trove/${img} && sudo docker tag quay.io/openstack.trove/${img} 127.0.0.1:4000/trove-datastores/${img} && sudo docker push 127.0.0.1:4000/trove-datastores/${img}
|
||||
done
|
||||
pushd $DEST/trove/backup
|
||||
# build backup images
|
||||
sudo docker build --network host -t 127.0.0.1:4000/trove-datastores/db-backup-mysql:5.7 --build-arg DATASTORE=mysql --build-arg DATASTORE_VERSION=5.7 .
|
||||
sudo docker build --network host -t 127.0.0.1:4000/trove-datastores/db-backup-mysql:8.0 --build-arg DATASTORE=mysql --build-arg DATASTORE_VERSION=8.0 .
|
||||
sudo docker build --network host -t 127.0.0.1:4000/trove-datastores/db-backup-mariadb:10.4 --build-arg DATASTORE=mariadb --build-arg DATASTORE_VERSION=10.4 .
|
||||
sudo docker build --network host -t 127.0.0.1:4000/trove-datastores/db-backup-postgresql:12 --build-arg DATASTORE=postgresql --build-arg DATASTORE_VERSION=12 .
|
||||
sudo docker build --network host -t 127.0.0.1:4000/trove-datastores/db-backup-mariadb:10.4 --build-arg DATASTORE=mariadb --build-arg BASE_OS_VERSION=20.04 --build-arg DATASTORE_VERSION=10.4 .
|
||||
sudo docker build --network host -t 127.0.0.1:4000/trove-datastores/db-backup-postgresql:12 --build-arg DATASTORE=postgresql --build-arg BASE_OS_VERSION=20.04 --build-arg DATASTORE_VERSION=12 .
|
||||
popd
|
||||
# push backup images
|
||||
for backupimg in {"db-backup-mysql:5.7","db-backup-mysql:8.0","db-backup-mariadb:10.4","db-backup-postgresql:12"};
|
||||
for backupimg in {"db-backup-mysql:8.0","db-backup-mariadb:10.4","db-backup-postgresql:12"};
|
||||
do
|
||||
sudo docker push 127.0.0.1:4000/trove-datastores/${backupimg}
|
||||
done
|
||||
|
@@ -27,9 +27,9 @@ TROVE_LOCAL_API_PASTE_INI=${TROVE_LOCAL_API_PASTE_INI:-${TROVE_LOCAL_CONF_DIR}/a
|
||||
TROVE_LOCAL_POLICY_JSON=${TROVE_LOCAL_POLICY_JSON:-${TROVE_LOCAL_CONF_DIR}/policy.yaml}
|
||||
|
||||
TROVE_IMAGE_OS=${TROVE_IMAGE_OS:-"ubuntu"}
|
||||
TROVE_IMAGE_OS_RELEASE=${TROVE_IMAGE_OS_RELEASE:-"jammy"}
|
||||
TROVE_IMAGE_OS_RELEASE=${TROVE_IMAGE_OS_RELEASE:-"noble"}
|
||||
TROVE_DATASTORE_TYPE=${TROVE_DATASTORE_TYPE:-"mysql"}
|
||||
TROVE_DATASTORE_VERSION=${TROVE_DATASTORE_VERSION:-"5.7"}
|
||||
TROVE_DATASTORE_VERSION=${TROVE_DATASTORE_VERSION:-"8.0"}
|
||||
|
||||
# Configuration values listed here for reference
|
||||
TROVE_MAX_ACCEPTED_VOLUME_SIZE=${TROVE_MAX_ACCEPTED_VOLUME_SIZE}
|
||||
|
@@ -31,6 +31,10 @@ if [[ ${SYNC_LOG_TO_CONTROLLER} == "True" ]]; then
|
||||
cp ${SCRIPTDIR}/guest-log-collection.timer /etc/systemd/system/guest-log-collection.timer
|
||||
fi
|
||||
|
||||
# Install trove-image-loader script and service
|
||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/50-trove-image-loader /usr/local/sbin/trove-image-loader
|
||||
install -D -g root -o root -m 0644 ${SCRIPTDIR}/trove-image-loader.service /etc/systemd/system/trove-image-loader.service
|
||||
|
||||
# Install docker network plugin
|
||||
ln -s ${GUEST_VENV}/bin/trove-docker-plugin /usr/local/bin/trove-docker-plugin || true
|
||||
install -D -g root -o root -m 0644 ${SCRIPTDIR}/docker-hostnic.socket /lib/systemd/system/docker-hostnic.socket
|
||||
|
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
datastore_manager=$(crudini --get /etc/trove/conf.d/guest_info.conf DEFAULT datastore_manager)
|
||||
datastore_version=$(crudini --get /etc/trove/conf.d/guest_info.conf DEFAULT datastore_version)
|
||||
datastore_image=$(crudini --get /etc/trove/conf.d/trove-guestagent.conf "$datastore_manager" docker_image)
|
||||
backup_image=$(crudini --get /etc/trove/conf.d/trove-guestagent.conf "$datastore_manager" backup_docker_image)
|
||||
|
||||
echo "datastore_image=$datastore_image"
|
||||
echo "backup_image=$backup_image"
|
||||
|
||||
if [ -n "$datastore_image" ]; then
|
||||
docker pull "${datastore_image}:${datastore_version}"
|
||||
fi
|
||||
|
||||
if [ -n "$backup_image" ]; then
|
||||
docker pull "${backup_image}:${datastore_version}"
|
||||
fi
|
@@ -10,4 +10,4 @@ EnvironmentFile=/etc/trove/controller.conf
|
||||
|
||||
EnvironmentFile=/etc/trove/conf.d/guest_info.conf
|
||||
|
||||
ExecStart=/bin/bash -c "sudo rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /home/GUEST_USERNAME/.ssh/id_rsa' -az --exclude='.*' /var/log /var/lib/docker/containers HOST_SCP_USERNAME@$CONTROLLER:/var/log/guest-agent-logs/$guest_id"
|
||||
ExecStart=/bin/bash -c "sudo rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /home/GUEST_USERNAME/.ssh/id_rsa' -az --exclude='.*' --exclude='README' /var/log /var/lib/docker/containers HOST_SCP_USERNAME@$CONTROLLER:/var/log/guest-agent-logs/$guest_id"
|
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=OpenStack Trove image loader Service
|
||||
After=docker.service
|
||||
Requires=docker.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=root
|
||||
Group=root
|
||||
ExecStart=/usr/local/sbin/trove-image-loader
|
@@ -9,6 +9,7 @@ build-essential:
|
||||
cloud-guest-utils:
|
||||
cloud-init:
|
||||
cron:
|
||||
crudini:
|
||||
dbus:
|
||||
dkms:
|
||||
dmeventd:
|
||||
|
@@ -357,7 +357,7 @@ class SetPassword(object):
|
||||
self.host = host or '%'
|
||||
self.new_password = new_password or ''
|
||||
self.ds = ds or 'mysql'
|
||||
self.ds_version = ds_version or '5.7'
|
||||
self.ds_version = ds_version or '8.0'
|
||||
|
||||
def __repr__(self):
|
||||
return str(self)
|
||||
|
@@ -47,7 +47,7 @@
|
||||
devstack_localrc:
|
||||
TEMPEST_PLUGINS: /opt/stack/trove-tempest-plugin
|
||||
SYNC_LOG_TO_CONTROLLER: True
|
||||
TROVE_DATASTORE_VERSION: 5.7
|
||||
TROVE_DATASTORE_VERSION: 8.0
|
||||
TROVE_AGENT_CALL_HIGH_TIMEOUT: 1800
|
||||
SWIFT_LOOPBACK_DISK_SIZE: 15G
|
||||
TROVE_MGMT_GATEWAY: "192.168.254.1"
|
||||
@@ -56,7 +56,7 @@
|
||||
$TROVE_CONF:
|
||||
DEFAULT:
|
||||
swift_api_insecure: True
|
||||
usage_timeout: 1800
|
||||
usage_timeout: 2400
|
||||
network:
|
||||
network_isolation: True
|
||||
test-config:
|
||||
@@ -65,7 +65,7 @@
|
||||
tempest_roles: ResellerAdmin
|
||||
database:
|
||||
database_build_timeout: 2400
|
||||
default_datastore_versions: mysql:5.7
|
||||
default_datastore_versions: mysql:8.0
|
||||
devstack_plugins:
|
||||
trove: https://opendev.org/openstack/trove.git
|
||||
devstack_services:
|
||||
@@ -114,7 +114,7 @@
|
||||
devstack_localrc:
|
||||
TEMPEST_PLUGINS: /opt/stack/trove-tempest-plugin
|
||||
SYNC_LOG_TO_CONTROLLER: True
|
||||
TROVE_DATASTORE_VERSION: 5.7
|
||||
TROVE_DATASTORE_VERSION: 8.0
|
||||
TROVE_AGENT_CALL_HIGH_TIMEOUT: 1800
|
||||
TROVE_MGMT_GATEWAY: "192.168.254.1"
|
||||
devstack_local_conf:
|
||||
@@ -122,7 +122,7 @@
|
||||
$TROVE_CONF:
|
||||
DEFAULT:
|
||||
swift_api_insecure: True
|
||||
usage_timeout: 1800
|
||||
usage_timeout: 2400
|
||||
storage_strategy: cinder
|
||||
$TROVE_GUESTAGENT_CONF:
|
||||
DEFAULT:
|
||||
@@ -131,7 +131,7 @@
|
||||
$TEMPEST_CONFIG:
|
||||
database:
|
||||
database_build_timeout: 2400
|
||||
default_datastore_versions: mysql:5.7
|
||||
default_datastore_versions: mysql:8.0
|
||||
devstack_plugins:
|
||||
trove: https://opendev.org/openstack/trove.git
|
||||
devstack_services:
|
||||
@@ -218,7 +218,7 @@
|
||||
tempest_test_regex: ^trove_tempest_plugin\.tests\.scenario\.test_replication
|
||||
|
||||
- job:
|
||||
name: trove-tempest-ubuntu-base-mysql5.7
|
||||
name: trove-tempest-ubuntu-base-mysql8.0
|
||||
parent: trove-tempest-ubuntu-base
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
@@ -237,24 +237,16 @@
|
||||
- ^trove/guestagent/datastore/(postgres|mariadb)/.*$
|
||||
vars:
|
||||
devstack_localrc:
|
||||
TROVE_DATASTORE_VERSION: 5.7
|
||||
TROVE_DATASTORE_VERSION: 8.0
|
||||
TROVE_STATE_CHANGE_WAIT_TIME: 900
|
||||
devstack_local_conf:
|
||||
test-config:
|
||||
$TEMPEST_CONFIG:
|
||||
database:
|
||||
default_datastore_versions: mysql:5.7
|
||||
|
||||
# TODO(gmann): As per the 2025.1 testing runtime, we need to run at least
|
||||
# one job on jammy. This job can be removed as per the future testing
|
||||
# runtime (whenever we start testing Ubuntu 26.04 as default version).
|
||||
- job:
|
||||
name: trove-tempest-ubuntu-base-mysql5.7-jammy
|
||||
description: This is integrated job testing on Ubuntu jammy(22.04)
|
||||
parent: trove-tempest-ubuntu-base-mysql5.7
|
||||
nodeset: trove-ubuntu-jammy
|
||||
default_datastore_versions: mysql:8.0
|
||||
|
||||
- job:
|
||||
name: trove-tempest-ubuntu-backup-mysql5.7
|
||||
name: trove-tempest-ubuntu-backup-mysql8.0
|
||||
parent: trove-tempest-ubuntu-backup
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
@@ -272,16 +264,17 @@
|
||||
- ^trove/guestagent/datastore/(postgres|mariadb)/.*$
|
||||
vars:
|
||||
devstack_localrc:
|
||||
TROVE_DATASTORE_VERSION: 5.7
|
||||
TROVE_DATASTORE_VERSION: 8.0
|
||||
TROVE_STATE_CHANGE_WAIT_TIME: 900
|
||||
devstack_local_conf:
|
||||
test-config:
|
||||
$TEMPEST_CONFIG:
|
||||
database:
|
||||
backup_wait_timeout: 1200
|
||||
default_datastore_versions: mysql:5.7
|
||||
default_datastore_versions: mysql:8.0
|
||||
|
||||
- job:
|
||||
name: trove-tempest-ubuntu-replication-mysql5.7
|
||||
name: trove-tempest-ubuntu-replication-mysql8.0
|
||||
parent: trove-tempest-ubuntu-replication
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
@@ -300,16 +293,17 @@
|
||||
- ^trove/guestagent/strategies/replication/(postgresql.*|mariadb.*)\.py$
|
||||
vars:
|
||||
devstack_localrc:
|
||||
TROVE_DATASTORE_VERSION: 5.7
|
||||
TROVE_DATASTORE_VERSION: 8.0
|
||||
TROVE_STATE_CHANGE_WAIT_TIME: 900
|
||||
devstack_local_conf:
|
||||
test-config:
|
||||
$TEMPEST_CONFIG:
|
||||
database:
|
||||
backup_wait_timeout: 1200
|
||||
default_datastore_versions: mysql:5.7
|
||||
default_datastore_versions: mysql:8.0
|
||||
|
||||
- job:
|
||||
name: trove-tempest-cinder-storage-driver-mysql5.7
|
||||
name: trove-tempest-cinder-storage-driver-mysql8.0
|
||||
parent: trove-tempest-snapshot
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
@@ -328,13 +322,13 @@
|
||||
- ^trove/guestagent/strategies/replication/(postgresql.*|mariadb.*)\.py$
|
||||
vars:
|
||||
devstack_localrc:
|
||||
TROVE_DATASTORE_VERSION: 5.7
|
||||
TROVE_DATASTORE_VERSION: 8.0
|
||||
devstack_local_conf:
|
||||
test-config:
|
||||
$TEMPEST_CONFIG:
|
||||
database:
|
||||
backup_wait_timeout: 1200
|
||||
default_datastore_versions: mysql:5.7
|
||||
default_datastore_versions: mysql:8.0
|
||||
|
||||
- job:
|
||||
name: trove-tempest-ubuntu-base-mariadb10.4
|
||||
@@ -583,7 +577,7 @@
|
||||
nodeset: trove-ubuntu-noble-single
|
||||
timeout: 3600
|
||||
description: |
|
||||
Build Ubuntu jammy based image only on ubuntu distro.
|
||||
Build Ubuntu noble based image only on ubuntu distro.
|
||||
required-projects:
|
||||
- openstack/diskimage-builder
|
||||
- openstack/trove
|
||||
@@ -591,35 +585,35 @@
|
||||
- ^integration/(scripts|tests)/
|
||||
vars:
|
||||
guest_os: ubuntu
|
||||
guest_os_release: jammy
|
||||
guest_os_release: noble
|
||||
guest_username: ubuntu
|
||||
branch: master
|
||||
dev_mode: false
|
||||
image_suffix: ""
|
||||
|
||||
- job:
|
||||
name: publish-trove-guest-image-ubuntu-jammy
|
||||
name: publish-trove-guest-image-ubuntu-noble
|
||||
parent: publish-trove-guest-image
|
||||
description: |
|
||||
Build and publish Ubuntu jammy based Trove guest image to
|
||||
Build and publish Ubuntu noble based Trove guest image to
|
||||
tarballs.openstack.org.
|
||||
vars:
|
||||
guest_os: ubuntu
|
||||
guest_os_release: jammy
|
||||
guest_os_release: noble
|
||||
guest_username: ubuntu
|
||||
branch: master
|
||||
dev_mode: false
|
||||
image_suffix: ""
|
||||
|
||||
- job:
|
||||
name: publish-trove-guest-image-ubuntu-jammy-dev
|
||||
name: publish-trove-guest-image-ubuntu-noble-dev
|
||||
parent: publish-trove-guest-image
|
||||
description: |
|
||||
Build and publish Ubuntu jammy based Trove guest image to
|
||||
Build and publish Ubuntu noble based Trove guest image to
|
||||
tarballs.openstack.org.
|
||||
vars:
|
||||
guest_os: ubuntu
|
||||
guest_os_release: jammy
|
||||
guest_os_release: noble
|
||||
guest_username: ubuntu
|
||||
branch: master
|
||||
dev_mode: true
|
||||
|
@@ -14,16 +14,6 @@
|
||||
- name: primary
|
||||
label: ubuntu-noble
|
||||
|
||||
- nodeset:
|
||||
name: trove-ubuntu-jammy
|
||||
nodes:
|
||||
- name: controller
|
||||
label: nested-virt-ubuntu-jammy
|
||||
groups:
|
||||
- name: tempest
|
||||
nodes:
|
||||
- controller
|
||||
|
||||
- secret:
|
||||
name: trove_quay_io_creds
|
||||
data:
|
||||
|
@@ -11,25 +11,27 @@
|
||||
- release-notes-jobs-python3
|
||||
check:
|
||||
jobs:
|
||||
- trove-tempest-ubuntu-base-mysql5.7
|
||||
- trove-tempest-ubuntu-base-mysql5.7-jammy
|
||||
- trove-tempest-ubuntu-backup-mysql5.7:
|
||||
- trove-tempest-ubuntu-base-mysql8.0
|
||||
- trove-tempest-ubuntu-backup-mysql8.0:
|
||||
voting: false
|
||||
- trove-tempest-ubuntu-replication-mysql5.7:
|
||||
- trove-tempest-ubuntu-replication-mysql8.0:
|
||||
voting: false
|
||||
- trove-tempest-cinder-storage-driver-mysql8.0:
|
||||
voting: false
|
||||
- trove-tempest-cinder-storage-driver-mysql5.7
|
||||
- trove-tempest-ubuntu-base-mariadb10.4
|
||||
- trove-tempest-ubuntu-backup-mariadb10.4:
|
||||
voting: false
|
||||
- trove-tempest-ubuntu-replication-mariadb10.4:
|
||||
voting: false
|
||||
- trove-tempest-cinder-storage-driver-mariadb10.4
|
||||
- trove-tempest-cinder-storage-driver-mariadb10.4:
|
||||
voting: false
|
||||
- trove-tempest-ubuntu-base-postgresql12
|
||||
- trove-tempest-ubuntu-backup-postgresql12:
|
||||
voting: false
|
||||
- trove-tempest-ubuntu-replication-postgresql12:
|
||||
voting: false
|
||||
- trove-tempest-cinder-storage-driver-postgresql12
|
||||
- trove-tempest-cinder-storage-driver-postgresql12:
|
||||
voting: false
|
||||
- openstack-tox-cover:
|
||||
voting: true
|
||||
- trove-tox-bandit-baseline:
|
||||
@@ -38,8 +40,7 @@
|
||||
voting: true
|
||||
gate:
|
||||
jobs:
|
||||
- trove-tempest-ubuntu-base-mysql5.7
|
||||
- trove-tempest-ubuntu-base-mysql5.7-jammy
|
||||
- trove-tempest-ubuntu-base-mysql8.0
|
||||
- trove-tempest-ubuntu-base-mariadb10.4
|
||||
- trove-tempest-ubuntu-base-postgresql12
|
||||
experimental:
|
||||
@@ -47,7 +48,7 @@
|
||||
- trove-tempest-ipv6-only
|
||||
periodic:
|
||||
jobs:
|
||||
- publish-trove-guest-image-ubuntu-jammy:
|
||||
- publish-trove-guest-image-ubuntu-noble:
|
||||
branches:
|
||||
regex: master
|
||||
- publish-trove-images-quay:
|
||||
|
Reference in New Issue
Block a user