Merge "Add Yoga upgrade jobs"
This commit is contained in:
commit
c1d63ccd9e
@ -46,11 +46,6 @@ export ACTION=${2:-"deploy"}
|
|||||||
# Set the installation method for the OpenStack services
|
# Set the installation method for the OpenStack services
|
||||||
export INSTALL_METHOD=${3:-"source"}
|
export INSTALL_METHOD=${3:-"source"}
|
||||||
|
|
||||||
# Set the source branch for upgrade tests
|
|
||||||
# Be sure to change this whenever a new stable branch
|
|
||||||
# is created. The checkout must always be N-1.
|
|
||||||
export UPGRADE_SOURCE_BRANCH=${UPGRADE_SOURCE_BRANCH:-'stable/yoga'}
|
|
||||||
|
|
||||||
# enable the ARA callback plugin
|
# enable the ARA callback plugin
|
||||||
export SETUP_ARA=${SETUP_ARA:-true}
|
export SETUP_ARA=${SETUP_ARA:-true}
|
||||||
|
|
||||||
@ -60,7 +55,14 @@ export SETUP_ARA=${SETUP_ARA:-true}
|
|||||||
# deployment.
|
# deployment.
|
||||||
# This needs to be done before the first "source" to ensure
|
# This needs to be done before the first "source" to ensure
|
||||||
# the correct functions are used for the branch.
|
# the correct functions are used for the branch.
|
||||||
if [[ "${ACTION}" == "upgrade" ]]; then
|
if [[ "${ACTION}" =~ "upgrade" ]]; then
|
||||||
|
# Set the source branch for upgrade tests
|
||||||
|
# Be sure to change this whenever a new stable branch
|
||||||
|
# is created.
|
||||||
|
UPGRADE_ACTION_ARRAY=(${ACTION//_/ })
|
||||||
|
export UPGRADE_SOURCE_RELEASE=${UPGRADE_ACTION_ARRAY[1]:-'zed'}
|
||||||
|
export UPGRADE_SOURCE_BRANCH=${UPGRADE_SOURCE_BRANCH:-stable/$UPGRADE_SOURCE_RELEASE}
|
||||||
|
|
||||||
# Store the target SHA/branch
|
# Store the target SHA/branch
|
||||||
export UPGRADE_TARGET_BRANCH=$(git rev-parse HEAD)
|
export UPGRADE_TARGET_BRANCH=$(git rev-parse HEAD)
|
||||||
export OPENSTACK_SETUP_EXTRA_ARGS="-e tempest_install=no -e tempest_run=no -e rally_install=no"
|
export OPENSTACK_SETUP_EXTRA_ARGS="-e tempest_install=no -e tempest_run=no -e rally_install=no"
|
||||||
@ -214,7 +216,7 @@ else
|
|||||||
# Log some data about the instance and the rest of the system
|
# Log some data about the instance and the rest of the system
|
||||||
log_instance_info
|
log_instance_info
|
||||||
|
|
||||||
if [[ $SCENARIO =~ "infra" && $ACTION != "upgrade" ]]; then
|
if [[ $SCENARIO =~ "infra" && ! $ACTION =~ "upgrade" ]]; then
|
||||||
# Verify our infra setup and do not continue with openstack part
|
# Verify our infra setup and do not continue with openstack part
|
||||||
openstack-ansible healthcheck-infrastructure.yml -e osa_gather_facts=False
|
openstack-ansible healthcheck-infrastructure.yml -e osa_gather_facts=False
|
||||||
fi
|
fi
|
||||||
@ -231,7 +233,7 @@ fi
|
|||||||
|
|
||||||
# If the action is to upgrade, then checkout the original SHA for
|
# If the action is to upgrade, then checkout the original SHA for
|
||||||
# the checkout, and execute the upgrade.
|
# the checkout, and execute the upgrade.
|
||||||
if [[ "${ACTION}" == "upgrade" ]]; then
|
if [[ "${ACTION}" =~ "upgrade" ]]; then
|
||||||
|
|
||||||
# Checkout the original HEAD we started with
|
# Checkout the original HEAD we started with
|
||||||
git checkout ${UPGRADE_TARGET_BRANCH}
|
git checkout ${UPGRADE_TARGET_BRANCH}
|
||||||
@ -263,7 +265,7 @@ if [[ "${ACTION}" == "upgrade" ]]; then
|
|||||||
# To execute the upgrade script we need to provide
|
# To execute the upgrade script we need to provide
|
||||||
# an affirmative response to the warning that the
|
# an affirmative response to the warning that the
|
||||||
# upgrade is irreversable.
|
# upgrade is irreversable.
|
||||||
echo 'YES' | bash "${OSA_CLONE_DIR}/scripts/run-upgrade.sh"
|
echo 'YES' | SOURCE_SERIES=${UPGRADE_SOURCE_RELEASE} bash "${OSA_CLONE_DIR}/scripts/run-upgrade.sh"
|
||||||
|
|
||||||
if [[ $SCENARIO =~ "infra" ]]; then
|
if [[ $SCENARIO =~ "infra" ]]; then
|
||||||
# TODO(noonedeadpunk): Remove after Y release
|
# TODO(noonedeadpunk): Remove after Y release
|
||||||
|
@ -30,8 +30,8 @@ export SCRIPTS_PATH="$(dirname "$(readlink -f "${0}")")"
|
|||||||
# The git checkout root path
|
# The git checkout root path
|
||||||
export MAIN_PATH="$(dirname "${SCRIPTS_PATH}")"
|
export MAIN_PATH="$(dirname "${SCRIPTS_PATH}")"
|
||||||
|
|
||||||
# The expected source series name
|
# The expected source series names
|
||||||
export SOURCE_SERIES="zed"
|
export SUPPORTED_SOURCE_SERIES=("yoga" "zed")
|
||||||
|
|
||||||
# The expected target series name
|
# The expected target series name
|
||||||
export TARGET_SERIES="2023.1"
|
export TARGET_SERIES="2023.1"
|
||||||
@ -123,20 +123,17 @@ function pre_flight {
|
|||||||
|
|
||||||
# Notify the user.
|
# Notify the user.
|
||||||
echo -e "
|
echo -e "
|
||||||
This script will perform a ${SOURCE_SERIES^} to ${TARGET_SERIES^} upgrade.
|
This script will perform an upgrade from ${SOURCE_SERIES^}
|
||||||
|
to ${TARGET_SERIES^}.
|
||||||
|
|
||||||
Once you start the upgrade there is no going back.
|
Once you start the upgrade there is no going back.
|
||||||
|
|
||||||
Note that the upgrade targets impacting the data
|
Note that the upgrade targets impacting the data
|
||||||
plane as little as possible, but assumes that the
|
plane as little as possible, but assumes that the
|
||||||
control plane can experience some down time.
|
control plane can experience some down time.
|
||||||
|
|
||||||
This script executes a one-size-fits-all upgrade,
|
|
||||||
and given that the tests implemented for it are
|
|
||||||
not monitored as well as those for a greenfield
|
|
||||||
environment, the results may vary with each release.
|
|
||||||
|
|
||||||
Please use it against a test environment with your
|
Please use it against a test environment with your
|
||||||
configurations to validate whether it suits your
|
configurations first to validate whether it suits your
|
||||||
needs and does a suitable upgrade.
|
needs and does a suitable upgrade.
|
||||||
|
|
||||||
Are you ready to perform this upgrade now?
|
Are you ready to perform this upgrade now?
|
||||||
@ -151,9 +148,32 @@ function pre_flight {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function set_source_series {
|
||||||
|
|
||||||
|
if [ ${#SUPPORTED_SOURCE_SERIES[@]} -gt 1 ]; then
|
||||||
|
echo -e "
|
||||||
|
Upgrade to ${TARGET_SERIES^} is supported only from one of the following releases:
|
||||||
|
"
|
||||||
|
for release_id in ${!SUPPORTED_SOURCE_SERIES[@]}; do
|
||||||
|
option_id=${release_id}
|
||||||
|
echo -e " $((++option_id)): ${SUPPORTED_SOURCE_SERIES[$release_id]^}"
|
||||||
|
done
|
||||||
|
echo -e ""
|
||||||
|
read -p ' Please specify the release to upgrade from [1]: ' SELECTED_OPTION
|
||||||
|
SOURCE_OPTION=${SELECTED_OPTION:-1}
|
||||||
|
export SOURCE_SERIES=${SUPPORTED_SOURCE_SERIES[$((--SOURCE_OPTION))]}
|
||||||
|
|
||||||
|
else
|
||||||
|
export SOURCE_SERIES=${SUPPORTED_SOURCE_SERIES[0]}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
## Main ----------------------------------------------------------------------
|
## Main ----------------------------------------------------------------------
|
||||||
|
|
||||||
function main {
|
function main {
|
||||||
|
if [ -z "${SOURCE_SERIES+defined}" ]; then
|
||||||
|
set_source_series
|
||||||
|
fi
|
||||||
pre_flight
|
pre_flight
|
||||||
check_for_current
|
check_for_current
|
||||||
create_working_dir
|
create_working_dir
|
||||||
@ -175,8 +195,10 @@ function main {
|
|||||||
|
|
||||||
pushd ${MAIN_PATH}/playbooks
|
pushd ${MAIN_PATH}/playbooks
|
||||||
RUN_TASKS+=("${SCRIPTS_PATH}/upgrade-utilities/deploy-config-changes.yml")
|
RUN_TASKS+=("${SCRIPTS_PATH}/upgrade-utilities/deploy-config-changes.yml")
|
||||||
|
if [[ "${SOURCE_SERIES}" == "yoga" ]]; then
|
||||||
RUN_TASKS+=("${SCRIPTS_PATH}/upgrade-utilities/define-neutron-plugin.yml")
|
RUN_TASKS+=("${SCRIPTS_PATH}/upgrade-utilities/define-neutron-plugin.yml")
|
||||||
RUN_TASKS+=("certificate-ssh-authority.yml")
|
RUN_TASKS+=("certificate-ssh-authority.yml")
|
||||||
|
fi
|
||||||
# we don't want to trigger container restarts for galera and rabbit
|
# we don't want to trigger container restarts for galera and rabbit
|
||||||
# but as there will be no hosts available for metal deployments,
|
# but as there will be no hosts available for metal deployments,
|
||||||
# as a fallback option we just run setup-hosts.yml without any arguments
|
# as a fallback option we just run setup-hosts.yml without any arguments
|
||||||
|
@ -521,18 +521,36 @@
|
|||||||
nodeset: ubuntu-focal
|
nodeset: ubuntu-focal
|
||||||
timeout: 10800
|
timeout: 10800
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-ansible-upgrade_yoga-aio_metal-ubuntu-focal
|
||||||
|
parent: openstack-ansible-deploy-aio
|
||||||
|
nodeset: ubuntu-focal
|
||||||
|
timeout: 10800
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-upgrade-aio_lxc-ubuntu-focal
|
name: openstack-ansible-upgrade-aio_lxc-ubuntu-focal
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-focal
|
nodeset: ubuntu-focal
|
||||||
timeout: 10800
|
timeout: 10800
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-ansible-upgrade_yoga-aio_lxc-ubuntu-focal
|
||||||
|
parent: openstack-ansible-deploy-aio
|
||||||
|
nodeset: ubuntu-focal
|
||||||
|
timeout: 10800
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-upgrade-infra_lxc-ubuntu-focal
|
name: openstack-ansible-upgrade-infra_lxc-ubuntu-focal
|
||||||
parent: openstack-ansible-deploy-aio-infra
|
parent: openstack-ansible-deploy-aio-infra
|
||||||
nodeset: ubuntu-focal
|
nodeset: ubuntu-focal
|
||||||
timeout: 10800
|
timeout: 10800
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-ansible-upgrade_yoga-infra_lxc-ubuntu-focal
|
||||||
|
parent: openstack-ansible-deploy-aio-infra
|
||||||
|
nodeset: ubuntu-focal
|
||||||
|
timeout: 10800
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-infra_lxc-ubuntu-focal
|
name: openstack-ansible-deploy-infra_lxc-ubuntu-focal
|
||||||
parent: openstack-ansible-deploy-aio-infra
|
parent: openstack-ansible-deploy-aio-infra
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
ZUUL_SRC_PATH: "{{ (action != 'shastest') | ternary(_zuul_src_path, '') }}"
|
ZUUL_SRC_PATH: "{{ (action != 'shastest') | ternary(_zuul_src_path, '') }}"
|
||||||
ANSIBLE_PACKAGE: "{{ ansible_package | default('') }}"
|
ANSIBLE_PACKAGE: "{{ ansible_package | default('') }}"
|
||||||
SETUP_ARA: 'true'
|
SETUP_ARA: 'true'
|
||||||
when: action != 'upgrade'
|
when: "'upgrade' not in action"
|
||||||
- name: Run bootstrap-aio script
|
- name: Run bootstrap-aio script
|
||||||
become: yes
|
become: yes
|
||||||
become_user: root
|
become_user: root
|
||||||
@ -56,6 +56,6 @@
|
|||||||
ACTION: "{{ action }}"
|
ACTION: "{{ action }}"
|
||||||
INSTALL_METHOD: "{{ install_method }}"
|
INSTALL_METHOD: "{{ install_method }}"
|
||||||
when:
|
when:
|
||||||
- action != 'upgrade'
|
- "'upgrade' not in action"
|
||||||
- action != 'linters'
|
- action != 'linters'
|
||||||
- action != 'shastest'
|
- action != 'shastest'
|
||||||
|
@ -65,6 +65,7 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- openstack-ansible-upgrade-infra_lxc-rockylinux-9
|
- openstack-ansible-upgrade-infra_lxc-rockylinux-9
|
||||||
- openstack-ansible-upgrade-infra_lxc-ubuntu-focal
|
- openstack-ansible-upgrade-infra_lxc-ubuntu-focal
|
||||||
|
- openstack-ansible-upgrade_yoga-infra_lxc-ubuntu-focal
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-ansible-upgrade-infra_lxc-rockylinux-9
|
- openstack-ansible-upgrade-infra_lxc-rockylinux-9
|
||||||
@ -76,6 +77,7 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- openstack-ansible-upgrade-aio_metal-rockylinux-9
|
- openstack-ansible-upgrade-aio_metal-rockylinux-9
|
||||||
- openstack-ansible-upgrade-aio_metal-ubuntu-focal
|
- openstack-ansible-upgrade-aio_metal-ubuntu-focal
|
||||||
|
- openstack-ansible-upgrade_yoga-aio_metal-ubuntu-focal
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-ansible-upgrade-aio_metal-rockylinux-9
|
- openstack-ansible-upgrade-aio_metal-rockylinux-9
|
||||||
@ -166,6 +168,7 @@
|
|||||||
- openstack-ansible-deploy-aio_metal-ubuntu-jammy
|
- openstack-ansible-deploy-aio_metal-ubuntu-jammy
|
||||||
- openstack-ansible-upgrade-aio_metal-rockylinux-9
|
- openstack-ansible-upgrade-aio_metal-rockylinux-9
|
||||||
- openstack-ansible-upgrade-aio_metal-ubuntu-focal
|
- openstack-ansible-upgrade-aio_metal-ubuntu-focal
|
||||||
|
- openstack-ansible-upgrade_yoga-aio_metal-ubuntu-focal
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-ansible-deploy-aio_metal-debian-bullseye
|
- openstack-ansible-deploy-aio_metal-debian-bullseye
|
||||||
|
Loading…
Reference in New Issue
Block a user