Add openstack_release and openstack_branch

Adds two new variables, 'openstack_release' and 'openstack_branch',
in ${KAYOBE_CONFIG_PATH}/openstack.yml for setting the current OpenStack
release and branch in a single place.

Also uses the master branch for the molecule tox job.

Change-Id: I851a1e6eddc6738005c1813599445b38c0ae0d57
This commit is contained in:
Mark Goddard 2019-04-12 14:12:48 +01:00
parent eda8246b7b
commit 73063732aa
10 changed files with 59 additions and 20 deletions

View File

@ -7,8 +7,9 @@
# URL of Bifrost source code repository. # URL of Bifrost source code repository.
kolla_bifrost_source_url: "https://git.openstack.org/openstack/bifrost" kolla_bifrost_source_url: "https://git.openstack.org/openstack/bifrost"
# Version (branch, tag, etc.) of Bifrost source code repository. # Version (branch, tag, etc.) of Bifrost source code repository. Default is
kolla_bifrost_source_version: "master" # {{ openstack_branch }}.
kolla_bifrost_source_version: "{{ openstack_branch }}"
############################################################################### ###############################################################################
# Diskimage-builder configuration. # Diskimage-builder configuration.

View File

@ -10,8 +10,8 @@ ipa_build_images: False
# URL of IPA source repository. # URL of IPA source repository.
ipa_build_source_url: "https://git.openstack.org/openstack/ironic-python-agent" ipa_build_source_url: "https://git.openstack.org/openstack/ironic-python-agent"
# Version of IPA source repository. # Version of IPA source repository. Default is {{ openstack_branch }}.
ipa_build_source_version: "master" ipa_build_source_version: "{{ openstack_branch }}"
# URL of IPA upper constraints file. # URL of IPA upper constraints file.
ipa_build_upper_constraints_file_url: ipa_build_upper_constraints_file_url:
@ -59,11 +59,16 @@ ipa_build_dib_git_elements: []
############################################################################### ###############################################################################
# Ironic Python Agent (IPA) images configuration. # Ironic Python Agent (IPA) images configuration.
# Suffix of upstream Ironic deployment image files. Default is based on
# {{ openstack_branch }}.
ipa_images_upstream_url_suffix: >-
{% if openstack_branch != 'master' %}-{{ openstack_branch | replace('/', '-') }}{% endif %}
# Name of Ironic deployment kernel image to register in Glance. # Name of Ironic deployment kernel image to register in Glance.
ipa_images_kernel_name: "ipa.vmlinuz" ipa_images_kernel_name: "ipa.vmlinuz"
# URL of Ironic deployment kernel image to download. # URL of Ironic deployment kernel image to download.
ipa_kernel_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe.vmlinuz" ipa_kernel_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe{{ ipa_images_upstream_url_suffix }}.vmlinuz"
# URL of checksum of Ironic deployment kernel image. # URL of checksum of Ironic deployment kernel image.
ipa_kernel_checksum_url: "{{ ipa_kernel_upstream_url }}.{{ ipa_kernel_checksum_algorithm }}" ipa_kernel_checksum_url: "{{ ipa_kernel_upstream_url }}.{{ ipa_kernel_checksum_algorithm }}"
@ -75,7 +80,7 @@ ipa_kernel_checksum_algorithm: "sha256"
ipa_images_ramdisk_name: "ipa.initramfs" ipa_images_ramdisk_name: "ipa.initramfs"
# URL of Ironic deployment ramdisk image to download. # URL of Ironic deployment ramdisk image to download.
ipa_ramdisk_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem.cpio.gz" ipa_ramdisk_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem{{ ipa_images_upstream_url_suffix }}.cpio.gz"
# URL of checksum of Ironic deployment ramdisk image. # URL of checksum of Ironic deployment ramdisk image.
ipa_ramdisk_checksum_url: "{{ ipa_ramdisk_upstream_url }}.{{ ipa_ramdisk_checksum_algorithm }}" ipa_ramdisk_checksum_url: "{{ ipa_ramdisk_upstream_url }}.{{ ipa_ramdisk_checksum_algorithm }}"

View File

@ -12,8 +12,8 @@ kolla_source_path: "{{ source_checkout_path ~ '/kolla' }}"
kolla_source_url: "https://git.openstack.org/openstack/kolla" kolla_source_url: "https://git.openstack.org/openstack/kolla"
# Version (branch, tag, etc.) of Kolla source code repository if type is # Version (branch, tag, etc.) of Kolla source code repository if type is
# 'source'. # 'source'. Default is {{ openstack_branch }}.
kolla_source_version: "master" kolla_source_version: "{{ openstack_branch }}"
# Path to virtualenv in which to install kolla. # Path to virtualenv in which to install kolla.
kolla_venv: "{{ virtualenv_path ~ '/kolla' }}" kolla_venv: "{{ virtualenv_path ~ '/kolla' }}"
@ -34,8 +34,8 @@ kolla_ansible_source_path: "{{ lookup('env', 'KOLLA_SOURCE_PATH') | default(look
kolla_ansible_source_url: "https://git.openstack.org/openstack/kolla-ansible" kolla_ansible_source_url: "https://git.openstack.org/openstack/kolla-ansible"
# Version (branch, tag, etc.) of Kolla Ansible source code repository if type # Version (branch, tag, etc.) of Kolla Ansible source code repository if type
# is 'source'. # is 'source'. Default is {{ openstack_branch }}.
kolla_ansible_source_version: "master" kolla_ansible_source_version: "{{ openstack_branch }}"
# Path to virtualenv in which to install kolla-ansible. # Path to virtualenv in which to install kolla-ansible.
kolla_ansible_venv: "{{ lookup('env', 'KOLLA_VENV_PATH') | default(lookup('env', 'PWD') ~ '/venvs/kolla-ansible', true) }}" kolla_ansible_venv: "{{ lookup('env', 'KOLLA_VENV_PATH') | default(lookup('env', 'PWD') ~ '/venvs/kolla-ansible', true) }}"
@ -71,7 +71,8 @@ kolla_docker_registry_username:
kolla_docker_registry_password: kolla_docker_registry_password:
# Kolla OpenStack release version. This should be a Docker image tag. # Kolla OpenStack release version. This should be a Docker image tag.
kolla_openstack_release: "master" # Default is {{ openstack_release }}.
kolla_openstack_release: "{{ openstack_release }}"
# Dict mapping names of sources to their definitions for # Dict mapping names of sources to their definitions for
# kolla_install_type=source. See kolla.common.config for details. # kolla_install_type=source. See kolla.common.config for details.
@ -313,7 +314,7 @@ kolla_enable_tls_external: "no"
kolla_openstack_logging_debug: "False" kolla_openstack_logging_debug: "False"
# Upper constraints file for installation of Kolla. # Upper constraints file for installation of Kolla.
kolla_upper_constraints_file: "https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt" kolla_upper_constraints_file: "https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h={{ openstack_branch }}"
# User account to use for Kolla SSH access. # User account to use for Kolla SSH access.
kolla_ansible_user: kolla kolla_ansible_user: kolla

View File

@ -1,4 +1,14 @@
--- ---
###############################################################################
# OpenStack release configuration.
# Name of the current OpenStack release. Default is "master".
openstack_release: "master"
# Name of the current OpenStack branch. Default is "master".
openstack_branch: >-
{% if openstack_release != 'master' %}stable/{% endif %}{{ openstack_release | lower }}
############################################################################### ###############################################################################
# OpenStack authentication configuration. # OpenStack authentication configuration.

View File

@ -7,7 +7,8 @@
# URL of Bifrost source code repository. # URL of Bifrost source code repository.
#kolla_bifrost_source_url: #kolla_bifrost_source_url:
# Version (branch, tag, etc.) of Bifrost source code repository. # Version (branch, tag, etc.) of Bifrost source code repository. Default is
# {{ openstack_branch }}.
#kolla_bifrost_source_version: #kolla_bifrost_source_version:
############################################################################### ###############################################################################

View File

@ -10,7 +10,7 @@
# URL of IPA source repository. # URL of IPA source repository.
#ipa_build_source_url: #ipa_build_source_url:
# Version of IPA source repository. # Version of IPA source repository. Default is {{ openstack_branch }}.
#ipa_build_source_version: #ipa_build_source_version:
# URL of IPA upper constraints file. # URL of IPA upper constraints file.
@ -50,6 +50,10 @@
############################################################################### ###############################################################################
# Ironic Python Agent (IPA) images configuration. # Ironic Python Agent (IPA) images configuration.
# Suffix of upstream Ironic deployment image files. Default is based on
# {{ openstack_branch }}.
#ipa_images_upstream_url_suffix:
# Name of Ironic deployment kernel image to register in Glance. # Name of Ironic deployment kernel image to register in Glance.
#ipa_images_kernel_name: #ipa_images_kernel_name:

View File

@ -14,7 +14,7 @@
#kolla_source_url: #kolla_source_url:
# Version (branch, tag, etc.) of Kolla source code repository if type is # Version (branch, tag, etc.) of Kolla source code repository if type is
# 'source'. # 'source'. Default is {{ openstack_branch }}.
#kolla_source_version: #kolla_source_version:
# Path to virtualenv in which to install kolla. # Path to virtualenv in which to install kolla.
@ -36,7 +36,7 @@
#kolla_ansible_source_url: #kolla_ansible_source_url:
# Version (branch, tag, etc.) of Kolla Ansible source code repository if type # Version (branch, tag, etc.) of Kolla Ansible source code repository if type
# is 'source'. # is 'source'. Default is {{ openstack_branch }}.
#kolla_ansible_source_version: #kolla_ansible_source_version:
# Path to virtualenv in which to install kolla-ansible. # Path to virtualenv in which to install kolla-ansible.
@ -73,6 +73,7 @@
#kolla_docker_registry_password: #kolla_docker_registry_password:
# Kolla OpenStack release version. This should be a Docker image tag. # Kolla OpenStack release version. This should be a Docker image tag.
# Default is {{ openstack_release }}.
#kolla_openstack_release: #kolla_openstack_release:
# Dict mapping names of sources to their definitions for # Dict mapping names of sources to their definitions for

13
etc/kayobe/openstack.yml Normal file
View File

@ -0,0 +1,13 @@
---
###############################################################################
# OpenStack release configuration.
# Name of the current OpenStack release. Default is "master".
#openstack_release:
# Name of the current OpenStack branch. Default is "master".
#openstack_branch:
###############################################################################
# Dummy variable to allow Ansible to accept this file.
workaround_ansible_issue_8743: yes

View File

@ -0,0 +1,6 @@
---
features:
- |
Adds two new variables, ``openstack_release`` and ``openstack_branch``, in
``${KAYOBE_CONFIG_PATH}/openstack.yml`` for setting the current OpenStack
release and branch in a single place.

View File

@ -59,11 +59,8 @@ commands =
[testenv:molecule] [testenv:molecule]
# Molecule only supports python 2.7 and 3.6. # Molecule only supports python 2.7 and 3.6.
basepython = python2 basepython = python2
# Use stable/rocky upper-constraints for molecule since pytest 3.10 fails with
# the following error:
# AttributeError: 'Config' object has no attribute 'cache'
deps = deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/rocky} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
whitelist_externals = whitelist_externals =