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 109
109
'swift' ,
110
110
'watcher' ,
111
111
]
112
+
113
+ # Global variables
114
+ # For replacement, use in docs as |VAR_NAME| (note there's no space around variable name)
115
+ # When adding new variables, make sure you add them to GLOBAL_VARIABLE_MAP dictionary as well
116
+
117
+ KOLLA_ANSIBLE_MAJOR_VERSION = '9'
118
+
119
+ # use 'master' or release name, e.g. 'victoria', 'xena' etc.
120
+ KOLLA_OPENSTACK_RELEASE = 'master'
121
+
122
+ if KOLLA_OPENSTACK_RELEASE == 'master' :
123
+ KOLLA_BRANCH_NAME = KOLLA_OPENSTACK_RELEASE
124
+ else :
125
+ KOLLA_BRANCH_NAME = 'stable/{}' .format (KOLLA_OPENSTACK_RELEASE )
126
+
127
+ GLOBAL_VARIABLE_MAP = {
128
+ "|KOLLA_ANSIBLE_MAJOR_VERSION|" : KOLLA_ANSIBLE_MAJOR_VERSION ,
129
+ "|KOLLA_OPENSTACK_RELEASE|" : KOLLA_OPENSTACK_RELEASE ,
130
+ "|KOLLA_BRANCH_NAME|" : KOLLA_BRANCH_NAME ,
131
+ }
132
+
133
+ def replace_global_vars (app , docname , source ):
134
+ # unlike rst_epilog, replaces variables (strings) in code blocks as well
135
+ # thanks to https://github.com/sphinx-doc/sphinx/issues/4054#issuecomment-329097229
136
+ result = source [0 ]
137
+ for key in app .config .GLOBAL_VARIABLE_MAP :
138
+ result = result .replace (key , app .config .GLOBAL_VARIABLE_MAP [key ])
139
+ source [0 ] = result
140
+
141
+
142
+ def setup (app ):
143
+ app .add_config_value ('GLOBAL_VARIABLE_MAP' , {}, True )
144
+ 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