File tree Expand file tree Collapse file tree 2 files changed +41
-4
lines changed Expand file tree Collapse file tree 2 files changed +41
-4
lines changed Original file line number Diff line number Diff line change 104
104
'swift' ,
105
105
'watcher' ,
106
106
]
107
+
108
+ # Global variables
109
+ # For replacement, use in docs as |VAR_NAME| (note there's no space around variable name)
110
+ # When adding new variables, make sure you add them to GLOBAL_VARIABLE_MAP dictionary as well
111
+
112
+ KOLLA_ANSIBLE_MAJOR_VERSION = '9'
113
+
114
+ # use 'master' or release name, e.g. 'victoria', 'xena' etc.
115
+ KOLLA_OPENSTACK_RELEASE = 'master'
116
+
117
+ if KOLLA_OPENSTACK_RELEASE == 'master' :
118
+ KOLLA_BRANCH_NAME = KOLLA_OPENSTACK_RELEASE
119
+ else :
120
+ KOLLA_BRANCH_NAME = 'stable/{}' .format (KOLLA_OPENSTACK_RELEASE )
121
+
122
+ GLOBAL_VARIABLE_MAP = {
123
+ "|KOLLA_ANSIBLE_MAJOR_VERSION|" : KOLLA_ANSIBLE_MAJOR_VERSION ,
124
+ "|KOLLA_OPENSTACK_RELEASE|" : KOLLA_OPENSTACK_RELEASE ,
125
+ "|KOLLA_BRANCH_NAME|" : KOLLA_BRANCH_NAME ,
126
+ }
127
+
128
+ def replace_global_vars (app , docname , source ):
129
+ # unlike rst_epilog, replaces variables (strings) in code blocks as well
130
+ # thanks to https://github.com/sphinx-doc/sphinx/issues/4054#issuecomment-329097229
131
+ result = source [0 ]
132
+ for key in app .config .GLOBAL_VARIABLE_MAP :
133
+ result = result .replace (key , app .config .GLOBAL_VARIABLE_MAP [key ])
134
+ source [0 ] = result
135
+
136
+
137
+ def setup (app ):
138
+ app .add_config_value ('GLOBAL_VARIABLE_MAP' , {}, True )
139
+ app .connect ('source-read' , replace_global_vars )
Original file line number Diff line number Diff line change @@ -149,19 +149,23 @@ Install Kolla-ansible
149
149
Install Kolla-ansible for deployment or evaluation
150
150
--------------------------------------------------
151
151
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
+
152
156
#. Install kolla-ansible and its dependencies using ``pip ``.
153
157
154
158
If using a virtual environment:
155
159
156
160
.. code-block :: console
157
161
158
- pip install kolla-ansible
162
+ pip install ' kolla-ansible == |KOLLA_ANSIBLE_MAJOR_VERSION|.*'
159
163
160
164
If not using a virtual environment:
161
165
162
166
.. code-block :: console
163
167
164
- sudo pip3 install kolla-ansible
168
+ sudo pip3 install ' kolla-ansible == |KOLLA_ANSIBLE_MAJOR_VERSION|.*'
165
169
166
170
#. Create the ``/etc/kolla `` directory.
167
171
@@ -206,8 +210,8 @@ Install Kolla for development
206
210
207
211
.. code-block :: console
208
212
209
- git clone https://github.com /openstack/kolla
210
- git clone https://github.com /openstack/kolla-ansible
213
+ git clone --branch |KOLLA_BRANCH_NAME| https://opendev.org /openstack/kolla
214
+ git clone --branch |KOLLA_BRANCH_NAME| https://opendev.org /openstack/kolla-ansible
211
215
212
216
#. Install requirements of ``kolla `` and ``kolla-ansible ``:
213
217
You can’t perform that action at this time.
0 commit comments