Retire Tripleo: remove repo content

TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: Id1dc6681828f08aff7782b02049e08748e9a1e0f
This commit is contained in:
Ghanshyam Mann 2024-02-24 11:32:28 -08:00
parent e281ae7624
commit 7fa1307c6c
1625 changed files with 8 additions and 88274 deletions

View File

@ -1,69 +0,0 @@
exclude_paths:
- releasenotes/
- ../
parseable: true
quiet: false
rulesdir:
- .ansible-lint_rules/
verbosity: 1
# Mocking modules is not recommended as it prevents testing of invalid
# arguments or lack of their presence at runtime. It is preffered to
# make use of requirements.yml to declare them.
mock_roles:
- ceph-defaults
- ceph-facts
mock_modules:
- baremetal_nodes_validate
- ceph_crush_rule
- ceph_dashboard_user
- ceph_key
- ceph_fs
- ceph_pool
- ceph_mkspec
- ceph_spec_bootstrap
- config_template
- container_startup_config
- lvm2_physical_devices_facts
- metalsmith_instances
- os_baremetal_clean_node
- os_baremetal_provide_node
- os_tripleo_baremetal_configure
- os_tripleo_baremetal_node_introspection
- tripleo_baremetal_check_existing
- tripleo_baremetal_expand_roles
- tripleo_baremetal_populate_environment
- tripleo_build_heat_environment
- tripleo_composable_network
- tripleo_config_download
- tripleo_container_config_scripts
- tripleo_container_configs
- tripleo_container_image_prepare
- tripleo_derive_hci_parameters
- tripleo_diff_exec
- tripleo_fernet_keys_rotate
- tripleo_findif_for_ip
- tripleo_generate_ansible_inventory
- tripleo_generate_overcloudrc
- tripleo_get_flatten_stack
- tripleo_get_introspected_data
- tripleo_get_role_list
- tripleo_image_params_prepare
- tripleo_network_populate_environment
- tripleo_network_ports_populate_environment
- tripleo_os_net_config
- tripleo_os_net_config_mappings
- tripleo_overcloud_network_extract
- tripleo_overcloud_network_ports
- tripleo_passwords_rotate
- tripleo_plan_deploy
- tripleo_plan_parameters_update
- tripleo_service_vip
- tripleo_swift_tempurl
- tripleo_templates_upload
- tripleo_unmanaged_populate_environment
- tripleo_generate_inventory_network_config
- tripleo_overcloud_network_vip_extract
- tripleo_overcloud_network_vip_provision
- tripleo_overcloud_network_vip_populate_environment
- tripleo_ovn_mac_addresses
- tripleo_unprovision_network

View File

@ -1,46 +0,0 @@
---
driver:
name: delegated
options:
managed: false
login_cmd_template: >-
ssh
-o UserKnownHostsFile=/dev/null
-o StrictHostKeyChecking=no
-o Compression=no
-o TCPKeepAlive=yes
-o VerifyHostKeyDNS=no
-o ForwardX11=no
-o ForwardAgent=no
{instance}
ansible_connection_options:
ansible_connection: ssh
log: true
platforms:
- name: instance
provisioner:
name: ansible
config_options:
defaults:
fact_caching: jsonfile
fact_caching_connection: /tmp/molecule/facts
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"
scenario:
test_sequence:
- prepare
- converge
- check
- verify
- cleanup
verifier:
name: ansible

View File

@ -1,37 +0,0 @@
---
driver:
name: podman
log: true
platforms:
- name: centos
hostname: centos
image: ${TRIPLEO_ANSIBLE_MOLECULE_IMAGE:-"ubi9/ubi-init"}
registry:
url: ${TRIPLEO_ANSIBLE_MOLECULE_REGISTRY:-"registry.access.redhat.com"}
dockerfile: Dockerfile.j2
pkg_extras: python*setuptools
command: ${TRIPLEO_ANSIBLE_MOLECULE_COMMAND:-"/sbin/init"}
volumes: ${TRIPLEO_ANSIBLE_MOLECULE_VOLUMES:-['/etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro','/etc/pki/rpm-gpg:/etc/pki/rpm-gpg:O','/opt/yum.repos.d:/etc/yum.repos.d:O','/etc/dnf/vars:/etc/dnf/vars:O']}
privileged: true
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits: &ulimit
- host
provisioner:
inventory:
hosts:
all:
hosts:
centos:
ansible_python_interpreter: /usr/bin/python3
name: ansible
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"

42
.gitignore vendored
View File

@ -1,42 +0,0 @@
*.py[cod]
# Testing cruft
.tox
.venv
*.egg*
egg
.coverage
cover
nosetests.xml
.testrepository
.stestr
tripleo_ansible.egg-info/
__pycache__
build
# Editors
*~
.*.swp
.*sw?
# Playbook retry files
*.retry
# roles
tripleo_ansible/roles.galaxy/*
# Sphinx
doc/build
ansible-errors.json
pytestdebug.log
# doc
doc/build/*
# JetBrain
.idea/
.cache
# Custom inventory variable files
tripleo_ansible/inventory/99-standalone-vars

View File

@ -1,45 +0,0 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
args: [--allow-multiple-documents]
- repo: https://github.com/pycqa/flake8
rev: 3.9.0
hooks:
- id: flake8
additional_dependencies: [flake8-typing-imports==1.6.0]
entry: flake8 --ignore=E24,E121,E122,E123,E124,E126,E226,E265,E305,E402,F401,F405,E501,E704,F403,F841,W503
# TODO(cloudnull): These codes were added to pass the lint check.
# All of these ignore codes should be resolved in
# future PRs.
- repo: https://github.com/ansible-community/ansible-lint
rev: v5.3.2
hooks:
- id: ansible-lint
additional_dependencies:
- 'ansible-core<2.12'
- yamllint
- repo: https://github.com/openstack-dev/bashate.git
rev: 2.0.0
hooks:
- id: bashate
entry: bashate --error . --ignore=E006,E040
verbose: false
# Run bashate check for all bash scripts
# Ignores the following rules:
# E006: Line longer than 79 columns (as many scripts use jinja
# templating, this is very difficult)
# E040: Syntax error determined using `bash -n` (as many scripts
# use jinja templating, this will often fail and the syntax
# error will be discovered in execution anyway)

View File

@ -1,3 +0,0 @@
[DEFAULT]
test_path=${TEST_PATH:-./tripleo_ansible/tests/}
top_dir=./

View File

@ -1,10 +0,0 @@
---
extends: default
rules:
line-length:
# matches hardcoded 160 value from ansible-lint
max: 160
ignore: |
zuul.d/*.yaml

175
LICENSE
View File

@ -1,175 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

View File

@ -1,30 +1,10 @@
========================
Team and repository tags
========================
This project is no longer maintained.
.. image:: https://governance.openstack.org/tc/badges/tripleo-ansible.svg
:target: https://governance.openstack.org/tc/reference/tags/index.html
The contents of this repository are still available in the Git
source code management system. To see the contents of this
repository before it reached its end of life, please check out the
previous commit with "git checkout HEAD^1".
.. Change things from this point on
===============
TripleO Ansible
===============
TripleO Ansible project repository. Contains Ansible playbooks, roles, and
plugins for use with TripleO.
Documentation for the project can be found at:
`<https://docs.openstack.org/tripleo-ansible/latest/>`_
Release notes for the project can be found at:
`<https://docs.openstack.org/releasenotes/tripleo-ansible/>`_
The project source code repository is located at:
`<https://opendev.org/openstack/tripleo-ansible/>`_
The project home is at:
`<https://launchpad.net/tripleo>`_
The project bug tracker is located at:
`<https://bugs.launchpad.net/tripleo>`_
For any further questions, please email
openstack-discuss@lists.openstack.org or join #openstack-dev on
OFTC.

View File

@ -1,23 +0,0 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "tripleo_{{ role_name | replace('tripleo_', '') }}"
tripleo_{{ role_name | replace('tripleo_', '') }}_debug: {% raw %}"{{ (ansible_verbosity | int) >= 2 | bool }}"{% endraw %}
tripleo_{{ role_name | replace('tripleo_', '') }}_hide_sensitive_logs: true

View File

@ -1,15 +0,0 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

View File

@ -1,43 +0,0 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
galaxy_info:
author: OpenStack
description: TripleO OpenStack Role -- {{ role_name }}
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.7
namespace: openstack
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
platforms:
- name: CentOS
versions:
- 8
- 9
galaxy_tags:
- tripleo
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
dependencies: []

View File

@ -1,21 +0,0 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Converge
hosts: all
roles:
- role: "{{ role_name }}"

View File

@ -1,28 +0,0 @@
---
driver:
name: podman
provisioner:
inventory:
hosts:
all:
hosts:
centos:
ansible_python_interpreter: /usr/bin/python3
name: ansible
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
scenario:
test_sequence:
- destroy
- create
- prepare
- converge
- check
- verify
- destroy
verifier:
name: testinfra

View File

@ -1,22 +0,0 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Prepare
hosts: all
roles:
- role: test_deps
- role: env_data

View File

@ -1,34 +0,0 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# "{{ role_name }}" will search for and load any operating system variable file
{% raw %}
# found within the "vars/" path. If no OS files are found the task will skip.
- name: Gather variables for each operating system
include_vars: "{{ item }}"
with_first_found:
- skip: true
files:
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
- "{{ ansible_facts['distribution'] | lower }}.yml"
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
- "{{ ansible_facts['os_family'] | lower }}.yml"
tags:
- always
{% endraw %}

View File

@ -1,22 +0,0 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# While options found within the vars/ path can be overridden using extra
# vars, items within this path are considered part of the role and not
# intended to be modified.
# All variables within this role should have a prefix of "tripleo_{{ role_name | replace('tripleo_', '') }}"

View File

@ -1,4 +0,0 @@
ansible-core
metalsmith>=1.4.0 # Apache-2.0
importlib-metadata
jsonschema # MIT

View File

@ -1,9 +0,0 @@
export TRIPLEO_ANSIBLE_MOLECULE_COMMAND="/bin/sleep infinity"
export TRIPLEO_ANSIBLE_MOLECULE_VOLUMES="[]"
export TRIPLEO_ANSIBLE_MOLECULE_IMAGE="centos/centos:stream9"
export TRIPLEO_ANSIBLE_MOLECULE_REGISTRY="quay.io"
# Role specific vars
export TRIPLEO_ANSIBLE_SSHD_MOLECULE_VOLUMES="['/sys/fs/cgroup:/sys/fs/cgroup:rw']"
export TRIPLEO_ANSIBLE_OVN_MOLECULE_VOLUMES="['/sys/fs/cgroup:/sys/fs/cgroup:rw']"
export TRIPLEO_ANSIBLE_COMPUTE_NODE_MOLECULE_VOLUMES="['$HOME/.cache/tripleo-ansible/containers:/var/lib/containers:rw','/sys/fs/cgroup:/sys/fs/cgroup:rw']"

View File

@ -1,25 +0,0 @@
export TRIPLEO_ANSIBLE_WORKPATH="$(dirname $(readlink -f ${BASH_SOURCE[0]}))"
export ANSIBLE_STDOUT_CALLBACK=debug
export ANSIBLE_ACTION_PLUGINS="${TRIPLEO_ANSIBLE_WORKPATH}/tripleo_ansible/roles.galaxy/config_template/action:${TRIPLEO_ANSIBLE_WORKPATH}/tripleo_ansible/ansible_plugins/action"
export ANSIBLE_CALLBACK_PLUGINS="${TRIPLEO_ANSIBLE_WORKPATH}/tripleo_ansible/ansible_plugins/callback"
export ANSIBLE_STRATEGY_PLUGINS="${TRIPLEO_ANSIBLE_WORKPATH}/tripleo_ansible/ansible_plugins/strategy"
export ANSIBLE_FILTER_PLUGINS="${TRIPLEO_ANSIBLE_WORKPATH}/tripleo_ansible/ansible_plugins/filter"
export ANSIBLE_LIBRARY="${TRIPLEO_ANSIBLE_WORKPATH}/tripleo_ansible/roles.galaxy/config_template/library:${TRIPLEO_ANSIBLE_WORKPATH}/tripleo_ansible/ansible_plugins/modules"
export ANSIBLE_MODULE_UTILS="${TRIPLEO_ANSIBLE_WORKPATH}/tripleo_ansible/ansible_plugins/module_utils"
export ANSIBLE_ROLES_PATH="${TRIPLEO_ANSIBLE_WORKPATH}/tripleo_ansible/roles.galaxy:${TRIPLEO_ANSIBLE_WORKPATH}/tripleo_ansible/roles"
export ANSIBLE_INVENTORY="${TRIPLEO_ANSIBLE_WORKPATH}/tests/hosts.ini"
export ANSIBLE_RETRY_FILES_ENABLED="0"
export ANSIBLE_LOAD_CALLBACK_PLUGINS="1"
export ANSIBLE_HOST_KEY_CHECKING=False
function unset-ansible-test-env {
for i in $(env | grep ANSIBLE_ | awk -F'=' '{print $1}'); do
unset ${i}
done
unset TRIPLEO_ANSIBLE_WORKPATH
echo -e "Ansible test environment deactivated.\n"
unset -f unset-ansible-test-env
}
echo -e "Ansible test environment is now active"
echo -e "Run 'unset-ansible-test-env' to deactivate.\n"

View File

@ -1,41 +0,0 @@
# This file facilitates OpenStack-CI package installation
# before the execution of any tests.
#
# See the following for details:
# - https://docs.openstack.org/infra/bindep/
# - https://opendev.org/opendev/bindep/
#
# Even if the role does not make use of this facility, it
# is better to have this file empty, otherwise OpenStack-CI
# will fall back to installing its default packages which
# will potentially be detrimental to the tests executed.
# The gcc compiler
gcc
# Base requirements for RPM distros
gcc-c++ [platform:rpm]
git [platform:rpm]
libffi-devel [platform:rpm]
openssl-devel [platform:rpm]
podman [platform:rpm]
python3-devel [platform:rpm !platform:rhel-7 !platform:centos-7]
PyYAML [platform:rpm !platform:rhel-8 !platform:centos-8 !platform:rhel-9 !platform:centos-9 !platform:fedora]
python3-pyyaml [platform:rpm !platform:rhel-7 !platform:centos-7]
python3-dnf [platform:rpm !platform:rhel-7 !platform:centos-7]
# RH Mechanisms
python-rhsm-certificates [platform:redhat]
# SELinux cent7
libselinux-python3 [platform:rpm !platform:rhel-8 !platform:centos-8]
libsemanage-python3 [platform:redhat !platform:rhel-8 !platform:centos-8]
# SELinux cent8
python3-libselinux [platform:rpm !platform:rhel-7 !platform:centos-7]
python3-libsemanage [platform:redhat !platform:rhel-7 !platform:centos-7]
# Required for compressing collected log files in CI
gzip
# Required to build language docs
gettext

View File

View File

@ -1,10 +0,0 @@
# this is required for the docs build jobs
ansible-core
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
reno>=3.1.0 # Apache-2.0
doc8>=0.8.1 # Apache-2.0
bashate>=0.6.0 # Apache-2.0
metalsmith>=1.4.0 # Apache-2.0
jsonschema # MIT
ruamel.yaml

View File

@ -1,381 +0,0 @@
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import imp
import os
from docutils import core
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.parsers import rst
from docutils.writers.html4css1 import Writer
from sphinx import addnodes
import yaml
from ruamel.yaml import YAML as RYAML
try:
import io
StringIO = io.StringIO
except ImportError:
import StringIO
class DocYaml(RYAML):
def _license_filter(self, data):
"""This will filter out our boilerplate license heading in return data.
The filter is used to allow documentation we're creating in variable
files to be rendered more beautifully.
"""
lines = list()
mark = True
for line in data.splitlines():
if '# Copyright' in line:
mark = False
if mark:
lines.append(line)
if '# under the License' in line:
mark = True
return '\n'.join(lines)
def dump(self, data, stream=None, **kw):
if not stream:
stream = StringIO()
try:
RYAML.dump(self, data, stream, **kw)
return self._license_filter(stream.getvalue().strip())
finally:
stream.close()
DOCYAML = DocYaml()
DOCYAML.default_flow_style = False
class AnsibleAutoPluginDirective(Directive):
directive_name = "ansibleautoplugin"
has_content = True
option_spec = {
'module': rst.directives.unchanged,
'role': rst.directives.unchanged,
'documentation': rst.directives.unchanged,
'examples': rst.directives.unchanged
}
@staticmethod
def _render_html(source):
return core.publish_parts(
source=source,
writer=Writer(),
writer_name='html',
settings_overrides={'no_system_messages': True}
)
def make_node(self, title, contents, content_type=None):
section = self._section_block(title=title)
if not content_type:
# Doc section
for content in contents['docs']:
for paragraph in content.split('\n'):
retnode = nodes.paragraph()
retnode.append(self._raw_html_block(data=paragraph))
section.append(retnode)
# Options Section
options_list = nodes.field_list()
options_section = self._section_block(title='Options')
for key, value in contents['options'].items():
options_list.append(
self._raw_fields(
data=value['description'],
field_name=key
)
)
else:
options_section.append(options_list)
section.append(options_section)
# Authors Section
authors_list = nodes.field_list()
authors_list.append(
self._raw_fields(
data=contents['author']
)
)
authors_section = self._section_block(title='Authors')
authors_section.append(authors_list)
section.append(authors_section)
elif content_type == 'yaml':
for content in contents:
section.append(
self._literal_block(
data=content,
dump_data=False
)
)
return section
@staticmethod
def load_module(filename):
return imp.load_source('__ansible_module__', filename)
@staticmethod
def build_documentation(module):
docs = DOCYAML.load(module.DOCUMENTATION)
doc_data = dict()
doc_data['docs'] = docs['description']
doc_data['author'] = docs.get('author', list())
doc_data['options'] = docs.get('options', dict())
return doc_data
@staticmethod
def build_examples(module):
examples = DOCYAML.load(module.EXAMPLES)
return_examples = list()
for example in examples:
return_examples.append(DOCYAML.dump([example]))
return return_examples
def _raw_html_block(self, data):
html = self._render_html(source=data)
return nodes.raw('', html['body'], format='html')
def _raw_fields(self, data, field_name=''):
body = nodes.field_body()
if isinstance(data, list):
for item in data:
body.append(self._raw_html_block(data=item))
else:
body.append(self._raw_html_block(data=data))
field = nodes.field()
field.append(nodes.field_name(text=field_name))
field.append(body)
return field
@staticmethod
def _literal_block(data, language='yaml', dump_data=True):
if dump_data:
literal = nodes.literal_block(
text=DOCYAML.dump(data)
)
else:
literal = nodes.literal_block(text=data)
literal['language'] = 'yaml'
return literal
@staticmethod
def _section_block(title, text=None):
section = nodes.section(
title,
nodes.title(text=title),
ids=[nodes.make_id('-'.join(title))],
)
if text:
section_body = nodes.field_body()
section_body.append(nodes.paragraph(text=text))
section.append(section_body)
return section
def _yaml_section(self, to_yaml_data, section_title, section_text=None):
yaml_section = self._section_block(
title=section_title,
text=section_text
)
yaml_section.append(self._literal_block(data=to_yaml_data))
return yaml_section
def _run_role(self, role):
section = self._section_block(
title='Role Documentation',
text='Welcome to the "{}" role documentation.'.format(
os.path.basename(role)
)
)
defaults_file = os.path.join(role, 'defaults', 'main.yml')
if os.path.exists(defaults_file):
with open(defaults_file) as f:
role_defaults = DOCYAML.load(f.read())
section.append(
self._yaml_section(
to_yaml_data=role_defaults,
section_title='Role Defaults',
section_text='This section highlights all of the defaults'
' and variables set within the "{}"'
' role.'.format(
os.path.basename(role)
)
)
)
vars_path = os.path.join(role, 'vars')
if os.path.exists(vars_path):
for v_file in os.listdir(vars_path):
vars_file = os.path.join(vars_path, v_file)
with open(vars_file) as f:
vars_values = DOCYAML.load(f.read())
section.append(
self._yaml_section(
to_yaml_data=vars_values,
section_title='Role Variables: {}'.format(v_file)
)
)
test_list = nodes.field_list()
test_section = self._section_block(
title='Molecule Scenarios',
text='Molecule is being used to test the "{}" role. The'
' following section highlights the drivers in service'
' and provides an example playbook showing how the role'
' is leveraged.'.format(
os.path.basename(role)
)
)
molecule_path = os.path.join(role, 'molecule')
if os.path.exists(molecule_path):
for test in os.listdir(molecule_path):
test_path = os.path.join(molecule_path, test)
molecule_section = self._section_block(
title='Scenario: {}'.format(test)
)
molecule_file = os.path.join(test_path, 'molecule.yml')
if not os.path.exists(molecule_file):
continue
with open(molecule_file) as f:
molecule_conf = DOCYAML.load(f.read())
driver_data = molecule_conf.get('driver')
if driver_data:
molecule_section.append(
nodes.field_name(
text='Driver: {}'.format(
driver_data['name']
)
)
)
options = driver_data.get('options')
if options:
molecule_section.append(
self._yaml_section(
to_yaml_data=options,
section_title='Molecule Options'
)
)
provisioner_data = molecule_conf.get('provisioner')
if provisioner_data:
inventory = provisioner_data.get('inventory')
if inventory:
molecule_section.append(
self._yaml_section(
to_yaml_data=inventory,
section_title='Molecule Inventory'
)
)
os.environ["MOLECULE_SCENARIO_DIRECTORY"] = test_path
converge_playbook_path = os.path.join(test_path, 'converge.yml')
molecule_playbook_path = os.path.expandvars(
provisioner_data.get('playbooks', {})
.get('converge', converge_playbook_path)
)
if not os.path.exists(molecule_playbook_path):
molecule_playbook_path = os.path.join(
test_path, 'playbook.yml'
)
if not os.path.exists(molecule_playbook_path):
continue
with open(molecule_playbook_path) as f:
molecule_playbook = DOCYAML.load(f.read())
molecule_section.append(
self._yaml_section(
to_yaml_data=molecule_playbook,
section_title='Example {} playbook'.format(test)
)
)
test_list.append(molecule_section)
else:
test_section.append(test_list)
section.append(test_section)
self.run_returns.append(section)
# Document any libraries nested within the role
library_path = os.path.join(role, 'library')
if os.path.exists(library_path):
self.options['documentation'] = True
self.options['examples'] = True
for lib in os.listdir(library_path):
if lib.endswith('.py'):
self._run_module(
module=self.load_module(
filename=os.path.join(
library_path,
lib
)
),
module_title='Embedded module: {}'.format(lib),
example_title='Examples for embedded module'
)
def _run_module(self, module, module_title="Module Documentation",
example_title="Example Tasks"):
if self.options.get('documentation'):
docs = self.build_documentation(module=module)
self.run_returns.append(
self.make_node(
title=module_title,
contents=docs
)
)
if self.options.get('examples'):
examples = self.build_examples(module=module)
self.run_returns.append(
self.make_node(
title=example_title,
contents=examples,
content_type='yaml'
)
)
def run(self):
self.run_returns = list()
if self.options.get('module'):
module = self.load_module(filename=self.options['module'])
self._run_module(module=module)
if self.options.get('role'):
self._run_role(role=self.options['role'])
return self.run_returns
def setup(app):
classes = [
AnsibleAutoPluginDirective,
]
for directive_class in classes:
app.add_directive(directive_class.directive_name, directive_class)
return {'version': '0.2'}

View File

@ -1,101 +0,0 @@
#!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
from ansible.plugins import loader
# Add the project
sys.path.insert(0, os.path.abspath('../..'))
# Add the extensions
sys.path.insert(0, os.path.join(os.path.abspath('.'), '_exts'))
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'openstackdocstheme',
'sphinx.ext.autodoc',
'ansible-autodoc'
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
# autodoc_mock_imports = ["django"]
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'tripleo-ansible'
copyright = u'2019, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'native'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# html_static_path = ['static']
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
html_theme = 'openstackdocs'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
]
# Example configuration for intersphinx: refer to the Python standard library.
# intersphinx_mapping = {'http://docs.python.org/': None}
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/tripleo-ansible'
openstackdocs_auto_name = False
openstackdocs_bug_project = 'tripleo'
openstackdocs_bug_tag = 'documentation'
needed_module_utils = [
'baremetal_deploy',
'tripleo_common_utils'
]
# load our custom module_utils so that modules can be imported for
# generating docs
for m in needed_module_utils:
try:
loader.module_utils_loader.get(m)
except AttributeError:
pass

View File

@ -1,198 +0,0 @@
============
Contributing
============
Adding roles into this project is easy and starts with a compatible skeleton.
Create a new role manually
~~~~~~~~~~~~~~~~~~~~~~~~~~
From with the project root, creating a skeleton for the new role.
.. code-block:: console
$ ansible-galaxy init --role-skeleton=_skeleton_role_ --init-path=tripleo_ansible/roles ${NEWROLENAME}
When the role is ready for CI, add a **job** entry into the
`zuul.d/molecule.yaml`.
.. code-block:: yaml
- job:
files:
- ^tripleo_ansible/roles/${NEWROLENAME}/.*
name: tripleo-ansible-centos-stream-molecule-${NEWROLENAME}
parent: tripleo-ansible-centos-stream-base
vars:
tox_envlist: mol-${NEWROLENAME}
Make sure to add the **job** name into the check and gate section at the top
of the `molecule.yaml` file.
.. code-block:: yaml
- project:
check:
jobs:
- tripleo-ansible-centos-stream-molecule-${NEWROLENAME}
gate:
jobs:
- tripleo-ansible-centos-stream-molecule-${NEWROLENAME}
Finally add a role documentation file at
`doc/source/roles/role-${NEWROLENAME}.rst`. This file will need to contain
a title, a literal include of the defaults yaml and a literal include of
the molecule playbook, or playbooks, used to test the role, which is noted
as an "example" playbook.
Create a new role with automation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The role addition process is also automated using ansible. If ansible is
available on the development workstation change directory to the root of
the `tripleo-ansible` repository and run the the following command which
will perform the basic tasks noted above.
.. code-block:: console
$ ansible-playbook -i localhost, role-addition.yml -e role_name=${NEWROLENAME}
If this playbook is being executed from a virtual-environment be sure to
activate the virtual environment before running the playbook.
.. code-block:: console
$ . ~/bin/venvs/ansible/bin/activate
(ansible)$ ansible-playbook -i localhost, role-addition.yml -e role_name=${NEWROLENAME}
Local testing of new roles
~~~~~~~~~~~~~~~~~~~~~~~~~~
Local testing of new roles can be done in any number of ways, however,
the easiest way is via the script `run-local-test`. This script
will setup the local work environment to execute tests mimicking what
Zuul does.
.. warning::
This script makes the assumption the executing user has the
ability to escalate privileges and will modify the local system.
To use this script execute the following command.
.. code-block:: console
$ ./scripts/run-local-test ${NEWROLENAME}
When using the `run-local-test` script, the TRIPLEO_JOB_ANSIBLE_ARGS
environment variable can be used to pass arbitrary Ansible arguments.
For example, the following shows how to use `--skip-tags` when testing
the `tripleo_ceph_run_ansible` role.
.. code-block:: console
$ export TRIPLEO_JOB_ANSIBLE_ARGS="--skip-tags run_ceph_ansible,run_uuid_ansible"
$ ./scripts/run-local-test tripleo_ceph_run_ansible
Role based testing with molecule can be executed directly from within
the role directory.
.. note::
Most tests require docker for container based testing. If Docker
is not available on the local workstation it will need to be
installed prior to executing most molecule based tests.
.. note::
The script `bindep-install`, in the **scripts** path, is
available and will install all system dependencies.
Before running basic molecule tests, it is recommended to install all
of the python dependencies in a virtual environment.
.. code-block:: console
$ python -m virtualenv --system-site-packages "${HOME}/test-python"
$ ${HOME}/test-python/bin/pip install -r requirements.txt \
-r test-requirements.txt \
-r molecule-requirements.txt
$ source ${HOME}/test-python/bin/activate
To run a basic molecule test, simply source the `ansibe-test-env.rc`
file from the project root, and then execute the following commands.
.. code-block:: console
(test-python) $ source ansible-test-env.rc
(test-python) $ cd tripleo_ansible/roles/${NEWROLENAME}/
(test-python) $ molecule --base-config ../../../.config/molecule/config.yml test --all
To run a test using the `podman` driver, `ansible-test-env-podman.rc` also
needs to be sourced, and specify the `config_podman.yml` molecule config.
.. code-block:: console
(test-python) $ source ansible-test-env.rc
(test-python) $ source ansible-test-env-podman.rc
(test-python) $ cd tripleo_ansible/roles/${NEWROLENAME}/
(test-python) $ molecule --base-config ../../../.config/molecule/config_podman.yml test --all
If a role has more than one scenario, a specific scenario can be
specified on the command line. Running specific scenarios will
help provide developer feedback faster. To pass-in a scenario use
the `--scenario-name` flag with the name of the desired scenario.
.. code-block:: console
(test-python) $ cd tripleo_ansible/roles/${NEWROLENAME}/
(test-python) $ molecule test --scenario-name ${EXTRA_SCENARIO_NAME}
When debugging molecule tests its sometimes useful to use the
`--debug` flag. This flag will provide extra verbose output about
test being executed and running the environment.
.. code-block:: console
(test-python) $ molecule --debug test
Contributing plugins
~~~~~~~~~~~~~~~~~~~~
All plugins contributed to the TripleO-Ansible can be found in the
`tripleo_ansible/ansible_plugins` directory, from the root of this project.
When contributing a plugin, make sure to also add documentation in the
`doc/source/modules` folder. All documentation added to this folder will be
automatically indexed and rendered via `sphinx`.
If a contributed plugin is following the Ansible practice of placing
documentation within the plugin itself, the following snippet can be used in a
sphinx template to auto-render the in-code documentation.
.. code-block:: rst
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/${DIRECTORY}/${PLUGINFILE}
:documentation: true
:examples: true
The snippet can take two options, `documentation` and `examples`. If a given
plugin does not have either of these in-code documentation objects,
documentation for either type can be disabled by omitting the option.
.. code-block:: rst
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/${DIRECTORY}/${PLUGINFILE}
:documentation: true

View File

@ -1,67 +0,0 @@
============================
So You Want to Contribute...
============================
For general information on contributing to OpenStack, please check out the
`contributor guide <https://docs.openstack.org/contributors/>`_ to get started.
It covers all the basics that are common to all OpenStack projects: the accounts
you need, the basics of interacting with our Gerrit review system, how we
communicate as a community, etc.
The information below will cover the project specific information you need to get started with TripleO.
Documentation
~~~~~~~~~~~~~
Documentation for the TripleO project can be found `here <https://docs.openstack.org/tripleo-docs/latest/index.html>`_
Communication
~~~~~~~~~~~~~
* IRC channel ``#tripleo`` at FreeNode
* Mailing list (prefix subjects with ``[tripleo]`` for faster responses)
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss
Contacting the Core Team
~~~~~~~~~~~~~~~~~~~~~~~~
Please refer to the `TripleO Core Team
<https://review.opendev.org/#/admin/groups/190,members>`_ contacts.
New Feature Planning
~~~~~~~~~~~~~~~~~~~~
If you want to propose a new feature please read our `Example Spec <https://opendev.org/openstack/tripleo-specs/src/branch/master/specs/template.rst>`_
Submit your feature to the `proper branch <https://opendev.org/openstack/tripleo-specs/src/branch/master/specs>`_.
TripleO features are tracked on `Launchpad BP <https://blueprints.launchpad.net/tripleo>`_.
New TripleO Policy Proposal
~~~~~~~~~~~~~~~~~~~~~~~~~~~
New policies can be proposed by submitting a policy-template
in the same way a spec file is submitted.
Task Tracking
~~~~~~~~~~~~~
We track our tasks in `Launchpad <https://bugs.launchpad.net/tripleo>`_ and in
`StoryBoard <https://storyboard.openstack.org/#!/project_group/76>`_
Reporting a Bug
~~~~~~~~~~~~~~~
You found an issue and want to make sure we are aware of it? You can do so on
`Launchpad <https://bugs.launchpad.net/tripleo/+filebug>`__.
More info about Launchpad usage can be found on `OpenStack docs page
<https://docs.openstack.org/contributors/common/task-tracking.html#launchpad>`_
Getting Your Patch Merged
~~~~~~~~~~~~~~~~~~~~~~~~~
All changes proposed to the TripleO requires two ``Code-Review +2`` votes from
TripleO core reviewers before one of the core reviewers can approve patch by
giving ``Workflow +1`` vote.
Project Team Lead Duties
~~~~~~~~~~~~~~~~~~~~~~~~
All common PTL duties are enumerated in the `PTL guide
<https://docs.openstack.org/project-team-guide/ptl.html>`_.
The Release Process for TripleO is documented in `Release Management
<https://docs.openstack.org/tripleo-docs/latest/developer/release.html>`_.
Documentation for the TripleO project can be found `here <https://docs.openstack.org/tripleo-docs/latest/index.html>`_

View File

@ -1,26 +0,0 @@
.. tripleo-ansible documentation master file, created by
sphinx-quickstart on Tue Jun 7 22:26:36 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to tripleo-ansible's documentation!
===========================================
Contents:
.. toctree::
:maxdepth: 2
contributor/contributing
installation
contributing_roles
usage
roles
modules
standalone-roles-playbooks
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`

View File

@ -1,16 +0,0 @@
============
Installation
============
At the command line using `yum`.
.. code-block:: console
$ yum install tripleo-ansible
At the command line using `dnf`.
.. code-block:: console
$ dnf install tripleo-ansible

View File

@ -1,9 +0,0 @@
Documented modules in TripleO-Ansible
=====================================
Contents:
.. toctree::
:glob:
modules/*

View File

@ -1,14 +0,0 @@
================
Module - package
================
This module provides for the following ansible plugin:
* package
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/action/package.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
==========================
Module - tripleo_host_prep
==========================
This module provides for the following ansible plugin:
* tripleo_host_prep
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/action/tripleo_host_prep.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
============================
Module - ceph_mkspec
============================
This module provides for the following ansible plugin:
* ceph_mkspec
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/ceph_mkspec.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
============================
Module - ceph_spec_bootstrap
============================
This module provides for the following ansible plugin:
* ceph_spec_bootstrap
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/ceph_spec_bootstrap.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
================================
Module - container_puppet_config
================================
This module provides for the following ansible plugin:
* container_puppet_config
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/container_puppet_config.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
=========================================
Module - tripleo_container_config_scripts
=========================================
This module provides for the following ansible plugin:
* tripleo_container_config_scripts
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_container_config_scripts.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
==================================
Module - tripleo_container_configs
==================================
This module provides for the following ansible plugin:
* tripleo_container_configs
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_container_configs.py
:documentation: true
:examples: true

View File

@ -1,8 +0,0 @@
====================================
Module - tripleo_overcloud_role_show
====================================
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_overcloud_role_show.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
=========================================
Module - tripleo_baremetal_check_existing
=========================================
This module provides for the following ansible plugin:
* tripleo_baremetal_check_existing
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_baremetal_check_existing.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
=======================================
Module - tripleo_baremetal_expand_roles
=======================================
This module provides for the following ansible plugin:
* tripleo_baremetal_expand_roles
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_baremetal_expand_roles.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
===============================================
Module - tripleo_baremetal_populate_environment
===============================================
This module provides for the following ansible plugin:
* tripleo_baremetal_populate_environment
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_baremetal_populate_environment.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
=======================================
Module - tripleo_build_heat_environment
=======================================
This module provides for the following ansible plugin:
* tripleo_build_heat_environment
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_build_heat_environment.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
===================================
Module - tripleo_composable_network
===================================
This module provides for the following ansible plugin:
* tripleo_composable_network
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_composable_network.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
================================
Module - tripleo_config_download
================================
This module provides for the following ansible plugin:
* tripleo_config_download
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_config_download.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
========================================
Module - tripleo_container_image_prepare
========================================
This module provides for the following ansible plugin:
* tripleo_container_image_prepare
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_container_image_prepare.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
=================================
Module - tripleo_deploy_artifacts
=================================
This module provides for the following ansible plugin:
* tripleo_deploy_artifacts
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_deploy_artifacts.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
==========================
Module - tripleo_diff_exec
==========================
This module provides for the following ansible plugin:
* tripleo_diff_exec
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_diff_exec.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
===================================
Module - tripleo_fernet_keys_rotate
===================================
This module provides for the following ansible plugin:
* tripleo_fernet_keys_rotate
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_fernet_keys_rotate.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
===========================================
Module - tripleo_generate_ansible_inventory
===========================================
This module provides for the following ansible plugin:
* tripleo_generate_ansible_inventory
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_generate_ansible_inventory.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
=============================================
Module - tripleo_network_populate_environment
=============================================
This module provides for the following ansible plugin:
* tripleo_network_populate_environment
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_network_populate_environment.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
===================================================
Module - tripleo_network_ports_populate_environment
===================================================
This module provides for the following ansible plugin:
* tripleo_network_ports_populate_environment
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_network_ports_populate_environment.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
=================================
Module - tripleo_nova_image_cache
=================================
This module provides for the following ansible plugin:
* tripleo_nova_image_cache
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_nova_image_cache.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
==============================
Module - tripleo_os_net_config
==============================
This module provides for the following ansible plugin:
* tripleo_os_net_config
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_os_net_config.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
=======================================
Module - tripleo_os_net_config_mappings
=======================================
This module provides for the following ansible plugin:
* tripleo_os_net_config_mappings
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_os_net_config_mappings.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
==============================================
Module - tripleo_overcloud_network_vip_extract
==============================================
This module provides for the following ansible plugin:
* tripleo_overcloud_network_vip_extract
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_overcloud_network_vip_extract.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
===========================================================
Module - tripleo_overcloud_network_vip_populate_environment
===========================================================
This module provides for the following ansible plugin:
* tripleo_overcloud_network_vip_populate_environment
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_overcloud_network_vip_populate_environment.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
================================================
Module - tripleo_overcloud_network_vip_provision
================================================
This module provides for the following ansible plugin:
* tripleo_overcloud_network_vip_provision
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_overcloud_network_vip_provision.py
:documentation: true
:examples: true

View File

@ -1,8 +0,0 @@
====================================
Module - tripleo_overcloud_role_list
====================================
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_overcloud_role_list.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
==================================
Module - tripleo_ovn_mac_addresses
==================================
This module provides for the following ansible plugin:
* tripleo_ovn_mac_addresses
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_ovn_mac_addresses.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
=================================
Module - tripleo_passwords_rotate
=================================
This module provides for the following ansible plugin:
* tripleo_passwords_rotate
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_passwords_rotate.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
===============================================
Module - tripleo_unmanaged_populate_environment
===============================================
This module provides for the following ansible plugin:
* tripleo_unmanaged_populate_environment
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_unmanaged_populate_environment.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
====================================
Module - tripleo_unprovision_network
====================================
This module provides for the following ansible plugin:
* tripleo_unprovision_network
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_unprovision_network.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
==========================================
Module - tripleo_overcloud_network_extract
==========================================
This module provides for the following ansible plugin:
* tripleo_overcloud_network_extract
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_overcloud_network_extract.py
:documentation: true
:examples: true

View File

@ -1,14 +0,0 @@
========================================
Module - tripleo_overcloud_network_ports
========================================
This module provides for the following ansible plugin:
* tripleo_overcloud_network_ports
.. ansibleautoplugin::
:module: tripleo_ansible/ansible_plugins/modules/tripleo_overcloud_network_ports.py
:documentation: true
:examples: true

View File

@ -1,9 +0,0 @@
Documented roles in TripleO-Ansible
===================================
Contents:
.. toctree::
:glob:
roles/*

View File

@ -1,6 +0,0 @@
===========
Role - aide
===========
.. ansibleautoplugin::
:role: tripleo_ansible/roles/aide

View File

@ -1,307 +0,0 @@
=========================
Role - backup_and_restore
=========================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/backup_and_restore
Usage
~~~~~
This Ansible role allows to
do the following tasks:
1. Install an NFS server.
2. Install ReaR.
3. Perform a ReaR backup.
This example is meant to describe a very simple
use case in which the user needs to create a set
of recovery images from the control plane nodes.
First, the user needs to have access to the
environment Ansible inventory.
We will use the *tripleo-ansible-inventory*
command to generate the inventory file.
::
tripleo-ansible-inventory \
--ansible_ssh_user heat-admin \
--static-yaml-inventory ~/tripleo-inventory.yaml
In this particular case, we don't have an additional
NFS server to store the backups from the control plane nodes,
so, we will install the NFS server in the Undercloud node
(but any other node can be used as the NFS storage backend).
First, we need to create an Ansible playbook to
specify that we will install the NFS server in the
Undercloud node.
::
cat <<'EOF' > ~/bar_nfs_setup.yaml
# Playbook
# We will setup the NFS node in the Undercloud node
# (we don't have any other place at the moment to do this)
- become: true
hosts: undercloud
name: Setup NFS server for ReaR
roles:
- role: backup_and_restore
EOF
Then, we will create another playbook to determine the location
in which we will like to install ReaR.
::
cat <<'EOF' > ~/bar_rear_setup.yaml
# Playbook
# We install and configure ReaR in the control plane nodes
# As they are the only nodes we will like to backup now.
- become: true
hosts: Controller
name: Install ReaR
roles:
- role: backup_and_restore
EOF
Now we create the playbook to create the actual backup.
::
cat <<'EOF' > ~/bar_rear_create_restore_images.yaml
# Playbook
# We run ReaR in the control plane nodes.
- become: true
hosts: ceph_mon
name: Backup ceph authentication
tasks:
- name: Backup ceph authentication role
include_role:
name: backup_and_restore
tasks_from: ceph_authentication
tags:
- bar_create_recover_image
- become: true
hosts: Controller
name: Create the recovery images for the control plane
roles:
- role: backup_and_restore
EOF
The last step is to run the previously create playbooks
filtering by the corresponding tag.
First, we configure the NFS server.
::
# Configure NFS server in the Undercloud node
ansible-playbook \
-v -i ~/tripleo-inventory.yaml \
--extra="ansible_ssh_common_args='-o StrictHostKeyChecking=no'" \
--become \
--become-user root \
--tags bar_setup_nfs_server \
~/bar_nfs_setup.yaml
Then, we install ReaR in the desired nodes.
::
# Configure ReaR in the control plane
ansible-playbook \
-v -i ~/tripleo-inventory.yaml \
--extra="ansible_ssh_common_args='-o StrictHostKeyChecking=no'" \
--become \
--become-user root \
--tags bar_setup_rear \
~/bar_rear_setup.yaml
Lastly, we execute the actual backup step. With or without ceph.
::
# Create recovery images of the control plane
ansible-playbook \
-v -i ~/tripleo-inventory.yaml \
--extra="ansible_ssh_common_args='-o StrictHostKeyChecking=no'" \
--become \
--become-user root \
--tags bar_create_recover_image \
~/bar_rear_create_restore_images.yaml
Ironic Usage
~~~~~~~~~~~~
This Ansible role gets the most of the ironic/metallsmitch
service on the Undercloud to automate the restoration of
the nodes.
1. Install an NFS server as a data backup.
2. Install an NFS server on the Undercloud.
3. Install and configure ReaR.
4. Perform a ReaR backup.
5. Restore a Node.
Firstly, the user needs to have access to the
environment Ansible inventory.
We will use the *tripleo-ansible-inventory*
command to generate the inventory file.
::
tripleo-ansible-inventory \
--stack overcloud \
--ansible_ssh_user heat-admin \
--static-yaml-inventory ~/tripleo-inventory.yaml
Secondly, we need to create an Ansible playbook to
specify that we will install the NFS server in the
Undercloud node.
::
cat <<'EOF' > ~/bar_nfs_setup.yaml
# Playbook
# We will setup the NFS node in the Undercloud node
# (we don't have any other place at the moment to do this)
- become: true
hosts: backupServer
name: Setup NFS server for ReaR
roles:
- role: backup_and_restore
EOF
Then, we need to install and configure the NFS server.
::
# Install and Configure NFS server node
ansible-playbook \
-v -i ~/tripleo-inventory.yaml \
--extra="ansible_ssh_common_args='-o StrictHostKeyChecking=no'" \
--become \
--become-user root \
--tags bar_setup_nfs_server \
~/bar_nfs_setup.yaml
The Undercloud needs to be configured to integrate ReaR with
Ironic. The first step is the creation of the playbook.
::
cat <<'EOF' > ~/prepare-undercloud-pxe.yaml
---
- name: TripleO PXE installation and configuration.
hosts: Undercloud
become: true
vars:
tripleo_backup_and_restore_shared_storage_folder: "{{ tripleo_backup_and_restore_ironic_images_path }}"
tripleo_backup_and_restore_shared_storage_subfolders: ["pxelinux.cfg"]
roles:
- role: backup_and_restore
EOF
After the playbook is created, let's execute ansible to apply the changes.
::
ansible-playbook \
-v -i ~/tripleo-inventory.yaml \
--extra="ansible_ssh_common_args='-o StrictHostKeyChecking=no'" \
--become \
--become-user root \
--tags bar_setup_nfs_server \
~/prepare-undercloud-pxe.yaml
Now, the overcloud nodes need to be configured. As before firstly the
playbook is created.
::
cat <<'EOF' > ~cli-overcloud-conf-ironic.yaml
---
- name: Get Undercloud data
hosts: Undercloud
tasks:
- name: Get networking
setup:
gather_subset: network
tags:
- never
- name: TripleO Ironic ReaR installation and configuration on Overcloud
hosts: Controller
become: true
vars:
tripleo_backup_and_restore_pxe_output_url: "nfs://{{ hostvars['undercloud']['ansible_facts']['br_ctlplane']['ipv4']['address'] }}{{ tripleo_backup_and_restore_ironic_images_path }}"
tripleo_backup_and_restore_local_config:
OUTPUT: PXE
OUTPUT_PREFIX_PXE: $HOSTNAME
BACKUP: NETFS
PXE_RECOVER_MODE: '"unattended"'
PXE_CREATE_LINKS: '"IP"'
USE_STATIC_NETWORKING: y
PXE_CONFIG_GRUB_STYLE: y
KERNEL_CMDLINE: '"unattended"'
POST_RECOVERY_SCRIPT: poweroff
USER_INPUT_TIMEOUT: "10"
PXE_TFTP_URL: "{{ tripleo_backup_and_restore_pxe_output_url }}"
BACKUP_URL: "{{ tripleo_backup_and_restore_backup_url }}"
PXE_CONFIG_URL: "{{ tripleo_backup_and_restore_pxe_output_url }}/pxelinux.cfg"
roles:
- role: backup_and_restore
EOF
Install and configure ReaR on the overcloud controller nodes. If the nodes are using OVS,
ReaR does not know how to configure the network so the
tripleo_backup_and_restore_network_preparation_commands needs to be configure.
::
ansible-playbook \
-v -i tripleo-inventory.yaml \
--extra="ansible_ssh_common_args='-o StrictHostKeyChecking=no'" \
--become \
--become-user root \
--tags bar_setup_rear \
~/cli-overcloud-conf-ironic.yaml \
-e "tripleo_backup_and_restore_network_preparation_commands=\"('ip l a br-ex type bridge' 'ip l s ens3 up' 'ip l s br-ex up' 'ip l s ens3 master br-ex' 'dhclient br-ex')\""
There are some playbooks that can be used to perform a backup of the nodes.
::
ansible-playbook \
-v -i ~/tripleo-inventory.yaml \
--extra="ansible_ssh_common_args='-o StrictHostKeyChecking=no'" \
--become \
--become-user root \
--tags bar_create_recover_image \
/usr/share/ansible/tripleo-playbooks/cli-overcloud-backup.yaml
In the same way to Restore a node there is also a playbook to achieve it.
The tripleo_backup_and_restore_overcloud_restore_name is the name, uuid or
hostname of the node that is going to be restored.
::
ansible-playbook \
-v -i tripleo-inventory.yaml \
/usr/share/ansible/tripleo-playbooks/cli-overcloud-restore-node.yml \
-e "tripleo_backup_and_restore_overcloud_restore_name=control-0"

View File

@ -1,6 +0,0 @@
===============
Role - env_data
===============
.. ansibleautoplugin::
:role: tripleo_ansible/roles/env_data

View File

@ -1,6 +0,0 @@
=============
Role - iscsid
=============
.. ansibleautoplugin::
:role: tripleo_ansible/roles/iscsid

View File

@ -1,10 +0,0 @@
=================
Role - login-defs
=================
Login-defs role installs default parameters for user account parameters. They
are used by useradd, usermod, userdel, groupadd and other group utilities.
Parameters are set in /etc/login.defs file.
.. ansibleautoplugin::
:role: tripleo_ansible/roles/login-defs

View File

@ -1,6 +0,0 @@
===============================
Role - octavia-overcloud-config
===============================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/octavia-overcloud-config

View File

@ -1,6 +0,0 @@
=====================
Role - octavia_common
=====================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/octavia_common

View File

@ -1,6 +0,0 @@
================================
Role - octavia-controller-config
================================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/octavia_controller_config

View File

@ -1,6 +0,0 @@
=====================================
Role - octavia-controller-post-config
=====================================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/octavia_controller_post_config

View File

@ -1,6 +0,0 @@
=========================
Role - octavia-undercloud
=========================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/octavia_undercloud

View File

@ -1,6 +0,0 @@
================
Role - test_deps
================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/test_deps

View File

@ -1,6 +0,0 @@
==========================
Role - test_package_action
==========================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/test_package_action

View File

@ -1,142 +0,0 @@
=======================
Role - tripleo-ovs-dpdk
=======================
Role Documentation
==================
Welcome to the "tripleo-ovs-dpdk" role documentation. This role enables and
configures DPDK in OpenvSwitch.
Requirements
------------
* Ensure hugepages is enabled
Role Defaults
-------------
- ``tripleo_ovs_dpdk_pmd_core_list``
- **Description**: (*Mandatory*) List of PMD Cores for DPDK. Its a
comma-separated string of logical cores. These core should be part
of ``isolcpus`` kernel parameter and be excluded from ``NovaComputeCpuDedicatedSet``
and from ``NovaComputeCpuSharedSet``
- **Default**: ``''``
- **Examples**: ``'1,13'``
- ``tripleo_ovs_dpdk_lcore_list``
- **Description**: (*Optional*) List of lcores for DPDK. Its a
comma-separated string of logical cores.
All ovs-vswitchd threads will be pinned to the first core declared
in the mask.
- **Default**: ``''``
- **Examples**: ``'0,12'``
- ``tripleo_ovs_dpdk_socket_memory``
- **Description**: (*Mandatory*) Memory in MB to be allocated on each NUMA
node for DPDK. Its a comma-separated string of memory in MB.
- **Default**: ``''``
- **Examples**:
- ``'1024'`` for a single NUMA memory allocation
- ``'1024,1024'`` for a dual NUMA memory allocation
- ``tripleo_ovs_dpdk_memory_channels``
- **Description**: (*Optional*) Number of memory channels in the memory
architecture. Its a number.
- **Default**: ``4``
- ``tripleo_ovs_dpdk_extra``
- **Description**: (*Optional*) Extra parameter to be passed on to DPDK for
initialization. Its a string.
- **Default**: ``''``
- ``tripleo_ovs_dpdk_revalidator_cores``
- **Description**: (*Optional*) Number of cores to he used for revalidator
threads. Its a string with a number, specifying the count of logical cores
to be used as revalidator threads.
- **Default**: ``''``
- **Examples**: ``'2'``
- ``tripleo_ovs_dpdk_handler_cores``
- **Description**: (*Optional*) Number of cores to be used for handler
threads. Its a string with a number, specifying the count of logical cores
to be used as handler threads.
- **Default**: ``''``
- **Examples**: ``'2'``
- ``tripleo_ovs_dpdk_emc_insertion_probablity``
- **Description**: (*Optional*) EMC insertion inverse probability. Its a
string with a number of flows (out of which 1 flow will cached). Having
100, results in caching 1 in 100 flows. Having 0, disables EMC cache.
- **Default**: ``''``
- **Examples**: ``'100'``
- ``tripleo_ovs_dpdk_enable_tso``
- **Description**: (*Optional*) Enable TSO support in OVS DPDK datapath.
- **Default**: ``false``
- **Examples**: ``true``
- ``tripleo_ovs_dpdk_pmd_auto_lb``
- **Description**: (*Optional*) Enable DPDK OVS PMD Auto Load Balance.
- **Default**: ``false``
- **Examples**: ``true``
- ``tripleo_ovs_dpdk_pmd_load_threshold``
- **Description**: (*Optional*) Minimum PMD thread load threshold, in range
0 to 100. Its a string with a number, specifies the minimum
PMD thread load threshold (% of used cycles) of any non-isolated PMD threads
when a PMD Auto Load Balance may be triggered.
- **Default**: ``''``
- **Examples**: ``'50'``
- ``tripleo_ovs_dpdk_pmd_improvement_threshold``
- **Description**: (*Optional*) PMD load variance improvement threshold, in range
0 to 100. Its a string with a number, specifies the minimum evaluated % improvement
in load distribution across the non-isolated PMD threads that will allow
a PMD Auto Load Balance to occur.
Note, setting this parameter to 0 will always allow an auto load balance to occur
regardless of estimated improvement or not.
- **Default**: ``''``
- **Examples**: ``'10'``
- ``tripleo_ovs_dpdk_pmd_rebal_interval``
- **Description**: (*Optional*) PMD auto load balancing interval, in range
0 to 20,000. Its a string with a number, specifies the minimum time (in minutes)
between 2 consecutive PMD Auto Load Balancing iterations. The defaul value is 1 min.
- **Default**: ``''``
- **Examples**: ``'5'``
Modules
-------
- ``openvswitch_db``
- **Description**: It is a ansible core module, which requires additional
changes which are in progress. Below are the pull requests against the
core module. Once these are merged, this module can be removed.
- https://github.com/ansible/ansible/pull/61092
- https://github.com/ansible/ansible/pull/60994
Dependencies
------------
None

View File

@ -1,6 +0,0 @@
=====================
Role - tripleo_auditd
=====================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_auditd

View File

@ -1,6 +0,0 @@
========================
Role - tripleo_bootstrap
========================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_bootstrap

View File

@ -1,6 +0,0 @@
=====================
Role - tripleo-cellv2
=====================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_cellv2

View File

@ -1,6 +0,0 @@
==========================
Role - tripleo_ceph_client
==========================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_ceph_client

View File

@ -1,6 +0,0 @@
================================
Role - tripleo_ceph_client_files
================================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_ceph_client_files

View File

@ -1,6 +0,0 @@
==========================
Role - tripleo-ceph-common
==========================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_ceph_common

View File

@ -1,6 +0,0 @@
===================================
Role - tripleo_ceph_distribute_keys
===================================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_ceph_distribute_keys

View File

@ -1,6 +0,0 @@
=============================
Role - tripleo-ceph-fetch-dir
=============================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_ceph_fetch_dir

View File

@ -1,16 +0,0 @@
===============================
Role - tripleo-ceph-run-ansible
===============================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_ceph_run_ansible
Required test arguments
~~~~~~~~~~~~~~~~~~~~~~~
+--------------------------+-------------------------------------------------+
| Environment Variable | Variable Value |
+==========================+=================================================+
| TRIPLEO_JOB_ANSIBLE_ARGS | '--skip-tags=run_uuid_ansible,run_ceph_ansible' |
+--------------------------+-------------------------------------------------+

View File

@ -1,16 +0,0 @@
========================
Role - tripleo-ceph-uuid
========================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_ceph_uuid
Required test arguments
~~~~~~~~~~~~~~~~~~~~~~~
+--------------------------+-------------------------------------------------+
| Environment Variable | Variable Value |
+==========================+=================================================+
| TRIPLEO_JOB_ANSIBLE_ARGS | '--skip-tags=run_uuid_ansible' |
+--------------------------+-------------------------------------------------+

View File

@ -1,6 +0,0 @@
============================
Role - tripleo-ceph-work-dir
============================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_ceph_work_dir

View File

@ -1,117 +0,0 @@
======================
Role - tripleo_cephadm
======================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_cephadm
About
~~~~~
An Ansible role for TripleO integration with Ceph clusters deployed with
`cephadm`_ and managed with Ceph `orchestrator`_.
This role is provided as part of the implementation of the `tripleo_ceph_spec`_.
It is an Ansible wrapper to call the Ceph tools `cephadm`_ and `orchestrator`_
and it contains the Ansible module `ceph_key`_ from `ceph-ansible`_.
Assumptions
~~~~~~~~~~~
- This role assumes it has an inventory with a single host, known as the
`bootstrap_host`. An inventory genereated by `tripleo-ansible-inventory`
will have a `mons` group so the first node in this group is a good
candidate for this host.
- The `cephadm`_ binary must be installed on the `bootstrap_host`.
- Though there only needs to be one Ceph node in the inventory `cephadm`_
will configure the other servers with SSH. Thus, the following playbook
should be run before one which uses this role to configure the `ceph-admin`
user on the overcloud with the SSH keys that `cephadm`_ requires.
.. code-block:: bash
ansible-playbook -i $INV \
tripleo-ansible/tripleo_ansible/playbooks/cli-enable-ssh-admin.yaml \
-e @ceph-admin.yml
Where `ceph-admin.yml` contains something like the following:
.. code-block:: YAML
---
tripleo_admin_user: ceph-admin
ssh_servers: "{{ groups['mons'] }}"
distribute_private_key: true
The `ssh_servers` variable should be expanded to contain another other nodes
hosting Ceph, e.g. `osds`.
- A `cephadm-spec`_ file should be provided which references the Ceph services
to be run on the other `ssh_hosts`. The path to this file can be set with
the `ceph_spec` variable.
Usage
~~~~~
Here is an example of a playbook which bootstraps the first Ceph monitor
and then applies a spec file to add other hosts. It then creates RBD pools
for Nova, Cinder, and Glance and a cephx keyring called `openstack` to access
those pools. It then creates a file which can be passed as input to the role
`tripleo_ceph_client` so that an overcloud can be configured to use the deployed
Ceph cluster.
.. code-block:: YAML
- name: Deploy Ceph with cephadm
hosts: mons[0]
vars:
bootstrap_host: "{{ groups['mons'][0] }}"
tripleo_cephadm_spec_on_bootstrap: false
pools:
- vms
- volumes
- images
tasks:
- name: Satisfy Ceph prerequisites
import_role:
role: tripleo_cephadm
tasks_from: pre
- name: Bootstrap Ceph
import_role:
role: tripleo_cephadm
tasks_from: bootstrap
- name: Apply Ceph spec
import_role:
role: tripleo_cephadm
tasks_from: apply_spec
when: not tripleo_cephadm_spec_on_bootstrap
- name: Create Pools
import_role:
role: tripleo_cephadm
tasks_from: pools
- name: Create Keys
import_role:
role: tripleo_cephadm
tasks_from: keys
- name: Export configuration for tripleo_ceph_client
import_role:
role: tripleo_cephadm
tasks_from: export
vars:
cephx_keys:
- client.openstack
.. _tripleo_ceph_spec: https://specs.openstack.org/openstack/tripleo-specs/specs/wallaby/tripleo-ceph.html
.. _cephadm: https://docs.ceph.com/en/latest/cephadm/
.. _orchestrator: https://docs.ceph.com/en/latest/mgr/orchestrator/
.. _ceph_key: https://github.com/ceph/ceph-ansible/blob/master/library/ceph_key.py
.. _ceph-ansible: https://github.com/ceph/ceph-ansible/
.. _cephadm-spec: https://tracker.ceph.com/issues/44205

View File

@ -1,6 +0,0 @@
==============================
Role - tripleo-clients-install
==============================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_clients_install

View File

@ -1,6 +0,0 @@
=======================
Role - tripleo_collectd
=======================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_collectd

View File

@ -1,6 +0,0 @@
===========================
Role - tripleo_compute_node
===========================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_compute_node

View File

@ -1,6 +0,0 @@
=====================
Role - tripleo-config
=====================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_config

View File

@ -1,50 +0,0 @@
====================================
Role - tripleo_container_image_build
====================================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_container_image_build
This is an example application variable file.
.. code-block:: yaml
---
# FROM
tcib_from: "ubi8"
# Path where container file be generated
tcib_path: "{{ lookup('env', 'HOME') }}/tripleo-base"
# this ends up being a LABEL
tcib_labels:
maintainer: "TripleO"
# ENTRYPOINT
tcib_entrypoint: "dumb-init --single-child --"
# STOPSIGNAL
tcib_stopsignal: "SIGTERM"
# ENV
tcib_envs:
LANG: en_US.UTF-8
# RUN commands
tcib_runs:
- mkdir -p /etc/ssh
- touch /etc/ssh/ssh_known_host
- mkdir -p /openstack
- dnf install -y crudini curl
# COPY
tcib_copies:
- /usr/share/tripleo-common/healthcheck/common.sh /openstack/common.sh
This role can be used with the TripleO playbook, `cli-generate-containerfile.yaml`.
.. code-block:: shell
ansible-playbook -i 'localhost,' /usr/share/ansible/tripleo-playbooks/cli-generate-containerfile.yaml -e @~/tripleo-base.yaml

View File

@ -1,6 +0,0 @@
======================================
Role - tripleo-container-image-prepare
======================================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_container_image_prepare

View File

@ -1,214 +0,0 @@
===============================
Role - tripleo_container_manage
===============================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_container_manage
Usage
~~~~~
Note that right now, only Podman is supported by this role. Docker support is
in the roadmap though.
This Ansible role allows to do the following tasks:
* Collect container configs data, generated by TripleO Heat Templates.
This data is used as a source of truth on which configuration we expect to
apply with this role. It means that if a container is already managed by
this role, no matter its state now, the configs data will reconfigure the
container if needed.
* Manage systemd shutdown files.
It takes care of cleaning up the Paunch services and files and create
the TripleO Container systemd service, required for service ordering when
it comes to shutdown or start a node. It also manages the netns-placeholder
service.
* Delete containers that aren't needed anymore or that will need to be
re-configured. It uses a custom filter, named needs_delete() which has a set
of rules which allow to determine if whether or not the container needs to be
deleted.
These reasons will make the containers not deleted:
* The container is not managed by tripleo_ansible.
* The container config_id doesn't match with the one in input.
Once the previous conditions checked, then these reasons will make the
containers deleted:
* The container has no config_data.
* The container has a config_data which doesn't match the one in input.
Note that when a container is removed, the role also disable and remove
the systemd services and healtchecks if present.
* Create containers in a specific order defined by start_order container
config, where default is 0.
* If the container is an exec, we'll run a dedicated playbook for execs,
using async so multiple execs can be run at the same time.
* Otherwise, the `podman_container`_ is used, in async, to create the
containers.
If the container has a `restart` policy, we'll configure the systemd
service.
If the container has a `healthcheck` script, we'll configure the systemd
healthcheck service.
Note: `tripleo_container_manage_concurrency` parameter is set to 1 by
default, and putting higher value than 2 can be expose issue with Podman
locks.
Here is an example of a playbook:
.. code-block:: YAML
- name: Manage step_1 containers using tripleo-ansible
block:
- name: "Manage containers for step 1 with tripleo-ansible"
include_role:
name: tripleo_container_manage
vars:
tripleo_container_manage_config: "/var/lib/tripleo-config/container-startup-config/step_1"
tripleo_container_manage_config_id: "tripleo_step1"
Roles variables
~~~~~~~~~~~~~~~
+------------------------------------------------+-----------------------------+----------------------------+
| Name | Default Value | Description |
+================================================+=============================+============================+
| tripleo_container_manage_cli | podman | Container CLI |
+------------------------------------------------+-----------------------------+----------------------------+
| tripleo_container_manage_concurrency | 1 | Number of containers |
| | | managed at same time |
+------------------------------------------------+-----------------------------+----------------------------+
| tripleo_container_manage_config | /var/lib/tripleo-config/ | Container config path |
+------------------------------------------------+-----------------------------+----------------------------+
| tripleo_container_manage_config_id | tripleo | Config ID |
+------------------------------------------------+-----------------------------+----------------------------+
| tripleo_container_manage_config_patterns | `*.json` | Bash REGEX to find configs |
+------------------------------------------------+-----------------------------+----------------------------+
| tripleo_container_manage_debug | false | Debug toggle |
+------------------------------------------------+-----------------------------+----------------------------+
| tripleo_container_manage_healthcheck_disable | false | Allow to disable |
| | | Healthchecks |
+------------------------------------------------+-----------------------------+----------------------------+
| tripleo_container_manage_log_path | /var/log/containers/stdouts | Containers stdouts path |
+------------------------------------------------+-----------------------------+----------------------------+
| tripleo_container_manage_config_overrides | {} | Allows to override any |
| | | container configuration |
+------------------------------------------------+-----------------------------+----------------------------+
| tripleo_container_manage_clean_orphans | true | Option to clean orphans |
+------------------------------------------------+-----------------------------+----------------------------+
Healthchecks
~~~~~~~~~~~~
Previously, the container healthcheck was implemented by a systemd timer which
would run ``podman exec`` to determine if a given container was healthy..
Now, we are using the native healthcheck interface in Podman; which is easier
to integrate and consume.
We are now using the native healthcheck interface in Podman; which is easier to
integrate with and consume.
To check if a container (e.g. keystone) is healthy, run the following command:
.. code-block:: bash
$ sudo podman healthcheck run keystone
The return code should be 0 and "healthy" should be printed as the output.
One can also use the ``podman inspect keystone`` output to figure out that
the healthcheck is periodically running and healthy:
.. code-block:: bash
"Health": {
"Status": "healthy",
"FailingStreak": 0,
"Log": [
{
"Start": "2020-04-14T18:48:57.272180578Z",
"End": "2020-04-14T18:48:57.806659104Z",
"ExitCode": 0,
"Output": ""
},
(...)
]
}
Debug
~~~~~
The role allows you to perform specific actions on a given container.
This can be used to:
* Run a container with a specific one-off configuration.
* Output the container commands that are run to to manage containers lifecycle.
* Output the changes that would have been made on containers by Ansible.
.. note:: To manage a single container, you need to know 2 things:
* At which step the container is deployed.
* The name of the generated JSON file for container config.
Here is an example of a playbook to manage HAproxy container at step 1 which
overrides the image setting in one-off.
.. code-block:: YAML
- hosts: localhost
become: true
tasks:
- name: Manage step_1 containers using tripleo-ansible
block:
- name: "Manage HAproxy container at step 1 with tripleo-ansible"
include_role:
name: tripleo_container_manage
vars:
tripleo_container_manage_config_patterns: 'haproxy.json'
tripleo_container_manage_config: "/var/lib/tripleo-config/container-startup-config/step_1"
tripleo_container_manage_config_id: "tripleo_step1"
tripleo_container_manage_clean_orphans: false
tripleo_container_manage_config_overrides:
haproxy:
image: quay.io/tripleomastercentos9/centos-binary-haproxy:hotfix
If Ansible is run in check mode, no container will be removed nor created,
however at the end of the playbook a list of commands will be displayed to show
what would have been run.
This is useful for debug purposes, as it was something that one could do with
`paunch debug` command.
.. code-block:: bash
$ ansible-playbook haproxy.yaml --check
Adding the diff mode will output the changes what would have been made on
containers by Ansible.
.. code-block:: bash
$ ansible-playbook haproxy.yaml --check --diff
The ``tripleo_container_manage_clean_orphans`` parameter is optional
and can be set to `false` to not clean orphaned containers for a
config_id. It can be used to manage a single container without
impacting other running containers with same config_id.
The ``tripleo_container_manage_config_overrides`` parameter is optional
and can be used to override a specific container attribute like the image
or the container user. The parameter takes a dictionary where each key is the
container name and its parameters that we want to override. These parameters
have to exist and are the ones that define the container configuration in
TripleO Heat Templates. Note that it doesn't write down the overrides in the
JSON file so if an update / upgrade is executed, the container will be
re-configured with the configuration that is in the JSON file.
.. _podman_container: https://github.com/containers/ansible-podman-collections

View File

@ -1,6 +0,0 @@
===========================
Role - tripleo-container-rm
===========================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_container_rm

View File

@ -1,6 +0,0 @@
===================================
Role - tripleo_container_standalone
===================================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_container_standalone

Some files were not shown because too many files have changed in this diff Show More