Choose version of Ansible OpenStack collection based on RDO release
Starting with RDO Zed, openstacksdk has been bumped to >=0.99.0 which broke backward compatibility with previous releases. This required a refactoring of most most modules in Ansible OpenStack collection 2.0.0, which thus also broke backward compatibilty with earlier releases of the 1.x.x collection series. Now, quickstart.sh must choose collection version depending on the openstacksdk release which gets installed by the RDO release. Since quickstart.sh, TripleO CI and RDO releases are tightly coupled we have to implement this version chooser in three steps: 1. Implement version chooser in quickstart.sh and install the collection as well as openstacksdk from a temporary yum repository created by Alfredo. 2. Bump the collection and openstacksdk in RDO release and wait for component lines and integration line promotions. 3. Remove Alfredo's temporary yum repository from quickstart.sh This patch accomplishes the first step, introducing the version chooser logic and introducing Alfredo's temporary yum repository with a preview RPM of ansible-collections-openstack 2.0.0 and python3-openstacksdk 0.101.0. Co-Authored-By: Alfredo Moralejo <amoralej@redhat.com> Change-Id: Ic7660a85079688be206b8fb63f76add333ba68f2
This commit is contained in:
parent
ed54364feb
commit
e178f95290
|
@ -10,6 +10,10 @@ collections:
|
|||
# and otherwise will fail with "Non integer values in LooseVersion" [2].
|
||||
# [1] https://semver.org/
|
||||
# [2] https://bugzilla.redhat.com/show_bug.cgi?id=2109807
|
||||
#
|
||||
# FIXME(jmeng): Collection openstack.cloud aka git+https://opendev.org/openstack/
|
||||
# ansible-collections-openstack is installed with quickstart.sh because the
|
||||
# version to be installed depends on the RDO release.
|
||||
- name: ansible.utils
|
||||
source: https://galaxy.ansible.com
|
||||
version: 2.4.2
|
||||
|
@ -34,10 +38,6 @@ collections:
|
|||
- name: openstack.config_template
|
||||
source: git+https://opendev.org/openstack/ansible-config_template.git
|
||||
type: git
|
||||
- name: openstack.cloud
|
||||
source: git+https://opendev.org/openstack/ansible-collections-openstack
|
||||
type: git
|
||||
version: 1.8.0
|
||||
- name: tripleo.operator
|
||||
source: git+https://opendev.org/openstack/tripleo-operator-ansible/
|
||||
type: git
|
||||
|
|
|
@ -159,7 +159,9 @@ repos:
|
|||
|
||||
- type: file
|
||||
filename: delorean-master-deps.repo
|
||||
down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/delorean-deps.repo"
|
||||
# FIXME(jmeng): Remove aoc-temp repository once prerelease of ansible-collections-openstack 2.0.0 has been promoted
|
||||
#down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/delorean-deps.repo"
|
||||
down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/aoc-temp/delorean-deps.repo"
|
||||
|
||||
# CentOS related repos
|
||||
- type: generic
|
||||
|
|
|
@ -129,7 +129,9 @@ repos:
|
|||
|
||||
- type: file
|
||||
filename: delorean-master-deps.repo
|
||||
down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/delorean-deps.repo"
|
||||
# FIXME(jmeng): Remove aoc-temp repository once prerelease of ansible-collections-openstack 2.0.0 has been promoted
|
||||
#down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/delorean-deps.repo"
|
||||
down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/aoc-temp/delorean-deps.repo"
|
||||
|
||||
# CentOS related repos
|
||||
- type: generic
|
||||
|
|
|
@ -128,7 +128,9 @@ repos:
|
|||
|
||||
- type: file
|
||||
filename: delorean-zed-deps.repo
|
||||
down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/delorean-deps.repo"
|
||||
# FIXME(jmeng): Remove aoc-temp repository once prerelease of ansible-collections-openstack 2.0.0 has been promoted
|
||||
#down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/delorean-deps.repo"
|
||||
down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/aoc-temp/delorean-deps.repo"
|
||||
|
||||
# CentOS related repos
|
||||
- type: generic
|
||||
|
|
|
@ -158,7 +158,9 @@ repos:
|
|||
|
||||
- type: file
|
||||
filename: delorean-zed-deps.repo
|
||||
down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/delorean-deps.repo"
|
||||
# FIXME(jmeng): Remove aoc-temp repository once prerelease of ansible-collections-openstack 2.0.0 has been promoted
|
||||
#down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/delorean-deps.repo"
|
||||
down_url: "${NODEPOOL_RDO_PROXY}/{{ distro_ver }}-{{ release }}/aoc-temp/delorean-deps.repo"
|
||||
|
||||
# CentOS related repos
|
||||
- type: generic
|
||||
|
|
|
@ -133,6 +133,30 @@ install_ansible_collections_deps(){
|
|||
-r ansible-collection-requirements.yml \
|
||||
-p $VIRTUAL_ENV/share/ansible/collections
|
||||
|
||||
# Install openstack.cloud release depending on the RDO release if is not installed
|
||||
#
|
||||
# Some jobs run quickstart.sh several times, so ansible-galaxy might get called twice or more.
|
||||
# On such subsequent runs, ansible-galaxy will find the collections to be installed already and
|
||||
# will use the optional version part of the SCM pointer to compare it against existing
|
||||
# collections. This comparison will fail with "Non integer values in LooseVersion" [2] if the
|
||||
# version in the SCM pointer is not a valid semantic version [1].
|
||||
# Both a branch name and a commit hash are not valid semantic versions and thus we can only run
|
||||
# ansible-galaxy on the first run aka if openstack.cloud has not been installed yet.
|
||||
# [1] https://semver.org/
|
||||
# [2] https://bugzilla.redhat.com/show_bug.cgi?id=2109807
|
||||
if [[ ! -d $VIRTUAL_ENV/share/ansible/collections/ansible_collections/openstack/cloud ]]; then
|
||||
if [[ $QUICKSTART_RELEASE =~ .*(train|victoria|wallaby).* ]]; then
|
||||
retry 10 ansible-galaxy collection install -vvv --force \
|
||||
git+https://opendev.org/openstack/ansible-collections-openstack,stable/1.0.0 \
|
||||
-p $VIRTUAL_ENV/share/ansible/collections
|
||||
else
|
||||
# FIXME(jmeng): Replace commit hash with 'master' once Ansible OpenStack collection 2.0.0 has been released
|
||||
retry 10 ansible-galaxy collection install -vvv --force \
|
||||
git+https://opendev.org/openstack/ansible-collections-openstack,ed36d82a0c60a841d2f30c61a50d60531481b2cc \
|
||||
-p $VIRTUAL_ENV/share/ansible/collections
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use collections already cloned by CI if they're available
|
||||
OS_COLLECTIONS="ansible-config_template ansible-collections-openstack \
|
||||
tripleo-operator-ansible"
|
||||
|
|
Loading…
Reference in New Issue