Skip to content

Commit 8acf6a7

Browse files
MoteHuejovial
authored andcommitted
Deprecate kolla-tags and kolla-limit
Deprecates the options ``--kolla-tags``, ``--kolla-skip-tags``, and ``kolla-limit``. Regular ``--tags``, ``--skip-tags``, and ``--limit`` will now be passed directly to the Kolla-Ansible invocations. The ``kayobe-generate-config`` tag is added to ``kolla-ansible.yml`` and ``kolla-openstack.yml``. It is always called, to allow for limiting to OpenStack services with just one tag, e.g. ``kayobe overcloud service deploy -t nova`. You can still skip this with ``--skip-tags kayobe-generate-config``. Also adds the ``bifrost`` tag to ``kolla-bifrost.yml``, so that we can easily limit to bifrost in the seed service deploy. As there is no clean way to handle some of Ansible's "special" tags like ``none``, using both regular and kolla tags/limits together is no longer allowed. Change-Id: I6f466305d49031da4d048f8fa7d2625b261a6fa0 Signed-off-by: Matt Crees <mattc@stackhpc.com> Co-Authored-By: Will Szumski <will@stackhpc.com>
1 parent d679f16 commit 8acf6a7

17 files changed

Lines changed: 209 additions & 70 deletions

ansible/kayobe-target-venv.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
filter: "{{ kayobe_ansible_setup_filter }}"
2727
gather_subset: "{{ kayobe_ansible_setup_gather_subset }}"
2828
when:
29-
- ansible_facts is undefined or ansible_facts is falsy
29+
#TODO(mattcrees): Enable this check once this bug is fixed:
30+
# https://bugs.launchpad.net/kayobe/+bug/2144548
31+
# - ansible_facts is undefined or ansible_facts is falsy
3032
- kayobe_virtualenv is defined
3133
register: gather_facts_result
3234
# Before any facts are gathered, ansible doesn't know about

ansible/kolla-ansible.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
tags:
1010
- kolla-ansible
1111
- config-validation
12+
- kayobe-generate-config
1213
tasks:
1314
- name: Validate serial console configuration
1415
block:
@@ -26,6 +27,7 @@
2627
hosts: localhost
2728
tags:
2829
- kolla-ansible
30+
- kayobe-generate-config
2931
gather_facts: false
3032
pre_tasks:
3133
- block:
@@ -113,6 +115,7 @@
113115
- config
114116
- config-validation
115117
- kolla-ansible
118+
- kayobe-generate-config
116119
gather_facts: False
117120
tasks:
118121
- name: Set Kolla Ansible host variables
@@ -142,6 +145,7 @@
142145
- config
143146
- config-validation
144147
- kolla-ansible
148+
- kayobe-generate-config
145149
gather_facts: False
146150
tasks:
147151
- name: Set Kolla Ansible host variables

ansible/kolla-bifrost.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
hosts: localhost
44
tags:
55
- kolla-bifrost
6+
- bifrost
67
roles:
78
- role: kolla-bifrost
89

ansible/kolla-openstack.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- config-validation
88
- kolla-ansible
99
- kolla-openstack
10+
- kayobe-generate-config
1011
tasks:
1112
- name: Create controllers group with ironic enabled
1213
group_by:
@@ -19,6 +20,7 @@
1920
tags:
2021
- kolla-ansible
2122
- kolla-openstack
23+
- kayobe-generate-config
2224
vars:
2325
# These are the filenames generated by overcloud-ipa-build.yml.
2426
ipa_image_name: "ipa"
@@ -57,6 +59,7 @@
5759
tags:
5860
- kolla-ansible
5961
- kolla-openstack
62+
- kayobe-generate-config
6063
vars:
6164
switch_type_to_device_type:
6265
arista: netmiko_arista_eos

doc/source/administration/overcloud.rst

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ necessary to update these prior to running a package update. To do this, update
1515
the configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
1616
command::
1717

18-
(kayobe) $ kayobe overcloud host configure --tags dnf --kolla-tags none
18+
(kayobe) $ kayobe overcloud host configure --tags dnf
1919

2020
Package Update
2121
--------------
@@ -80,10 +80,9 @@ improved by specifying Ansible tags to limit the tasks run in kayobe and/or
8080
kolla-ansible's playbooks. This may require knowledge of the inner workings of
8181
these tools but in general, kolla-ansible tags the play used to configure each
8282
service by the name of that service. For example: ``nova``, ``neutron`` or
83-
``ironic``. Use ``-t`` or ``--tags`` to specify kayobe tags and ``-kt`` or
84-
``--kolla-tags`` to specify kolla-ansible tags. For example::
83+
``ironic``. Use ``-t`` or ``--tags`` to specify tags. For example::
8584

86-
(kayobe) $ kayobe overcloud service reconfigure --tags config --kolla-tags nova,ironic
85+
(kayobe) $ kayobe overcloud service reconfigure --tags nova,ironic
8786

8887
Deploying Updated Container Images
8988
==================================
@@ -105,10 +104,9 @@ improved by specifying Ansible tags to limit the tasks run in kayobe and/or
105104
kolla-ansible's playbooks. This may require knowledge of the inner workings of
106105
these tools but in general, kolla-ansible tags the play used to configure each
107106
service by the name of that service. For example: ``nova``, ``neutron`` or
108-
``ironic``. Use ``-t`` or ``--tags`` to specify kayobe tags and ``-kt`` or
109-
``--kolla-tags`` to specify kolla-ansible tags. For example::
107+
``ironic``. Use ``-t`` or ``--tags`` to specify tags. For example::
110108

111-
(kayobe) $ kayobe overcloud service deploy containers --kolla-tags nova,ironic
109+
(kayobe) $ kayobe overcloud service deploy containers --tags nova,ironic
112110

113111
Upgrading Containerised Services
114112
================================
@@ -126,9 +124,9 @@ To upgrade the containerised control plane services::
126124
(kayobe) $ kayobe overcloud service upgrade
127125

128126
As for the reconfiguration command, it is possible to specify tags for Kayobe
129-
and/or kolla-ansible::
127+
and kolla-ansible::
130128

131-
(kayobe) $ kayobe overcloud service upgrade --tags config --kolla-tags keystone
129+
(kayobe) $ kayobe overcloud service upgrade --tags keystone
132130

133131
Running Prechecks
134132
=================
@@ -137,10 +135,10 @@ Sometimes it may be useful to run prechecks without deploying services::
137135

138136
(kayobe) $ kayobe overcloud service prechecks
139137

140-
As for other similar commands, it is possible to specify tags for Kayobe and/or
138+
As for other similar commands, it is possible to specify tags for Kayobe and
141139
kolla-ansible::
142140

143-
(kayobe) $ kayobe overcloud service upgrade --tags config --kolla-tags keystone
141+
(kayobe) $ kayobe overcloud service upgrade --tags keystone
144142

145143
Stopping the Overcloud Services
146144
===============================
@@ -156,12 +154,11 @@ To stop the overcloud services::
156154
It should be noted that this state is persistent - containers will remain
157155
stopped after a reboot of the host on which they are running.
158156

159-
It is possible to limit the operation to particular hosts via
160-
``--kolla-limit``, or to particular services via ``--kolla-tags``. It is also
161-
possible to avoid stopping the common containers via ``--kolla-skip-tags
162-
common``. For example:
157+
It is possible to limit the operation to particular hosts via ``--limit``, or
158+
to particular services via ``--tags``. It is also possible to avoid stopping
159+
the common containers via ``--skip-tags common``. For example:
163160

164-
(kayobe) $ kayobe overcloud service stop --kolla-tags glance,nova --kolla-skip-tags common
161+
(kayobe) $ kayobe overcloud service stop --tags glance,nova --skip-tags common
165162

166163
Destroying the Overcloud Services
167164
=================================

doc/source/administration/seed.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ To destroy the seed services::
3131

3232
This can optionally be used with a tag::
3333

34-
(kayobe) $ kayobe seed service destroy --yes-i-really-really-mean-it -kt none -t docker-registry
35-
36-
Care must be taken to set both kayobe and kolla tags to avoid accidentally
37-
destroying other services.
34+
(kayobe) $ kayobe seed service destroy --yes-i-really-really-mean-it -t docker-registry
3835

3936
Updating Packages
4037
=================
@@ -49,7 +46,7 @@ necessary to update these prior to running a package update. To do this, update
4946
the configuration in ``${KAYOBE_CONFIG_PATH}/dnf.yml`` and run the following
5047
command::
5148

52-
(kayobe) $ kayobe seed host configure --tags dnf --kolla-tags none
49+
(kayobe) $ kayobe seed host configure --tags dnf
5350

5451
Package Update
5552
--------------

doc/source/configuration/reference/vgpu.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ To apply the configuration to Nova:
226226

227227
.. code:: shell
228228
229-
(kayobe) $ kayobe overcloud service deploy -kt nova
229+
(kayobe) $ kayobe overcloud service deploy -t nova
230230
231231
OpenStack flavors
232232
=================
@@ -307,4 +307,4 @@ Reconfigure nova to match the change:
307307

308308
.. code:: shell
309309
310-
(kayobe) $ kayobe overcloud service reconfigure -kt nova --kolla-limit computegpu000 --skip-prechecks
310+
(kayobe) $ kayobe overcloud service reconfigure -t nova --limit computegpu000 --skip-prechecks

doc/source/deployment.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,10 @@ After this command has completed the seed services will be active.
217217

218218
.. note::
219219

220-
Bifrost deployment behaviour is split between Kayobe and Kolla-Ansible. As
221-
such, you should use both ``--tags kolla-bifrost`` and ``--kolla-tags
222-
bifrost`` if you want to limit to Bifrost deployment.
220+
You can use ``--tags bifrost`` if you want to limit to just the Bifrost
221+
deployment. Note however that using tags is not tested in either Kayobe or
222+
Kolla-Ansible CI, and as such should only be used if you know what you're
223+
doing. Proceed with caution.
223224

224225
.. seealso::
225226

doc/source/upgrading.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,13 @@ To upgrade the containerised control plane services::
450450

451451
(kayobe) $ kayobe overcloud service upgrade
452452

453-
It is possible to specify tags for Kayobe and/or kolla-ansible to restrict the
453+
It is possible to specify tags for Kayobe and kolla-ansible to restrict the
454454
scope of the upgrade::
455455

456-
(kayobe) $ kayobe overcloud service upgrade --tags config --kolla-tags keystone
456+
(kayobe) $ kayobe overcloud service upgrade --tags keystone
457+
458+
.. note::
459+
460+
Using tags is not tested in either Kayobe or Kolla-Ansible CI, and as such
461+
should only be used if you know what you're doing. Proceed with caution.
462+

doc/source/usage.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ Limiting Hosts
6363

6464
Sometimes it may be necessary to limit execution of kayobe or kolla-ansible
6565
plays to a subset of the hosts. The ``--limit <SUBSET>`` argument allows the
66-
kayobe ansible hosts to be limited. The ``--kolla-limit <SUBSET>`` argument
67-
allows the kolla-ansible hosts to be limited. These two options may be
68-
combined in a single command. In both cases, the argument provided should be
66+
kayobe and kolla-ansible hosts to be limited. The argument provided should be
6967
an `Ansible host pattern
7068
<http://docs.ansible.com/ansible/latest/intro_patterns.html>`_, and will
71-
ultimately be passed to ``ansible-playbook`` as a ``--limit`` argument.
69+
ultimately be passed to ``ansible-playbook`` for both kayobe and kolla-ansible
70+
as a ``--limit`` argument.
7271

7372
.. _usage-tags:
7473

@@ -77,12 +76,15 @@ Tags
7776

7877
`Ansible tags <http://docs.ansible.com/ansible/latest/playbooks_tags.html>`_
7978
provide a useful mechanism for executing a subset of the plays or tasks in a
80-
playbook. The ``--tags <TAGS>`` argument allows execution of kayobe ansible
81-
playbooks to be limited to matching plays and tasks. The ``--kolla-tags
82-
<TAGS>`` argument allows execution of kolla-ansible ansible playbooks to be
83-
limited to matching plays and tasks. The ``--skip-tags <TAGS>`` and
84-
``--kolla-skip-tags <TAGS>`` arguments allow for avoiding execution of matching
85-
plays and tasks.
79+
playbook. The ``--tags <TAGS>`` argument allows execution of kayobe and
80+
kolla-ansible playbooks to be limited to matching plays and tasks. The
81+
``--skip-tags <TAGS>`` argument allows for avoiding execution of matching plays
82+
and tasks.
83+
84+
.. note::
85+
86+
Using tags is not tested in either Kayobe or Kolla-Ansible CI, and as such
87+
should only be used if you know what you're doing. Proceed with caution.
8688

8789
Check and diff mode
8890
-------------------

0 commit comments

Comments
 (0)