[CI]: Add support for Ubuntu Jammy

Run tests on Ubuntu Jammy in zuul.
refer to:https://governance.openstack.org/tc/reference/runtimes/2023.2.html

Change-Id: Ib12b92ed4ddd9133ad7a3d079534d02f403dbdc0
This commit is contained in:
wu.chunyang 2023-07-25 14:57:34 +08:00
parent 05c30cbcf6
commit e1b72b5115
11 changed files with 40 additions and 42 deletions

View File

@ -31,7 +31,7 @@ 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_LOCAL_POLICY_JSON=${TROVE_LOCAL_POLICY_JSON:-${TROVE_LOCAL_CONF_DIR}/policy.yaml}
TROVE_IMAGE_OS=${TROVE_IMAGE_OS:-"ubuntu"} TROVE_IMAGE_OS=${TROVE_IMAGE_OS:-"ubuntu"}
TROVE_IMAGE_OS_RELEASE=${TROVE_IMAGE_OS_RELEASE:-"focal"} TROVE_IMAGE_OS_RELEASE=${TROVE_IMAGE_OS_RELEASE:-"jammy"}
TROVE_DATASTORE_TYPE=${TROVE_DATASTORE_TYPE:-"mysql"} TROVE_DATASTORE_TYPE=${TROVE_DATASTORE_TYPE:-"mysql"}
TROVE_DATASTORE_VERSION=${TROVE_DATASTORE_VERSION:-"5.7.29"} TROVE_DATASTORE_VERSION=${TROVE_DATASTORE_VERSION:-"5.7.29"}

View File

@ -149,7 +149,7 @@ The trove guest image could be created by running the following command:
${guest_username} \ ${guest_username} \
${output_image_path} ${output_image_path}
* Currently, only ``guest_os=ubuntu`` and ``guest_os_release=focal`` are fully * Currently, only ``guest_os=ubuntu`` and ``guest_os_release=jammy`` are fully
tested and supported. tested and supported.
* Default input values: * Default input values:
@ -157,7 +157,7 @@ The trove guest image could be created by running the following command:
.. code-block:: ini .. code-block:: ini
guest_os=ubuntu guest_os=ubuntu
guest_os_release=focal guest_os_release=jammy
dev_mode=true dev_mode=true
guest_username=ubuntu guest_username=ubuntu
output_image_path=$HOME/images/trove-guest-${guest_os}-${guest_os_release}-dev.qcow2 output_image_path=$HOME/images/trove-guest-${guest_os}-${guest_os_release}-dev.qcow2
@ -182,12 +182,12 @@ The trove guest image could be created by running the following command:
extension, e.g. to build a raw image, you can specify extension, e.g. to build a raw image, you can specify
``$your-image-name.raw`` as the ``output_image_path`` parameter. ``$your-image-name.raw`` as the ``output_image_path`` parameter.
For example, in order to build a guest image for Ubuntu focal operating For example, in order to build a guest image for Ubuntu jammy operating
system in development mode: system in development mode:
.. code-block:: console .. code-block:: console
$ ./trovestack build-image ubuntu focal true ubuntu $ ./trovestack build-image ubuntu jammy true ubuntu
Once the image build is finished, the cloud administrator needs to register the Once the image build is finished, the cloud administrator needs to register the
image in Glance and register a new datastore or version in Trove using image in Glance and register a new datastore or version in Trove using
@ -195,12 +195,12 @@ image in Glance and register a new datastore or version in Trove using
.. code-block:: console .. code-block:: console
$ openstack image create trove-guest-ubuntu-focal \ $ openstack image create trove-guest-ubuntu-jammy \
--private \ --private \
--disk-format qcow2 \ --disk-format qcow2 \
--container-format bare \ --container-format bare \
--tag trove --tag mysql \ --tag trove --tag mysql \
--file ~/images/trove-guest-ubuntu-focal-dev.qcow2 --file ~/images/trove-guest-ubuntu-jammy-dev.qcow2
$ openstack datastore version create 5.7.29 mysql mysql "" \ $ openstack datastore version create 5.7.29 mysql mysql "" \
--image-tags trove,mysql \ --image-tags trove,mysql \
--active --default --active --default

View File

@ -59,7 +59,7 @@ To create a datastore version:
.. code-block:: console .. code-block:: console
openstack image create \ openstack image create \
trove-guest-ubuntu-focal \ trove-guest-ubuntu-jammy \
--private \ --private \
--disk-format qcow2 --container-format bare \ --disk-format qcow2 --container-format bare \
--file $image_file \ --file $image_file \

View File

@ -118,7 +118,7 @@ Upgrade Trove services
.. code-block:: console .. code-block:: console
$ stackdir=/opt/stack $ stackdir=/opt/stack
$ $stackdir/trove/integration/scripts/trovestack build-image ubuntu focal true ubuntu $ $stackdir/trove/integration/scripts/trovestack build-image ubuntu jammy true ubuntu
#. Trove database migration. #. Trove database migration.
@ -146,7 +146,7 @@ Upgrade Trove services
.. code-block:: console .. code-block:: console
$ imageid=$(openstack image create trove-guest-victoria-ubuntu-focal-dev \ $ imageid=$(openstack image create trove-guest-victoria-ubuntu-jammy-dev \
--private \ --private \
--disk-format qcow2 --container-format bare \ --disk-format qcow2 --container-format bare \
--file ${imagefile-path} \ --file ${imagefile-path} \

View File

@ -2,7 +2,7 @@
## Steps to setup environment ## Steps to setup environment
Install a fresh Ubuntu 20.04 (focal) image. We suggest creating a development virtual machine using the image. Install a fresh Ubuntu 22.04 (jammy) image. We suggest creating a development virtual machine using the image.
1. Login to the machine as root 1. Login to the machine as root
1. Make sure we have git installed 1. Make sure we have git installed
@ -137,10 +137,10 @@ PATH_DEVSTACK_OUTPUT=/opt/stack \
- If `dev_mode=true`, no Trove code is injected into the guest image. The guest - If `dev_mode=true`, no Trove code is injected into the guest image. The guest
agent will download Trove code during the service initialization. agent will download Trove code during the service initialization.
For example, build a Mysql image for Ubuntu Focal operating system: For example, build a Mysql image for Ubuntu jammy operating system:
```shell ```shell
$ ./trovestack build-image mysql ubuntu focal false $ ./trovestack build-image mysql ubuntu jammy false
``` ```
### Running Integration Tests ### Running Integration Tests

View File

@ -1,10 +1,8 @@
{ {
"release": { "distro": {
"ubuntu": { "ubuntu": {
"focal": {
"ureadahead": "" "ureadahead": ""
} }
}
}, },
"family": { "family": {
"redhat": { "redhat": {

View File

@ -7,7 +7,7 @@ set -e
set -o xtrace set -o xtrace
GUEST_USERNAME=${GUEST_USERNAME:-"ubuntu"} GUEST_USERNAME=${GUEST_USERNAME:-"ubuntu"}
RELEASE=${DIB_RELEASE:-"focal"} RELEASE=${DIB_RELEASE:-"jammy"}
# Add Percona GPG key # Add Percona GPG key
mkdir -p /home/${GUEST_USERNAME}/.gnupg mkdir -p /home/${GUEST_USERNAME}/.gnupg

View File

@ -752,7 +752,7 @@ function cmd_build_image() {
exclaim "Params for cmd_build_image function: $@" exclaim "Params for cmd_build_image function: $@"
local image_guest_os=${1:-'ubuntu'} local image_guest_os=${1:-'ubuntu'}
local image_guest_release=${2:-'focal'} local image_guest_release=${2:-'jammy'}
local dev_mode=${3:-'true'} local dev_mode=${3:-'true'}
local guest_username=${4:-'ubuntu'} local guest_username=${4:-'ubuntu'}
local output=$5 local output=$5
@ -775,7 +775,7 @@ function cmd_build_image() {
if is_fedora; then if is_fedora; then
sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS install epel-release sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS install epel-release
sudo $PKG_MGR config-manager --set-enabled epel sudo $PKG_MGR config-manager --set-enabled epel
sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS install qemu-img git kpartx debootstrap squashfs-tools python3-pip python3-setuptools sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS install qemu-img git kpartx debootstrap squashfs-tools python3-pip python3-setuptools zstd
else else
sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS install qemu-utils git kpartx debootstrap squashfs-tools python3-pip python3-setuptools sudo $HTTP_PROXY $PKG_MGR $PKG_GET_ARGS install qemu-utils git kpartx debootstrap squashfs-tools python3-pip python3-setuptools
fi fi
@ -787,7 +787,7 @@ function cmd_build_image() {
# Build guest image and upload to Glance, register the datastore and configuration parameters. # Build guest image and upload to Glance, register the datastore and configuration parameters.
function cmd_build_and_upload_image() { function cmd_build_and_upload_image() {
local guest_os=${1:-"ubuntu"} local guest_os=${1:-"ubuntu"}
local guest_release=${2:-"focal"} local guest_release=${2:-"jammy"}
local dev_mode=${3:-"true"} local dev_mode=${3:-"true"}
local guest_username=${4:-"ubuntu"} local guest_username=${4:-"ubuntu"}
local output_dir=${5:-"$HOME/images"} local output_dir=${5:-"$HOME/images"}

View File

@ -79,7 +79,7 @@
- job: - job:
name: trove-functional-mysql name: trove-functional-mysql
parent: trove-devstack-base parent: trove-devstack-base
nodeset: trove-ubuntu-focal nodeset: trove-ubuntu-jammy
timeout: 10800 timeout: 10800
vars: vars:
devstack_localrc: devstack_localrc:
@ -95,7 +95,7 @@
vars: vars:
devstack_localrc: devstack_localrc:
TROVE_RESIZE_TIME_OUT: 1800 TROVE_RESIZE_TIME_OUT: 1800
TROVE_NON_DEV_IMAGE_URL: https://tarballs.opendev.org/openstack/trove/images/trove-master-mysql-ubuntu-focal.qcow2 TROVE_NON_DEV_IMAGE_URL: https://tarballs.opendev.org/openstack/trove/images/trove-master-mysql-ubuntu-jammy.qcow2
trove_resize_time_out: 1800 trove_resize_time_out: 1800
trove_test_datastore: 'mysql' trove_test_datastore: 'mysql'
trove_test_group: 'mysql' trove_test_group: 'mysql'
@ -270,7 +270,7 @@
- job: - job:
name: trove-tempest name: trove-tempest
parent: devstack-tempest parent: devstack-tempest
nodeset: trove-ubuntu-focal nodeset: trove-ubuntu-jammy
timeout: 10800 timeout: 10800
required-projects: &base_required_projects required-projects: &base_required_projects
- openstack/trove - openstack/trove
@ -366,7 +366,7 @@
- job: - job:
name: trove-tempest-postgres name: trove-tempest-postgres
parent: devstack-tempest parent: devstack-tempest
nodeset: trove-ubuntu-focal nodeset: trove-ubuntu-jammy
timeout: 10800 timeout: 10800
required-projects: required-projects:
- openstack/trove - openstack/trove
@ -462,10 +462,10 @@
- job: - job:
name: trove-ubuntu-guest-image-build name: trove-ubuntu-guest-image-build
run: playbooks/image-build/run.yaml run: playbooks/image-build/run.yaml
nodeset: trove-ubuntu-focal-single nodeset: trove-ubuntu-jammy-single
timeout: 3600 timeout: 3600
description: | description: |
Build Ubuntu focal based image only on ubuntu distro. Build Ubuntu jammy based image only on ubuntu distro.
required-projects: required-projects:
- openstack/diskimage-builder - openstack/diskimage-builder
- openstack/trove - openstack/trove
@ -474,7 +474,7 @@
- ^integration/(scripts|tests)/ - ^integration/(scripts|tests)/
vars: vars:
guest_os: ubuntu guest_os: ubuntu
guest_os_release: focal guest_os_release: jammy
guest_username: ubuntu guest_username: ubuntu
branch: master branch: master
dev_mode: false dev_mode: false
@ -486,7 +486,7 @@
nodeset: trove-centos8s-single nodeset: trove-centos8s-single
timeout: 3600 timeout: 3600
description: | description: |
Build Ubuntu focal based image only on centos8 stream. Build Ubuntu jammy based image only on centos8 stream.
required-projects: required-projects:
- openstack/diskimage-builder - openstack/diskimage-builder
- openstack/trove - openstack/trove
@ -495,35 +495,35 @@
- ^integration/(scripts|tests)/ - ^integration/(scripts|tests)/
vars: vars:
guest_os: ubuntu guest_os: ubuntu
guest_os_release: focal guest_os_release: jammy
guest_username: ubuntu guest_username: ubuntu
branch: master branch: master
dev_mode: false dev_mode: false
image_suffix: "" image_suffix: ""
- job: - job:
name: publish-trove-guest-image-ubuntu-focal name: publish-trove-guest-image-ubuntu-jammy
parent: publish-trove-guest-image parent: publish-trove-guest-image
description: | description: |
Build and publish Ubuntu focal based Trove guest image to Build and publish Ubuntu jammy based Trove guest image to
tarballs.openstack.org. tarballs.openstack.org.
vars: vars:
guest_os: ubuntu guest_os: ubuntu
guest_os_release: focal guest_os_release: jammy
guest_username: ubuntu guest_username: ubuntu
branch: master branch: master
dev_mode: false dev_mode: false
image_suffix: "" image_suffix: ""
- job: - job:
name: publish-trove-guest-image-ubuntu-focal-dev name: publish-trove-guest-image-ubuntu-jammy-dev
parent: publish-trove-guest-image parent: publish-trove-guest-image
description: | description: |
Build and publish Ubuntu focal based Trove guest image to Build and publish Ubuntu jammy based Trove guest image to
tarballs.openstack.org. tarballs.openstack.org.
vars: vars:
guest_os: ubuntu guest_os: ubuntu
guest_os_release: focal guest_os_release: jammy
guest_username: ubuntu guest_username: ubuntu
branch: master branch: master
dev_mode: true dev_mode: true
@ -537,6 +537,6 @@
run: playbooks/image-build/docker-registry.yaml run: playbooks/image-build/docker-registry.yaml
parent: publish-openstack-artifacts parent: publish-openstack-artifacts
post-run: playbooks/image-build/post.yaml post-run: playbooks/image-build/post.yaml
nodeset: trove-ubuntu-focal-single nodeset: trove-ubuntu-jammy-single
required-projects: required-projects:
- openstack/trove - openstack/trove

View File

@ -1,18 +1,18 @@
- nodeset: - nodeset:
name: trove-ubuntu-focal name: trove-ubuntu-jammy
nodes: nodes:
- name: controller - name: controller
label: nested-virt-ubuntu-focal label: nested-virt-ubuntu-jammy
groups: groups:
- name: tempest - name: tempest
nodes: nodes:
- controller - controller
- nodeset: - nodeset:
name: trove-ubuntu-focal-single name: trove-ubuntu-jammy-single
nodes: nodes:
- name: primary - name: primary
label: ubuntu-focal label: ubuntu-jammy
- nodeset: - nodeset:
name: trove-centos8s-single name: trove-centos8s-single

View File

@ -39,9 +39,9 @@
- trove-scenario-mariadb-multi - trove-scenario-mariadb-multi
periodic: periodic:
jobs: jobs:
- publish-trove-guest-image-ubuntu-focal: - publish-trove-guest-image-ubuntu-jammy:
branches: ^(?!stable/.*).*$ branches: ^(?!stable/.*).*$
- publish-trove-guest-image-ubuntu-focal-dev: - publish-trove-guest-image-ubuntu-jammy-dev:
branches: ^(?!stable/.*).*$ branches: ^(?!stable/.*).*$
- publish-trove-datastore-images: - publish-trove-datastore-images:
branches: ^(?!stable/.*).*$ branches: ^(?!stable/.*).*$