Skip to content

Commit 9a9b609

Browse files
adrianandreiasmarkgoddard
authored andcommitted
docs: Get release name dynamically
Address comments in https://review.opendev.org/c/openstack/kolla-ansible/+/815043 Related-Bug: #1844710 Change-Id: Ibe51db5060e8d809539f5e929a65f285e0f7d343 Signed-off-by: Adrian Andreias <[email protected]> (cherry picked from commit 9dbd6d1)
1 parent e682741 commit 9a9b609

File tree

3 files changed

+29
-28
lines changed

3 files changed

+29
-28
lines changed

doc/source/conf.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
import os
1616
import sys
1717

18+
import openstackdocstheme
19+
20+
1821
sys.path.insert(0, os.path.abspath('../..'))
1922
# -- General configuration ----------------------------------------------------
2023

@@ -114,18 +117,15 @@
114117
# For replacement, use in docs as |VAR_NAME| (note there's no space around variable name)
115118
# When adding new variables, make sure you add them to GLOBAL_VARIABLE_MAP dictionary as well
116119

117-
KOLLA_ANSIBLE_MAJOR_VERSION = '9'
118-
119-
# use 'master' or release name, e.g. 'victoria', 'xena' etc.
120-
KOLLA_OPENSTACK_RELEASE = 'master'
120+
KOLLA_OPENSTACK_RELEASE = openstackdocstheme.ext._get_series_name()
121121

122-
if KOLLA_OPENSTACK_RELEASE == 'master':
123-
KOLLA_BRANCH_NAME = KOLLA_OPENSTACK_RELEASE
122+
if KOLLA_OPENSTACK_RELEASE == 'latest':
123+
KOLLA_OPENSTACK_RELEASE = 'master'
124+
KOLLA_BRANCH_NAME = 'master'
124125
else:
125126
KOLLA_BRANCH_NAME = 'stable/{}'.format(KOLLA_OPENSTACK_RELEASE)
126127

127128
GLOBAL_VARIABLE_MAP = {
128-
"|KOLLA_ANSIBLE_MAJOR_VERSION|": KOLLA_ANSIBLE_MAJOR_VERSION,
129129
"|KOLLA_OPENSTACK_RELEASE|": KOLLA_OPENSTACK_RELEASE,
130130
"|KOLLA_BRANCH_NAME|": KOLLA_BRANCH_NAME,
131131
}

doc/source/user/operating-kolla.rst

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ release. Alpha tag usage is at discretion of the operator. The alpha identifier
2222
could be a number as recommended or a string of the operator's choosing.
2323

2424
To customize the version number uncomment ``openstack_release`` in globals.yml
25-
and specify the version number desired. If ``openstack_release`` is not
26-
specified, Kolla will deploy or upgrade using the version number information
27-
contained in the kolla-ansible package.
25+
and specify the desired version number or name (e.g. ``victoria``,
26+
``wallaby``). If ``openstack_release`` is not specified, Kolla will deploy or
27+
upgrade using the version number information contained in the kolla-ansible
28+
package.
2829

2930
Upgrade procedure
3031
~~~~~~~~~~~~~~~~~
@@ -91,32 +92,34 @@ should be upgraded first. This will include reviewing some of the configuration
9192
and inventory files. On the operator/master node, a backup of the
9293
``/etc/kolla`` directory may be desirable.
9394

94-
If upgrading from ``5.0.0`` to ``6.0.0``, upgrade the kolla-ansible package:
95+
If upgrading to ``|KOLLA_OPENSTACK_RELEASE|``, upgrade the kolla-ansible
96+
package:
9597

9698
.. code-block:: console
9799
98-
pip install --upgrade kolla-ansible==6.0.0
100+
pip install --upgrade git+https://opendev.org/openstack/kolla-ansible@|KOLLA_BRANCH_NAME|
99101
100102
If this is a minor upgrade, and you do not wish to upgrade kolla-ansible
101103
itself, you may skip this step.
102104

103105
The inventory file for the deployment should be updated, as the newer sample
104106
inventory files may have updated layout or other relevant changes.
105-
Use the newer ``6.0.0`` one as a starting template, and merge your existing
106-
inventory layout into a copy of the one from here::
107+
Use the newer ``|KOLLA_OPENSTACK_RELEASE|`` one as a starting template, and
108+
merge your existing inventory layout into a copy of the one from here::
107109

108110
/usr/share/kolla-ansible/ansible/inventory/
109111

110-
In addition the ``6.0.0`` sample configuration files should be taken from::
112+
In addition the ``|KOLLA_OPENSTACK_RELEASE|`` sample configuration files should
113+
be taken from::
111114

112115
# CentOS
113116
/usr/share/kolla-ansible/etc_examples/kolla
114117

115118
# Ubuntu
116119
/usr/local/share/kolla-ansible/etc_examples/kolla
117120

118-
At this stage, files that are still at the ``5.0.0`` version - which need
119-
manual updating are:
121+
At this stage, files that are still at the previous version and need manual
122+
updating are:
120123

121124
- ``/etc/kolla/globals.yml``
122125
- ``/etc/kolla/passwords.yml``
@@ -126,18 +129,20 @@ template, and then replace the file in ``/etc/kolla`` with the updated version.
126129
For ``passwords.yml``, see the ``kolla-mergepwd`` instructions in
127130
`Tips and Tricks`.
128131

129-
For the kolla docker images, the ``openstack_release`` is updated to ``6.0.0``:
132+
For the kolla docker images, the ``openstack_release`` is updated to
133+
``|KOLLA_OPENSTACK_RELEASE|``:
130134

131135
.. code-block:: yaml
132136
133-
openstack_release: 6.0.0
137+
openstack_release: |KOLLA_OPENSTACK_RELEASE|
134138
135139
Once the kolla release, the inventory file, and the relevant configuration
136140
files have been updated in this way, the operator may first want to 'pull'
137-
down the images to stage the ``6.0.0`` versions. This can be done safely
138-
ahead of time, and does not impact the existing services. (optional)
141+
down the images to stage the ``|KOLLA_OPENSTACK_RELEASE|`` versions. This can
142+
be done safely ahead of time, and does not impact the existing services.
143+
(optional)
139144

140-
Run the command to pull the ``6.0.0`` images for staging:
145+
Run the command to pull the ``|KOLLA_OPENSTACK_RELEASE|`` images for staging:
141146

142147
.. code-block:: console
143148

doc/source/user/quickstart.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,23 +149,19 @@ Install Kolla-ansible
149149
Install Kolla-ansible for deployment or evaluation
150150
--------------------------------------------------
151151

152-
For a list of ``kolla-ansible`` versions compatible with each OpenStack release
153-
see `Kolla Ansible release notes
154-
<https://docs.openstack.org/releasenotes/kolla-ansible/>`__.
155-
156152
#. Install kolla-ansible and its dependencies using ``pip``.
157153

158154
If using a virtual environment:
159155

160156
.. code-block:: console
161157
162-
pip install 'kolla-ansible == |KOLLA_ANSIBLE_MAJOR_VERSION|.*'
158+
pip install git+https://opendev.org/openstack/kolla-ansible@|KOLLA_BRANCH_NAME|
163159
164160
If not using a virtual environment:
165161

166162
.. code-block:: console
167163
168-
sudo pip3 install 'kolla-ansible == |KOLLA_ANSIBLE_MAJOR_VERSION|.*'
164+
sudo pip3 install git+https://opendev.org/openstack/kolla-ansible@|KOLLA_BRANCH_NAME|
169165
170166
#. Create the ``/etc/kolla`` directory.
171167

0 commit comments

Comments
 (0)