Skip to content

Commit

Permalink
Merge branch 'openstack:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
cityofships authored Dec 20, 2024
2 parents dd75eb7 + 9bdcb55 commit 5b2aa5e
Show file tree
Hide file tree
Showing 1,692 changed files with 26,788 additions and 22,412 deletions.
12 changes: 12 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
strict: true
use_default_rules: true
skip_list:
# [E301] Commands should not change things if nothing needs doing
Expand All @@ -24,3 +25,14 @@ skip_list:
- fqcn[action]
# role name check matching ^*$
- role-name
# TODO(frickler): Discuss these in detail, skipping for now to unblock things
- key-order[task]
- no-free-form
- name[play]
- var-naming[no-role-prefix]
- risky-file-permissions
- risky-shell-pipe
- command-instead-of-shell
- command-instead-of-module
- ignore-errors
- jinja[spacing]
3 changes: 3 additions & 0 deletions .codespell-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
assertIn
ist
solum
21 changes: 7 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Kolla Ansible deploys containers for the following OpenStack projects:
- `CloudKitty <https://docs.openstack.org/cloudkitty/latest/>`__
- `Cyborg <https://docs.openstack.org/cyborg/latest/>`__
- `Designate <https://docs.openstack.org/designate/latest/>`__
- `Freezer <https://docs.openstack.org/freezer/latest/>`__
- `Glance <https://docs.openstack.org/glance/latest/>`__
- `Heat <https://docs.openstack.org/heat/latest/>`__
- `Horizon <https://docs.openstack.org/horizon/latest/>`__
Expand All @@ -59,18 +58,14 @@ Kolla Ansible deploys containers for the following OpenStack projects:
- `Manila <https://docs.openstack.org/manila/latest/>`__
- `Masakari <https://docs.openstack.org/masakari/latest/>`__
- `Mistral <https://docs.openstack.org/mistral/latest/>`__
- `Monasca <https://docs.openstack.org/monasca-api/latest/>`__
- `Murano <https://docs.openstack.org/murano/latest/>`__
- `Neutron <https://docs.openstack.org/neutron/latest/>`__
- `Nova <https://docs.openstack.org/nova/latest/>`__
- `Octavia <https://docs.openstack.org/octavia/latest/>`__
- `Sahara <https://docs.openstack.org/sahara/latest/>`__
- `Senlin <https://docs.openstack.org/senlin/latest/>`__
- `Solum <https://docs.openstack.org/solum/latest/>`__
- Skyline (`APIServer <https://docs.openstack.org/skyline-apiserver/latest/>`__ and `Console <https://docs.openstack.org/skyline-console/latest/>`__)
- `Swift <https://docs.openstack.org/swift/latest/>`__
- `Tacker <https://docs.openstack.org/tacker/latest/>`__
- `Trove <https://docs.openstack.org/trove/latest/>`__
- `Vitrage <https://docs.openstack.org/vitrage/latest/>`__
- `Venus <https://docs.openstack.org/venus/latest/>`__
- `Watcher <https://docs.openstack.org/watcher/latest/>`__
- `Zun <https://docs.openstack.org/zun/latest/>`__

Expand All @@ -84,8 +79,8 @@ Kolla Ansible deploys containers for the following infrastructure components:
`InfluxDB <https://www.influxdata.com/products/influxdb-overview/>`__,
`Prometheus <https://prometheus.io/>`__, and
`Grafana <https://grafana.com/>`__ for performance monitoring.
- `Elasticsearch <https://www.elastic.co/de/products/elasticsearch/>`__ and
`Kibana <https://www.elastic.co/de/products/kibana/>`__ to search, analyze,
- `OpenSearch <https://opensearch.org/docs/latest/>`__ and
`OpenSearch Dashboards <https://opensearch.org/docs/latest/dashboards/index/>`__ to search, analyze,
and visualize log messages.
- `Etcd <https://etcd.io/>`__ a distributed reliable key-value store.
- `Fluentd <https://www.fluentd.org/>`__ as an open source data collector
Expand All @@ -101,8 +96,6 @@ Kolla Ansible deploys containers for the following infrastructure components:
- `RabbitMQ <https://www.rabbitmq.com/>`__ as a messaging backend for
communication between services.
- `Redis <https://redis.io/>`__ an in-memory data structure store.
- `Zookeeper <https://zookeeper.apache.org/>`__ an open-source server which enables
highly reliable distributed coordination.

Directories
===========
Expand Down Expand Up @@ -135,16 +128,16 @@ workflow <https://docs.openstack.org/infra/manual/developers.html>`__.
- File bugs, blueprints, track releases, etc on
`Launchpad <https://launchpad.net/kolla-ansible>`__.
- Attend weekly
`meetings <https://wiki.openstack.org/wiki/Meetings/Kolla>`__.
`meetings <https://docs.openstack.org/kolla/latest/contributor/meeting.html>`__.
- Contribute `code <https://opendev.org/openstack/kolla-ansible>`__.

Contributors
============

Check out who's `contributing
code <https://stackalytics.com/?module=kolla-group&metric=commits>`__ and
code <https://stackalytics.io/?module=kolla-group&metric=commits>`__ and
`contributing
reviews <https://stackalytics.com/?module=kolla-group&metric=marks>`__.
reviews <https://stackalytics.io/?module=kolla-group&metric=marks>`__.

Notices
=======
Expand Down
12 changes: 7 additions & 5 deletions ansible/action_plugins/merge_configs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# Copyright 2015 Sam Yaple
# Copyright 2017 99Cloud Inc.
#
Expand Down Expand Up @@ -173,12 +171,12 @@ def run(self, tmp=None, task_vars=None):
del tmp # not used

sources = self._task.args.get('sources', None)
whitespace = self._task.args.get('whitespace', True)

if not isinstance(sources, list):
sources = [sources]

config = OverrideConfigParser(
whitespace=self._task.args.get('whitespace', True))
config = OverrideConfigParser(whitespace=whitespace)

for source in sources:
self.read_config(source, config)
Expand Down Expand Up @@ -215,7 +213,11 @@ def run(self, tmp=None, task_vars=None):
loader=self._loader,
templar=self._templar,
shared_loader_obj=self._shared_loader_obj)
result.update(copy_action.run(task_vars=task_vars))
copy_result = copy_action.run(task_vars=task_vars)
copy_result['invocation']['module_args'].update({
'src': result_file, 'sources': sources,
'whitespace': whitespace})
result.update(copy_result)
finally:
shutil.rmtree(local_tempdir)
return result
29 changes: 21 additions & 8 deletions ansible/action_plugins/merge_yaml.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# Copyright 2015 Sam Yaple
# Copyright 2016 intel
#
Expand All @@ -19,8 +17,7 @@
import shutil
import tempfile

from yaml import dump
from yaml import safe_load
import yaml

from ansible import constants
from ansible import errors as ansible_errors
Expand Down Expand Up @@ -58,6 +55,14 @@
default: False
required: False
type: bool
yaml_width:
description:
- The maximum width of the YAML document. By default, Ansible uses the
PyYAML library which has a default 80 symbol string length limit.
To change the limit, the new value can be used here.
default: None
required: False
type: int
author: Sean Mooney
'''

Expand All @@ -71,6 +76,7 @@
sources:
- "/tmp/default.yml"
- "/tmp/override.yml"
yaml_width: 131072
dest:
- "/tmp/out.yml"
'''
Expand All @@ -83,7 +89,7 @@ class ActionModule(action.ActionBase):
def read_config(self, source):
result = None
# Only use config if present
if os.access(source, os.R_OK):
if source and os.access(source, os.R_OK):
with open(source, 'r') as f:
template_data = f.read()

Expand All @@ -96,7 +102,7 @@ def read_config(self, source):
self._templar.environment.loader.searchpath = searchpath

template_data = self._templar.template(template_data)
result = safe_load(template_data)
result = yaml.safe_load(template_data)
return result or {}

def run(self, tmp=None, task_vars=None):
Expand All @@ -116,6 +122,7 @@ def run(self, tmp=None, task_vars=None):
output = {}
sources = self._task.args.get('sources', None)
extend_lists = self._task.args.get('extend_lists', False)
yaml_width = self._task.args.get('yaml_width', None)
if not isinstance(sources, list):
sources = [sources]
for source in sources:
Expand All @@ -130,11 +137,13 @@ def run(self, tmp=None, task_vars=None):
try:
result_file = os.path.join(local_tempdir, 'source')
with open(result_file, 'w') as f:
f.write(dump(output, default_flow_style=False))
f.write(yaml.dump(output, default_flow_style=False,
width=yaml_width))

new_task = self._task.copy()
new_task.args.pop('sources', None)
new_task.args.pop('extend_lists', None)
new_task.args.pop('yaml_width', None)
new_task.args.update(
dict(
src=result_file
Expand All @@ -149,7 +158,11 @@ def run(self, tmp=None, task_vars=None):
loader=self._loader,
templar=self._templar,
shared_loader_obj=self._shared_loader_obj)
result.update(copy_action.run(task_vars=task_vars))
copy_result = copy_action.run(task_vars=task_vars)
copy_result['invocation']['module_args'].update({
'src': result_file, 'sources': sources,
'extend_lists': extend_lists})
result.update(copy_result)
finally:
shutil.rmtree(local_tempdir)
return result
Expand Down
4 changes: 4 additions & 0 deletions ansible/destroy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
---
- name: Apply role destroy
hosts: all
max_fail_percentage: >-
{{ destroy_max_fail_percentage |
default(kolla_max_fail_percentage) |
default(100) }}
roles:
- destroy
2 changes: 2 additions & 0 deletions ansible/filter_plugins/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# limitations under the License.

from kolla_ansible.kolla_address import kolla_address
from kolla_ansible.kolla_url import kolla_url
from kolla_ansible.put_address_in_context import put_address_in_context


Expand All @@ -24,5 +25,6 @@ class FilterModule(object):
def filters(self):
return {
'kolla_address': kolla_address,
'kolla_url': kolla_url,
'put_address_in_context': put_address_in_context,
}
24 changes: 18 additions & 6 deletions ansible/gather-facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,25 @@
# building their configurations.
- name: Gather facts for all hosts
hosts: all
max_fail_percentage: >-
{{ gather_facts_max_fail_percentage |
default(kolla_max_fail_percentage) |
default(100) }}
serial: '{{ kolla_serial|default("0") }}'
gather_facts: false
tasks:
- name: Group hosts to determine when using --limit
group_by:
key: "all_using_limit_{{ (ansible_play_batch | length) != (groups['all'] | length) }}"
changed_when: false

- name: Gather facts
setup:
filter: "{{ kolla_ansible_setup_filter }}"
gather_subset: "{{ kolla_ansible_setup_gather_subset }}"
when:
# Don't gather if fact caching is in use
- not ansible_facts

- name: Group hosts to determine when using --limit
group_by:
key: "all_using_limit_{{ (ansible_play_batch | length) != (groups['all'] | length) }}"
changed_when: false
tags: always

# NOTE(pbourke): This case covers deploying subsets of hosts using --limit. The
Expand All @@ -28,6 +33,10 @@
# the limit.
- name: Gather facts for all hosts (if using --limit)
hosts: all_using_limit_True
max_fail_percentage: >-
{{ gather_facts_max_fail_percentage |
default(kolla_max_fail_percentage) |
default(100) }}
serial: '{{ kolla_serial|default("0") }}'
gather_facts: false
vars:
Expand All @@ -44,7 +53,10 @@
delegate_facts: True
delegate_to: "{{ item }}"
with_items: "{{ delegate_hosts }}"
# We gathered facts for all hosts in the batch during the first play.
when:
# We gathered facts for all hosts in the batch during the first play.
# Ensure that we don't try again if they failed.
- item not in groups["all_using_limit_True"]
# Don't gather if fact caching is in use
- not hostvars[item].ansible_facts
tags: always
Loading

0 comments on commit 5b2aa5e

Please sign in to comment.