Skip to content

Commit 79d29b9

Browse files
author
Dmitriy Rabotyagov
committed
Resolve invalid chars in groups
Since ansible 2.8, usage of dashes in group names is against convention, so by default Ansible issues a warning for such group names. This patch aims to finaly rename groups for all new deployments, while making the transition for existing ones as smooth as possible. For existing deployments old defenitions will be respected, and a new set of groups produced. It's up do operators to perform the clean up of old groups. We also change the value of ANSIBLE_TRANSFORM_INVALID_GROUP_CHARS to show the warning, but konvert groups names to the new format. This is needed to ensure roles and playbooks will have expected group names in them, even though this may affect negatively cases, where OSA deploy hosts are also being used for internal operations. Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/978458 Change-Id: I94907bcce7947df48f8cd19c3a79a8c7242dbc2d Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
1 parent 27e8797 commit 79d29b9

90 files changed

Lines changed: 741 additions & 487 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/source/admin/scale-environment/scaling-mariadb-rabbitmq.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ Assuming, you currently have a config like the one below in your
467467
control03:
468468
ip: 172.29.236.13
469469
470-
shared-infra_hosts: *control_hosts
470+
shared_infra_hosts: *control_hosts
471471
472472
Convert it to something like this:
473473

@@ -494,7 +494,7 @@ Convert it to something like this:
494494
ip: 172.29.236.23
495495
496496
In the example above we de-couple each service that is part of the
497-
`shared-infra_hosts` and define them separately, along with providing MariaDB
497+
`shared_infra_hosts` and define them separately, along with providing MariaDB
498498
its new destination host.
499499

500500
* Create the container on the new infra node:
@@ -586,7 +586,7 @@ this:
586586
587587
.. note::
588588

589-
Ensure that you don’t have more generic shared-infra_hosts defined.
589+
Ensure that you don’t have more generic shared_infra_hosts defined.
590590

591591
Now we need to manually re-generate the inventory and ensure that a new
592592
record was mapped to our infra01:

doc/source/admin/scale-environment/use-ansible-tags.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Example:
9999

100100
.. code-block:: shell-session
101101
102-
# openstack-ansible haproxy-install.yml --tags haproxy-service-config
102+
# openstack-ansible openstack.osa.haproxy --tags haproxy-service-config
103103
104104
ceph
105105
----
@@ -112,7 +112,7 @@ Example:
112112

113113
.. code-block:: shell-session
114114
115-
# openstack-ansible ceph-install.yml --tags ceph
115+
# openstack-ansible openstack.osa.ceph_install --tags ceph
116116
117117
uwsgi
118118
-----

doc/source/deploy-guide/source/configure.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ host.
7272

7373
The configuration in the ``openstack_user_config.yml`` file defines which hosts
7474
run the containers and services deployed by OpenStack-Ansible. For
75-
example, hosts listed in the ``shared-infra_hosts`` section run containers for
75+
example, hosts listed in the ``shared_infra_hosts`` section run containers for
7676
many of the shared services that your OpenStack environment requires. Some of
7777
these services include databases, Memcached, and RabbitMQ. Several other
7878
host types contain other types of containers, and all of these are listed
@@ -111,11 +111,11 @@ the br-mgmt container management bridge on each target host.
111111
br-mgmt interface, please, refer to the `guide <https://docs.openstack.org/openstack-ansible/latest/reference/inventory/configure-inventory.html#having-ssh-network-different-from-openstack-management-network>`_.
112112

113113
#. Configure a list containing at least three infrastructure
114-
target hosts in the ``shared-infra_hosts`` section:
114+
target hosts in the ``shared_infra_hosts`` section:
115115

116116
.. code-block:: yaml
117117
118-
shared-infra_hosts:
118+
shared_infra_hosts:
119119
infra01:
120120
ip: INFRA01_IP_ADDRESS
121121
infra02:
@@ -139,25 +139,25 @@ the br-mgmt container management bridge on each target host.
139139

140140
.. code-block:: yaml
141141
142-
network-infra_hosts:
142+
network_infra_hosts:
143143
infra01:
144144
ip: INFRA01_IP_ADDRESS
145145
infra02: ...
146146
147-
network-northd_hosts:
147+
network_northd_hosts:
148148
infra01:
149149
ip: INFRA01_IP_ADDRESS
150150
infra02: ...
151151
152152
When deploying OpenStack with OVN, it's essential to properly configure
153-
``network-gateway_hosts`` depending on your network architecture. There are
153+
``network_gateway_hosts`` depending on your network architecture. There are
154154
two typical scenarios:
155155

156156
Scenario 1: DVR with gateway on compute nodes:
157157

158158
.. code-block:: yaml
159159
160-
network-gateway_hosts:
160+
network_gateway_hosts:
161161
compute01:
162162
ip: COMPUTE01_IP_ADDRESS
163163
compute02: ...
@@ -166,7 +166,7 @@ the br-mgmt container management bridge on each target host.
166166

167167
.. code-block:: yaml
168168
169-
network-gateway_hosts:
169+
network_gateway_hosts:
170170
network01:
171171
ip: NETWORK01_IP_ADDRESS
172172
network02: ...
@@ -182,11 +182,11 @@ the br-mgmt container management bridge on each target host.
182182
compute02: ...
183183
184184
#. Configure a list containing at least one repository target host in
185-
the ``repo-infra_hosts`` section:
185+
the ``repo_infra_hosts`` section:
186186

187187
.. code-block:: yaml
188188
189-
repo-infra_hosts:
189+
repo_infra_hosts:
190190
infra01:
191191
ip: INFRA01_IP_ADDRESS
192192
infra02:

doc/source/reference/inventory/configure-inventory.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,32 +180,32 @@ In order to achieve that we need:
180180

181181
.. code-block:: yaml
182182
183-
az1-infra_hosts: &infra_az1
183+
az1_infra_hosts: &infra_az1
184184
az1-infra1:
185185
ip: 172.39.123.11
186186
187-
az2-infra_hosts: &infra_az2
187+
az2_infra_hosts: &infra_az2
188188
az2-infra2:
189189
ip: 172.39.123.12
190190
191-
az3-infra_hosts: &infra_az3
191+
az3_infra_hosts: &infra_az3
192192
az3-infra3:
193193
ip: 172.39.123.13
194194
195-
shared-infra_hosts: &controllers
195+
shared_infra_hosts: &controllers
196196
<<: *infra_az1
197197
<<: *infra_az2
198198
<<: *infra_az3
199199
200-
az1-compute_hosts: &computes_az1
200+
az1_compute_hosts: &computes_az1
201201
az1-compute01:
202202
ip: 172.39.123.100
203203
204-
az2-compute_hosts: &computes_az2
204+
az2_compute_hosts: &computes_az2
205205
az2-compute01:
206206
ip: 172.39.123.150
207207
208-
az3-compute_hosts: &computes_az3
208+
az3_compute_hosts: &computes_az3
209209
az3-compute01:
210210
ip: 172.39.123.200
211211
@@ -281,20 +281,20 @@ When OpenStack-Ansible generates its dynamic inventory, the affinity
281281
setting determines how many containers of a similar type are deployed on a
282282
single physical host.
283283

284-
Using ``shared-infra_hosts`` as an example, consider this
284+
Using ``shared_infra_hosts`` as an example, consider this
285285
``openstack_user_config.yml`` configuration:
286286

287287
.. code-block:: yaml
288288
289-
shared-infra_hosts:
289+
shared_infra_hosts:
290290
infra1:
291291
ip: 172.29.236.101
292292
infra2:
293293
ip: 172.29.236.102
294294
infra3:
295295
ip: 172.29.236.103
296296
297-
Three hosts are assigned to the ``shared-infra_hosts`` group,
297+
Three hosts are assigned to the ``shared_infra_hosts`` group,
298298
OpenStack-Ansible ensures that each host runs a single database container,
299299
a single Memcached container, and a single RabbitMQ container. Each host has
300300
an affinity of 1 by default, which means that each host runs one of each
@@ -306,7 +306,7 @@ your ``openstack_user_config.yml`` file would look as follows:
306306

307307
.. code-block:: yaml
308308
309-
shared-infra_hosts:
309+
shared_infra_hosts:
310310
infra1:
311311
affinity:
312312
rabbit_mq_container: 0
@@ -356,7 +356,7 @@ Example:
356356

357357
.. code-block:: yaml
358358
359-
shared-infra_hosts:
359+
shared_infra_hosts:
360360
infra1:
361361
ip: 192.168.0.101
362362
management_ip: 172.29.236.101

doc/source/reference/inventory/understanding-inventory.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ the ``conf.d/`` directory is identical to the syntax used in the
3434
``openstack_user_config.yml`` file.
3535

3636
In these files, the target hosts are listed under one or more
37-
headings, such as ``shared-infra_hosts`` or ``storage_hosts``, which serve as
37+
headings, such as ``shared_infra_hosts`` or ``storage_hosts``, which serve as
3838
Ansible group mappings. These groups map to the physical
3939
hosts.
4040

@@ -66,11 +66,11 @@ groups, that define where each service deploys. By reviewing files within the
6666
in the default layout.
6767

6868
For example, the ``shared-infra.yml`` file defines a container group,
69-
``shared-infra_containers``, as a subset of the ``all_containers``
70-
inventory group. The ``shared- infra_containers`` container group is
71-
mapped to the ``shared-infra_hosts`` host group. All of the service
72-
components in the ``shared-infra_containers`` container group are
73-
deployed to each target host in the ``shared-infra_hosts host`` group.
69+
``shared_infra_containers``, as a subset of the ``all_containers``
70+
inventory group. The ``shared_infra_containers`` container group is
71+
mapped to the ``shared_infra_hosts`` host group. All of the service
72+
components in the ``shared_infra_containers`` container group are
73+
deployed to each target host in the ``shared_infra_hosts host`` group.
7474

7575
Within a ``physical_skel`` section, the OpenStack-Ansible dynamic inventory
7676
expects to find a pair of keys. The first key maps to items in the
@@ -79,7 +79,7 @@ expects to find a pair of keys. The first key maps to items in the
7979

8080
To continue the example, the ``memcache.yml`` file defines the
8181
``memcache_container`` container group. This group is a subset of the
82-
``shared-infra_containers`` group, which is itself a subset of
82+
``shared_infra_containers`` group, which is itself a subset of
8383
the ``all_containers`` inventory group.
8484

8585
.. note::

doc/source/user/ceph/full-deploy.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ the Ceph backend for images, volumes, and instances.
1010

1111
This example environment has the following characteristics:
1212

13-
* Three infrastructure (control plane) hosts with ceph-mon containers
13+
* Three infrastructure (control plane) hosts with ``ceph_mon`` containers
1414
* Two compute hosts
1515
* Three Ceph OSD storage hosts
1616
* One log aggregation host
@@ -63,10 +63,11 @@ integration in three ways:
6363
No ssh access by OpenStack-Ansible is required to the ceph cluster.
6464
* deploying a ceph cluster as part of the OpenStack-Ansible deployment
6565
by using the roles maintained by the `Ceph-Ansible`_ project. Deployers
66-
can enable the ``ceph-install.yml`` playbook by adding hosts to the
67-
``ceph-mon_hosts`` and ``ceph-osd_hosts`` groups in
68-
``openstack_user_config.yml``. In order to enable ``ceph-rgw-install.yml``
69-
playbook you need to add ``ceph-rgw_hosts`` in ``openstack_user_config.yml``.
66+
can enable the ``openstack.osa.ceph_install`` playbook by adding hosts to
67+
the ``ceph_mon_hosts`` and ``ceph_osd_hosts`` groups in
68+
``openstack_user_config.yml``. In order to enable
69+
``openstack.osa.ceph_rgw_install`` playbook you need to add
70+
``ceph_rgw_hosts`` in ``openstack_user_config.yml``.
7071

7172
.. note::
7273

doc/source/user/ceph/swift.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ OpenStack-Ansible gives you the option of deploying Ceph Object Gateway
77

88
In particular, the ``openstack.osa.ceph_rgw_install`` playbook
99
(which includes ``openstack.osa.ceph_rgw_keystone_setup``) will deploy
10-
radosgw to any ``ceph-rgw`` hosts, and create a corresponding Keystone
10+
radosgw to any ``ceph_rgw`` hosts, and create a corresponding Keystone
1111
``object-store`` service catalog entry. The service endpoints do
1212
contain the ``AUTH_%(tenant_id)s`` prefix just like in native Swift,
1313
so public read ACLs and temp URLs will work just like they do in
@@ -25,9 +25,9 @@ is an example configuration snippet:
2525

2626
.. note::
2727

28-
Mentioned below overrides are default ones and will be applied to `ceph-rgw` group
28+
Mentioned below overrides are default ones and will be applied to `ceph_rgw` group
2929

30-
.. literalinclude:: ../../../../inventory/group_vars/ceph-rgw.yml
30+
.. literalinclude:: ../../../../inventory/group_vars/ceph_rgw.yml
3131

3232
You may also want to add the ``rgw_dns_name`` option if you want to
3333
enable bucket hostnames with the S3 API.

doc/source/user/l3pods/multi_az.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ There are multiple complications related to organizing storage where the storage
6969
First, there is only a single controller in any given Availability
7070
Zone, while multiple copies of ``cinder_volume`` needs to be run for
7171
each storage provider for High Availability. As ``cinder_volume`` needs
72-
access to storage network, one of the best places for it are ``ceph-mon``
72+
access to storage network, one of the best places for it are ``ceph_mon``
7373
hosts.
7474

7575
Another challenge is to organize shared storage for Glance Images, as
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
metering-alarm_hosts:
1+
metering_alarm_hosts:
22
aio1:
33
ip: {{ bootstrap_host_public_address }}
44
management_ip: {{ bootstrap_host_management_address }}

etc/openstack_deploy/conf.d/aodh.yml.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The infra nodes that will be running the alarming services
2-
metering-alarm_hosts:
2+
metering_alarm_hosts:
33
infra1:
44
ip: 172.20.236.111
55
infra2:

0 commit comments

Comments
 (0)