Merge "docs: Get release name dynamically"

This commit is contained in:
Zuul 2021-11-15 10:26:00 +00:00 committed by Gerrit Code Review
commit 5e74279e1c
3 changed files with 29 additions and 28 deletions

View File

@ -15,6 +15,9 @@
import os import os
import sys import sys
import openstackdocstheme
sys.path.insert(0, os.path.abspath('../..')) sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ---------------------------------------------------- # -- General configuration ----------------------------------------------------
@ -115,18 +118,15 @@ openstack_projects = [
# For replacement, use in docs as |VAR_NAME| (note there's no space around variable name) # For replacement, use in docs as |VAR_NAME| (note there's no space around variable name)
# When adding new variables, make sure you add them to GLOBAL_VARIABLE_MAP dictionary as well # When adding new variables, make sure you add them to GLOBAL_VARIABLE_MAP dictionary as well
KOLLA_ANSIBLE_MAJOR_VERSION = '9' KOLLA_OPENSTACK_RELEASE = openstackdocstheme.ext._get_series_name()
# use 'master' or release name, e.g. 'victoria', 'xena' etc. if KOLLA_OPENSTACK_RELEASE == 'latest':
KOLLA_OPENSTACK_RELEASE = 'master' KOLLA_OPENSTACK_RELEASE = 'master'
KOLLA_BRANCH_NAME = 'master'
if KOLLA_OPENSTACK_RELEASE == 'master':
KOLLA_BRANCH_NAME = KOLLA_OPENSTACK_RELEASE
else: else:
KOLLA_BRANCH_NAME = 'stable/{}'.format(KOLLA_OPENSTACK_RELEASE) KOLLA_BRANCH_NAME = 'stable/{}'.format(KOLLA_OPENSTACK_RELEASE)
GLOBAL_VARIABLE_MAP = { GLOBAL_VARIABLE_MAP = {
"|KOLLA_ANSIBLE_MAJOR_VERSION|": KOLLA_ANSIBLE_MAJOR_VERSION,
"|KOLLA_OPENSTACK_RELEASE|": KOLLA_OPENSTACK_RELEASE, "|KOLLA_OPENSTACK_RELEASE|": KOLLA_OPENSTACK_RELEASE,
"|KOLLA_BRANCH_NAME|": KOLLA_BRANCH_NAME, "|KOLLA_BRANCH_NAME|": KOLLA_BRANCH_NAME,
} }

View File

@ -22,9 +22,10 @@ release. Alpha tag usage is at discretion of the operator. The alpha identifier
could be a number as recommended or a string of the operator's choosing. could be a number as recommended or a string of the operator's choosing.
To customize the version number uncomment ``openstack_release`` in globals.yml To customize the version number uncomment ``openstack_release`` in globals.yml
and specify the version number desired. If ``openstack_release`` is not and specify the desired version number or name (e.g. ``victoria``,
specified, Kolla will deploy or upgrade using the version number information ``wallaby``). If ``openstack_release`` is not specified, Kolla will deploy or
contained in the kolla-ansible package. upgrade using the version number information contained in the kolla-ansible
package.
Upgrade procedure Upgrade procedure
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
@ -91,23 +92,25 @@ should be upgraded first. This will include reviewing some of the configuration
and inventory files. On the operator/master node, a backup of the and inventory files. On the operator/master node, a backup of the
``/etc/kolla`` directory may be desirable. ``/etc/kolla`` directory may be desirable.
If upgrading from ``5.0.0`` to ``6.0.0``, upgrade the kolla-ansible package: If upgrading to ``|KOLLA_OPENSTACK_RELEASE|``, upgrade the kolla-ansible
package:
.. code-block:: console .. code-block:: console
pip install --upgrade kolla-ansible==6.0.0 pip install --upgrade git+https://opendev.org/openstack/kolla-ansible@|KOLLA_BRANCH_NAME|
If this is a minor upgrade, and you do not wish to upgrade kolla-ansible If this is a minor upgrade, and you do not wish to upgrade kolla-ansible
itself, you may skip this step. itself, you may skip this step.
The inventory file for the deployment should be updated, as the newer sample The inventory file for the deployment should be updated, as the newer sample
inventory files may have updated layout or other relevant changes. inventory files may have updated layout or other relevant changes.
Use the newer ``6.0.0`` one as a starting template, and merge your existing Use the newer ``|KOLLA_OPENSTACK_RELEASE|`` one as a starting template, and
inventory layout into a copy of the one from here:: merge your existing inventory layout into a copy of the one from here::
/usr/share/kolla-ansible/ansible/inventory/ /usr/share/kolla-ansible/ansible/inventory/
In addition the ``6.0.0`` sample configuration files should be taken from:: In addition the ``|KOLLA_OPENSTACK_RELEASE|`` sample configuration files should
be taken from::
# CentOS # CentOS
/usr/share/kolla-ansible/etc_examples/kolla /usr/share/kolla-ansible/etc_examples/kolla
@ -115,8 +118,8 @@ In addition the ``6.0.0`` sample configuration files should be taken from::
# Ubuntu # Ubuntu
/usr/local/share/kolla-ansible/etc_examples/kolla /usr/local/share/kolla-ansible/etc_examples/kolla
At this stage, files that are still at the ``5.0.0`` version - which need At this stage, files that are still at the previous version and need manual
manual updating are: updating are:
- ``/etc/kolla/globals.yml`` - ``/etc/kolla/globals.yml``
- ``/etc/kolla/passwords.yml`` - ``/etc/kolla/passwords.yml``
@ -126,18 +129,20 @@ template, and then replace the file in ``/etc/kolla`` with the updated version.
For ``passwords.yml``, see the ``kolla-mergepwd`` instructions in For ``passwords.yml``, see the ``kolla-mergepwd`` instructions in
`Tips and Tricks`. `Tips and Tricks`.
For the kolla docker images, the ``openstack_release`` is updated to ``6.0.0``: For the kolla docker images, the ``openstack_release`` is updated to
``|KOLLA_OPENSTACK_RELEASE|``:
.. code-block:: yaml .. code-block:: yaml
openstack_release: 6.0.0 openstack_release: |KOLLA_OPENSTACK_RELEASE|
Once the kolla release, the inventory file, and the relevant configuration Once the kolla release, the inventory file, and the relevant configuration
files have been updated in this way, the operator may first want to 'pull' files have been updated in this way, the operator may first want to 'pull'
down the images to stage the ``6.0.0`` versions. This can be done safely down the images to stage the ``|KOLLA_OPENSTACK_RELEASE|`` versions. This can
ahead of time, and does not impact the existing services. (optional) be done safely ahead of time, and does not impact the existing services.
(optional)
Run the command to pull the ``6.0.0`` images for staging: Run the command to pull the ``|KOLLA_OPENSTACK_RELEASE|`` images for staging:
.. code-block:: console .. code-block:: console

View File

@ -149,23 +149,19 @@ Install Kolla-ansible
Install Kolla-ansible for deployment or evaluation Install Kolla-ansible for deployment or evaluation
-------------------------------------------------- --------------------------------------------------
For a list of ``kolla-ansible`` versions compatible with each OpenStack release
see `Kolla Ansible release notes
<https://docs.openstack.org/releasenotes/kolla-ansible/>`__.
#. Install kolla-ansible and its dependencies using ``pip``. #. Install kolla-ansible and its dependencies using ``pip``.
If using a virtual environment: If using a virtual environment:
.. code-block:: console .. code-block:: console
pip install 'kolla-ansible == |KOLLA_ANSIBLE_MAJOR_VERSION|.*' pip install git+https://opendev.org/openstack/kolla-ansible@|KOLLA_BRANCH_NAME|
If not using a virtual environment: If not using a virtual environment:
.. code-block:: console .. code-block:: console
sudo pip3 install 'kolla-ansible == |KOLLA_ANSIBLE_MAJOR_VERSION|.*' sudo pip3 install git+https://opendev.org/openstack/kolla-ansible@|KOLLA_BRANCH_NAME|
#. Create the ``/etc/kolla`` directory. #. Create the ``/etc/kolla`` directory.