diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 3a772066..00000000 --- a/.gitignore +++ /dev/null @@ -1,69 +0,0 @@ -# Add patterns in here to exclude files created by tools integrated with this -# repository, such as test frameworks from the project's recommended workflow, -# rendered documentation and package builds. -# -# Don't add patterns to exclude files created by preferred personal tools -# (editors, IDEs, your operating system itself even). These should instead be -# maintained outside the repository, for example in a ~/.gitignore file added -# with: -# -# git config --global core.excludesfile '~/.gitignore' - -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so -*.pyc -build/ -dist/ -doc/build/ - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite -logs/* - -# OS generated files # -###################### -._* -.tox -*.egg-info -.eggs - -# Generated by pbr while building docs -###################################### -AUTHORS -ChangeLog - -# Files created by releasenotes build -releasenotes/build - -# Test temp files -tests/common -tests/*.retry - -# Vagrant artifacts -.vagrant - -# Git clones -openstack-ansible-ops -previous diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst deleted file mode 100644 index 49404479..00000000 --- a/CONTRIBUTING.rst +++ /dev/null @@ -1,19 +0,0 @@ -The source repository for this project can be found at: - - https://opendev.org/openstack/openstack-ansible-tests - -Pull requests submitted through GitHub are not monitored. - -To start contributing to OpenStack, follow the steps in the contribution guide -to set up and use Gerrit: - - https://docs.openstack.org/contributors/code-and-documentation/quick-start.html - -Bugs should be filed on Launchpad: - - https://bugs.launchpad.net/openstack-ansible - -For more specific information about contributing to this repository, see the -openstack-ansible contributor guide: - - https://docs.openstack.org/openstack-ansible/latest/contributor/contributing.html diff --git a/LICENSE b/LICENSE deleted file mode 100644 index e06d2081..00000000 --- a/LICENSE +++ /dev/null @@ -1,202 +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. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - 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. - diff --git a/README.rst b/README.rst index 8eaae1f7..17050328 100644 --- a/README.rst +++ b/README.rst @@ -1,95 +1,11 @@ -======================== -Team and repository tags -======================== +This project is no longer maintained. -.. image:: https://governance.openstack.org/tc/badges/openstack-ansible-tests.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 - -OpenStack-Ansible testing -========================= - -This is the ``openstack-ansible-tests`` repository, providing a framework and -consolidation of testing configuration and playbooks. This can be used to -integrate new projects, and ensure that code duplication is minimized whilst -allowing the addition of new testing scenarios with greater ease. - -Role Integration -~~~~~~~~~~~~~~~~ - -To enable the ``openstack-ansible-tests`` repository, ensure that the -``tox.ini`` configuration in the role repository matches the `galera_client -repository tox.ini`_ with the exception of the value for ``ROLE_NAME``. -A more advanced configuration which implements multiple functional test -scenarios is available in the `neutron role tox.ini`_. - -To override variables you can create a ``${rolename}-overrides.yml`` file inside the -role's tests folder. This variable file can be includes in the functional tox -target configuration in ``tox.ini`` as demonstrated in the following extract: - -.. code-block:: bash - - ansible-playbook -i {toxinidir}/tests/inventory \ - -e @{toxinidir}/tests/${rolename}-overrides.yml \ - {toxinidir}/tests/test.yml -vvvv - -In your repositories ``tests/test.yml`` file, you can call any of the -included playbooks, for example: - -.. code-block:: yaml - - - include: common/test-prepare-keys.yml - -.. _galera_client repository tox.ini: https://opendev.org/openstack/openstack-ansible-galera_client/src/tox.ini -.. _neutron role tox.ini: https://opendev.org/openstack/openstack-ansible-os_neutron/src/tox.ini - -Network Settings -~~~~~~~~~~~~~~~~ - -The networking can be configured and setup using the ``bridges`` variable. - -The base option, when only 1 interface is required is to specify just a single -base - this is only for backwards compatibility with existing test setup and -will default to ``br-mgmt`` with an IP of ``10.1.0.1``. - -.. code-block:: yaml - - bridges: - - "br-mgmt" - -To allow a more complicated network setup we can specify -``ip_addr``: The IP address on the interface. -``netmask``: Netmask of the interface (defaults to 255.255.255.0) -``name``: Name of the interface -``veth_peer``: Set up a veth peer for the interface -``alias``: Add an alias IP address - -For example, a Nova setup may look like this: - -.. code-block:: yaml - - bridges: - - name: "br-mgmt" - ip_addr: "10.1.0.1" - - name: "br-vxlan" - ip_addr: "10.1.1.1" - - name: "br-vlan" - ip_addr: "10.1.2.200" - veth_peer: "eth12" - alias: "10.1.2.1" - -Documentation for the project can be found at: - https://docs.openstack.org/openstack-ansible-tests/latest/ - -Release notes for the project can be found at: - https://docs.openstack.org/releasenotes/openstack-ansible-tests/ - -The project source code repository is located at: - https://opendev.org/openstack/openstack-ansible-tests - -The project home is at: - https://launchpad.net/openstack-ansible - -The project bug tracker is located at: - https://bugs.launchpad.net/openstack-ansible +For any further questions, please email +openstack-discuss@lists.openstack.org and mention +``[openstack-ansible]`` in the topic or join #openstack-ansible on +OFTC. diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 2a83de46..00000000 --- a/Vagrantfile +++ /dev/null @@ -1,46 +0,0 @@ -# Note: -# This file is maintained in the openstack-ansible-tests repository. -# https://opendev.org/openstack/openstack-ansible-tests/src/Vagrantfile -# -# If you need to perform any change on it, you should modify the central file, -# then, an OpenStack CI job will propagate your changes to every OSA repository -# since every repo uses the same Vagrantfile - -# Verify whether required plugins are installed. -required_plugins = [ "vagrant-disksize" ] -required_plugins.each do |plugin| - if not Vagrant.has_plugin?(plugin) - raise "The vagrant plugin #{plugin} is required. Please run `vagrant plugin install #{plugin}`" - end -end - -Vagrant.configure(2) do |config| - config.vm.provider "virtualbox" do |v| - v.memory = 6144 - v.cpus = 2 - # https://github.com/hashicorp/vagrant/issues/9524 - v.customize ["modifyvm", :id, "--audio", "none"] - end - - config.vm.synced_folder ".", "/vagrant", type: "rsync" - - config.vm.provision "shell", - privileged: false, - inline: <<-SHELL - cd /vagrant - ./run_tests.sh - SHELL - - config.vm.define "centos8" do |centos8| - centos8.vm.box = "centos/8" - end - - config.vm.define "debian10" do |debian10| - debian10.vm.box = "debian/buster64" - end - - config.vm.define "ubuntu2004" do |focal| - focal.disksize.size = "40GB" - focal.vm.box = "ubuntu/focal64" - end -end diff --git a/bindep.txt b/bindep.txt deleted file mode 100644 index 3db7d137..00000000 --- a/bindep.txt +++ /dev/null @@ -1,47 +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/openstack-infra/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. -# -# Note: -# This file is maintained in the openstack-ansible-tests repository. -# https://opendev.org/openstack/openstack-ansible-tests/src/bindep.txt -# If you need to remove or add extra dependencies, you should modify -# the central file instead and once your change is accepted then update -# this file as well. The purpose of this file is to ensure that Python and -# Ansible have all their necessary binary requirements on the test host before -# tox executes. Any binary requirements needed by services/roles should be -# installed by those roles in their applicable package install tasks, not through -# using this file. -# - -# The gcc compiler -gcc - -# Base requirements for Ubuntu -git-core [platform:dpkg] -libssl-dev [platform:dpkg] -libffi-dev [platform:dpkg] -python3 [platform:dpkg] -python3-apt [platform:dpkg] -python3-dev [platform:dpkg] - -# Base requirements for RPM distros -gcc-c++ [platform:rpm] -git [platform:rpm] -libffi-devel [platform:rpm] -openssl-devel [platform:rpm] -python3-dnf [platform:fedora] -python3-devel [platform:rpm] - -# For SELinux -libselinux-python3 [platform:redhat] -libsemanage-python3 [platform:redhat] -iptables [platform:redhat] diff --git a/common-tasks/haproxy-endpoint-manage.yml b/common-tasks/haproxy-endpoint-manage.yml deleted file mode 100644 index 328df44e..00000000 --- a/common-tasks/haproxy-endpoint-manage.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -# Copyright 2017, Logan Vig -# -# 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: Set haproxy service state - haproxy: - socket: /var/run/haproxy.stat - backend: "{{ haproxy_backend | default(omit) }}" - host: "{{ inventory_hostname }}" - state: "{{ haproxy_state | default('enabled') }}" - shutdown_sessions: "{{ haproxy_shutdown_sessions | default(False) | bool }}" - wait: "{{ haproxy_wait | default(False) | bool }}" - wait_interval: "{{ haproxy_wait_interval | default(5) }}" - wait_retries: "{{ haproxy_wait_retries | default(24) }}" - weight: "{{ haproxy_weight | default(omit) }}" - delegate_to: "{{ item }}" - with_items: "{{ groups['haproxy'] }}" - # Due to the use of delegation to localhost - # in this task, we also need to set 'become' - # otherwise the task does not have access to - # the socket because it's executed as the - # user running the playbook (zuul). - become: yes - tags: - - common-haproxy diff --git a/common-tasks/test-set-nodepool-vars.yml b/common-tasks/test-set-nodepool-vars.yml deleted file mode 100644 index 3ff974e4..00000000 --- a/common-tasks/test-set-nodepool-vars.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -# Copyright 2016, Rackspace US, Inc. -# -# 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: Ensure ci data exists before setting variables. - stat: - path: /etc/ci/mirror_info.sh - register: ci_mirror_info - delegate_to: localhost - -- name: Set nodepool vars - when: ci_mirror_info.stat.exists - block: - - name: Discover variables from OpenStack's CI environment when in nodepool - shell: | - source /etc/ci/mirror_info.sh - echo "lxc_reverse_proxy=${NODEPOOL_MIRROR_HOST}" - echo "uca_apt_repo_url=${NODEPOOL_UCA_MIRROR}" - echo "openstack_hosts_centos_mirror_url=${NODEPOOL_CENTOS_MIRROR}" - echo "pip_default_index=${NODEPOOL_PYPI_MIRROR}" - echo "pip_wheel_mirror=${NODEPOOL_WHEEL_MIRROR}" - echo "centos_epel_mirror=${NODEPOOL_EPEL_MIRROR}" - echo "galera_percona_xtrabackup_repo_host=${NODEPOOL_PERCONA_PROXY}" - if [[ ${NODEPOOL_PYPI_MIRROR} == *.ovh.* ]]; then - echo "nova_virt_type=qemu" - fi - echo "repo_build_pip_default_index=${NODEPOOL_PYPI_MIRROR}" - echo "nspawn_hosts_container_image_repo=${NODEPOOL_LXC_IMAGE_PROXY}" - - source /etc/os-release - if [[ $ID == 'centos' && VERSION_ID == '8' ]]; then - echo "openstack_hosts_rdo_mirror_url=${NODEPOOL_RDO_PROXY}" - fi - args: - executable: /bin/bash - register: nodepool_variables - delegate_to: localhost - changed_when: false - tags: - - skip_ansible_lint - - - name: Set facts automatically from OpenStack's CI environment variables - set_fact: - "{{ item.split('=', 1)[0] }}": "{{ item.split('=', 1)[1] }}" - with_items: - - "{{ nodepool_variables.stdout_lines }}" - - - name: Set facts manually when in nodepool - set_fact: - lxc_image_cache_server_mirrors: - - "http://{{ lxc_reverse_proxy }}:8080/images.linuxcontainers/" - # CentOS mirrors are set to OpenStack's CI mirrors, so fastestmirror is - # disabled to speed up package downloads. - openstack_hosts_enable_yum_fastestmirror: no - pip_links: - - name: "infra_wheel_mirror" - link: "{{ pip_wheel_mirror }}" diff --git a/create-grant-db.yml b/create-grant-db.yml deleted file mode 100644 index 4aa8fbcf..00000000 --- a/create-grant-db.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Create DB for service - mysql_db: - login_user: "root" - login_password: "secrete" - login_host: "127.0.0.1" - name: "{{ db_name }}" - state: "present" - delegate_to: "{{ groups['galera_all'][0] }}" - run_once: True - no_log: true -- name: Grant access to the DB for the service - mysql_user: - login_user: "root" - login_password: "secrete" - login_host: "127.0.0.1" - name: "{{ db_user | default(db_name) }}" - password: "{{ db_password }}" - host: "{{ item }}" - state: "present" - priv: "{{ db_name }}.*:ALL" - append_privs: "{{ db_append_privs | default(omit) }}" - with_items: - - "localhost" - - "%" - delegate_to: "{{ groups['galera_all'][0] }}" - run_once: True - no_log: true diff --git a/destroy_containers.yml b/destroy_containers.yml deleted file mode 100644 index bf7088e0..00000000 --- a/destroy_containers.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Playbook for destroying test containers - hosts: all_containers - remote_user: root - # Due to the use of delegation to localhost - # in this task, we also need to set 'become' - # otherwise the task does not have access to - # the socket because it's executed as the - # user running the playbook (zuul). - become: yes - gather_facts: false - tasks: - - name: Destroy a container - lxc_container: - name: "{{ container_name }}" - state: "absent" - delegate_to: "{{ physical_host }}" - tags: - - container-destroy - - name: Destroy container service directories - file: - path: "{{ item }}" - state: "absent" - with_items: - - "/openstack/{{ container_name }}" - - "/openstack/backup/{{ container_name }}" - - "/openstack/log/{{ container_name }}" - - "/var/lib/lxc/{{ container_name }}" - - "{{ lxc_container_directory | default('/var/lib/lxc') }}/{{ container_name }}" - - "/var/log/lxc/lxc-{{ container_name }}" - delegate_to: "{{ physical_host }}" - tags: - - container-directories-service - - name: Destroy container data directories - file: - path: "{{ item }}" - state: "absent" - with_items: - - "/openstack/{{ container_name }}" - - "/openstack/backup/{{ container_name }}" - - "/openstack/log/{{ container_name }}" - delegate_to: "{{ physical_host }}" - when: - - force_containers_destroy | bool - - force_containers_data_destroy | bool - tags: - - container-directories-data - vars_files: - - test-vars.yml diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index 224fc9ba..00000000 --- a/doc/Makefile +++ /dev/null @@ -1,195 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - -clean: - rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/openstack-ansible-os_nova.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/openstack-ansible-os_nova.qhc" - -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/openstack-ansible-os_nova" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/openstack-ansible-os_nova" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." - -livehtml: html - sphinx-autobuild -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html diff --git a/doc/requirements.txt b/doc/requirements.txt deleted file mode 100644 index 07801f87..00000000 --- a/doc/requirements.txt +++ /dev/null @@ -1,16 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. - -# WARNING: -# This file is maintained in the openstack-ansible-tests repository. -# https://opendev.org/openstack/openstack-ansible-tests/src/branch/master/sync/doc/requirements.txt -# If you need to modify this file, update the one in the -# openstack-ansible-tests repository. Once it merges there, the changes will -# automatically be proposed to all the repositories which use it. - -sphinx>=2.0.0,!=2.1.0 # BSD -sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD -openstackdocstheme>=2.2.1 # Apache-2.0 -reno>=3.1.0 # Apache-2.0 -doc8>=0.6.0 # Apache-2.0 diff --git a/doc/source/_static/.gitkeep b/doc/source/_static/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/doc/source/conf.py b/doc/source/conf.py deleted file mode 100644 index 0b26c71e..00000000 --- a/doc/source/conf.py +++ /dev/null @@ -1,287 +0,0 @@ -#!/usr/bin/env python3 - -# 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. - -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# needs_sphinx = '1.0' - -# 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', - 'sphinxcontrib.rsvgconverter', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -author = 'OpenStack-Ansible Contributors' -category = 'Miscellaneous' -copyright = '2014-2016, OpenStack-Ansible Contributors' -description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.' -role_name = 'tests' -target_name = 'openstack-ansible-' + role_name -title = 'OpenStack-Ansible Documentation: ' + role_name + 'role' - -# openstackdocstheme options -openstackdocs_repo_name = 'openstack/' + target_name -openstackdocs_pdf_link = True -openstackdocs_bug_project = 'openstack-ansible' -openstackdocs_bug_tag = '' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = 'en' - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# today = '' -# Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# default_role = None - -# 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 - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'native' - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'openstackdocs' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -# html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -# html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# html_extra_path = [] - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -# html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# html_additional_pages = {} - -# If false, no module index is generated. -# html_domain_indices = True - -# If false, no index is generated. -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr' -# html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -# html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -# html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = target_name + '-docs' - -# -- Options for LaTeX output --------------------------------------------- - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'doc-' + target_name + '.tex', - title, author, 'manual'), -] - -latex_use_xindy = False - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, target_name, - title, [author], 1) -] - -# If true, show URL addresses after external links. -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, target_name, - title, author, "OpenStack-Ansible", - description, category), -] - -# Documents to append as an appendix to all manuals. -# texinfo_appendices = [] - -# If false, no module index is generated. -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False -# -- Options for PDF output -------------------------------------------------- - -pdf_documents = [ - (master_doc, target_name, - title, author) -] - -locale_dirs = ['locale/'] diff --git a/doc/source/index.rst b/doc/source/index.rst deleted file mode 100644 index 165b7dd0..00000000 --- a/doc/source/index.rst +++ /dev/null @@ -1,2 +0,0 @@ -.. include:: ../../README.rst - diff --git a/gen-projects-list.sh b/gen-projects-list.sh deleted file mode 100755 index 7828d963..00000000 --- a/gen-projects-list.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -# Copyright 2017, SUSE LINUX GmbH. -# -# 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. - -# Get list of all the maintained OpenStack Ansible projects - -# 'exclude_projects' variable should contain all the OSA projects -# listed in https://opendev.org/ but should be excluded -# from the generated list for various reasons (ie unmaintained, -# not applicable etc) - -# Do not leave empty lines since grep -F will not match anything - -set -e - -exclude_project() { - excluded_projects+="openstack/$1 " -} - -extra_include_project() { - extra_included_projects+="openstack/$1 " -} - -############## EXCLUDED PROJECTS ###################### -# -# List of the projects that need to be excluded for various -# reasons -# -# retired projects -exclude_project openstack-ansible-os_freezer -exclude_project openstack-ansible-os_swift_sync -exclude_project openstack-ansible-pip_lock_down -exclude_project openstack-ansible-py_from_git -exclude_project openstack-ansible-security -# ansible-tests is where we are so we know it's maintained -exclude_project openstack-ansible-tests -# -############## END OF EXCLUDED PROJECTS ############### - -############## INCLUDED PROJECTS ###################### -# -# List of additional projects that need to be included for various -# reasons -# -# ansible-hardening. Used by AIO in favor of the retired -# openstack-ansible-security -extra_include_project ansible-config_template -extra_include_project ansible-hardening -extra_include_project ansible-role-python_venv_build -extra_include_project ansible-role-systemd_mount -extra_include_project ansible-role-systemd_networkd -extra_include_project ansible-role-systemd_service -############## END OF INCLUDED PROJECTS ############### - -# Replace spaces with newlines as expected by grep -F -excluded_projects="$(echo ${excluded_projects} | tr ' ' '\n')" - -# The output should only contain a list of projects or an empty string. -# Anything else will probably make the CI bots to fail. - -ssh -p 29418 proposal-bot@review.opendev.org gerrit ls-projects --prefix openstack/openstack-ansible- | \ - grep -v -F "${excluded_projects}" | uniq | sort -n - -for x in ${extra_included_projects[@]}; do - echo $x -done diff --git a/get-ansible-collection-requirements.yml b/get-ansible-collection-requirements.yml deleted file mode 100644 index 661ec9e7..00000000 --- a/get-ansible-collection-requirements.yml +++ /dev/null @@ -1,84 +0,0 @@ ---- -# Copyright 2020 BBC R&D. -# -# 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: Clone collections ansible-collection-requirements - hosts: localhost - connection: local - become: no - gather_facts: false - tasks: - - name: Get Zuul cloned repos path in CI - set_fact: - zuul_src_path: "/home/zuul/src" - - - name: Generate a list of required collections excluding user overridden collections - set_fact: - galaxy_collections_list : "{{ (galaxy_collections_list | default([])) + [ item ] }}" - with_items: "{{ required_collections.collections }}" - - - name: Check the Zuul src dir for cloned collections - stat: - path: "{{ zuul_src_path }}/{{ item.source.split('/')[2:] | join('/') | split('#') | first }}" - get_attributes: no - get_checksum: no - get_mime: no - register: zuul_collections - with_items: "{{ galaxy_collections_list }}" - - - name: Override paths for zuul hosted collections in CI - vars: - zuul_item: - name: "{{ item.item.name }}" - source: "{{ zuul_src_path }}/{{ item.item.source.split('/')[2:] | join('/') | replace('#', '') }}" - type: "dir" - set_fact: - galaxy_collections_list_ci: "{{ galaxy_collections_list_ci | default([]) + [(zuul_src_path and item.stat.exists) | ternary(zuul_item, item.item)] }}" - with_items: "{{ zuul_collections.results }}" - - - name: Create temporary file for galaxy collection requirements - tempfile: - register: collection_requirements_tmpfile - - - name: Copy content into galaxy collection requirements temporary file - vars: - content_var: - collections: "{{ galaxy_collections_list_ci }}" - copy: - content: "{{ content_var | to_nice_yaml }}" - dest: "{{ collection_requirements_tmpfile.path }}" - - - name: Install collection requirements with ansible galaxy - become: True - command: > - {{ ansible_venv | ternary(ansible_venv, '/usr') }}/bin/ansible-galaxy collection install --force - -r "{{ collection_requirements_tmpfile.path }}" -p /etc/ansible - register: collection_install - until: collection_install is success - retries: 5 - delay: 2 - - - name: Show collection install output - debug: msg="{{ collection_install.stdout.split('\n') }}" - - - name: Clean up temporary file - file: - path: "{{ collection_requirements_tmpfile.path }}" - state: absent - - vars: - collection_file: "{{ lookup('env', 'ANSIBLE_COLLECTION_REQUIREMENTS_PATH') }}" - required_collections: >- - {{ lookup('file', collection_file | ternary(collection_file, 'test-ansible-collection-requirements.yml')) | from_yaml }} - ansible_venv: "{{ lookup('env', 'VIRTUAL_ENV') }}" diff --git a/get-ansible-role-requirements.yml b/get-ansible-role-requirements.yml deleted file mode 100644 index edb6014b..00000000 --- a/get-ansible-role-requirements.yml +++ /dev/null @@ -1,142 +0,0 @@ ---- -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -# Note(odyssey4me): -# This uses a local connection for the lint test which -# never sets up host keys and therefore cannot connect -# to localhost as a remote host. -# -- name: Clone the role ansible-role-requirements - hosts: localhost - connection: local - become: no - gather_facts: false - tasks: - - - name: Set name for role under testing - set_fact: - role_name: "{{ lookup('env', 'ROLE_NAME') | default('') }}" - - - name: Remove target role directories if they are not git repositories - shell: | - EXIT_CODE=0 - {% for role in osa_roles %} - {% if role['scm'] == "git" or role['scm'] is undefined %} - ROLE_REPO_PATH="{{ lookup('env', 'ANSIBLE_ROLE_DEP_DIR') }}/{{ role['name'] | default(role['src'] | basename) }}" - if [[ -e ${ROLE_REPO_PATH} ]] && [[ ! -d "${ROLE_REPO_PATH}/.git" ]]; then - echo "${ROLE_REPO_PATH} is not a git repo, deleting..." - rm -rf "${ROLE_REPO_PATH}" - EXIT_CODE=2 - fi - {% endif %} - {% endfor %} - exit ${EXIT_CODE} - args: - executable: /bin/bash - register: existing_dir_cleanup - changed_when: existing_dir_cleanup.rc == 2 - failed_when: existing_dir_cleanup.rc not in [0,2] - - - name: Create the ansible role directory - file: - dest: "{{ lookup('env', 'ANSIBLE_ROLE_DEP_DIR') }}" - state: directory - - - name: Check whether we are in openstack-ci - stat: - path: /etc/ci/mirror_info.sh - register: _openstack_ci - - - name: Clone git repos (outside openstack-ci) - when: not _openstack_ci.stat.exists - block: - - name: Clone git repos - git: - repo: "{{ item['src'] }}" - dest: "{{ lookup('env', 'ANSIBLE_ROLE_DEP_DIR') }}/{{ item['name'] | default(item['src'] | basename) }}" - version: "{{ item['version'] | default('master') }}" - refspec: "{{ item['refspec'] | default(omit) }}" - depth: "{{ item['depth'] | default('10') }}" - update: true - force: true - with_items: "{{ osa_roles }}" - retries: "{{ git_clone_retries | default(3) }}" - delay: "{{ git_clone_retry_delay | default(5) }}" - when: - - item['scm'] == "git" or item['scm'] is undefined - - role_name == '' or item['name'] != role_name - - - name: Clone git repos (inside openstack-ci) - when: _openstack_ci.stat.exists - block: - - name: Find repositories already cloned by zuul - command: "find {{ zuul_git_src_dir }} -type d -maxdepth 2" - register: zuul_src_folder - - - name: Simplify the given src repository list - set_fact: - zuul_src_repo_list: > - {%- set filtered_repo_list = [] %} - {%- for folder_path in zuul_src_folder['stdout_lines'] %} - {%- if folder_path is match("^" ~ zuul_git_src_dir ~ "/openstack/(openstack-ansible-|ansible-role-){1}(?!tests).*") %} - {%- set repo_cleaned = folder_path | regex_replace('^' ~ zuul_git_src_dir ~ '/', '') %} - {%- set _ = filtered_repo_list.append(repo_cleaned) %} - {%- endif %} - {%- endfor %} - {{- filtered_repo_list -}} - - - name: Prepare git clone list - set_fact: - git_roles: > - {%- set filtered_role_list = [] %} - {%- for role in osa_roles %} - {%- if (role['name'] is match('os_previous_.*')) or - (role['name'] is match('previous_.*')) or - (role['src'] | regex_replace('https://(?:git.openstack.org|opendev.org)/', '') not in zuul_src_repo_list) %} - {%- set _ = filtered_role_list.append(role) %} - {%- endif %} - {%- endfor %} - {{- filtered_role_list -}} - - - name: Link the zuul provided roles - file: - src: "{{ zuul_git_src_dir }}/{{ item }}" - dest: "{{ lookup('env', 'ANSIBLE_ROLE_DEP_DIR') }}/{{ item | regex_replace('openstack/(openstack-ansible-|ansible-role-)', '') }}" - state: link - force: yes - with_items: "{{ zuul_src_repo_list }}" - # Do not link the role we are testing - when: role_name == '' or not item is search(role_name) - - - name: Clone the remaining git repos - git: - repo: "{{ item['src'] }}" - dest: "{{ lookup('env', 'ANSIBLE_ROLE_DEP_DIR') }}/{{ item['name'] | default(item['src'] | basename) }}" - version: "{{ item['version'] | default('master') }}" - refspec: "{{ item['refspec'] | default(omit) }}" - depth: "{{ item['depth'] | default('10') }}" - update: true - force: true - with_items: "{{ git_roles }}" - retries: "{{ git_clone_retries | default(3) }}" - delay: "{{ git_clone_retry_delay | default(5) }}" - when: - - item['scm'] == "git" or item['scm'] is undefined - - vars: - homedir: "{{ lookup('env', 'TESTING_HOME') }}" - role_file: "{{ lookup('env', 'ANSIBLE_ROLE_REQUIREMENTS_PATH') }}" - osa_roles: "{{ lookup('file', role_file) | from_yaml }}" - zuul_git_src_dir: "/home/zuul/src/opendev.org" diff --git a/iptables-clear.sh b/iptables-clear.sh deleted file mode 100755 index eb782c52..00000000 --- a/iptables-clear.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# -# Copyright 2015, Rackspace US, Inc. -# -# 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. -# - -iptables -F -iptables -X -iptables -t nat -F -iptables -t nat -X -iptables -t mangle -F -iptables -t mangle -X -iptables -P INPUT ACCEPT -iptables -P FORWARD ACCEPT -iptables -P OUTPUT ACCEPT diff --git a/listening-port-report.yml b/listening-port-report.yml deleted file mode 100644 index 0b6b8033..00000000 --- a/listening-port-report.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2018, BBC -# -# 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: Gather listening ports report - hosts: all - become: true - gather_facts: no - tasks: - - name: Netstat package is installed - package: - name: net-tools - state: present - - - name: Gather listening ports - command: netstat -ln --inet --program - register: listening_ports - changed_when: false - - - name: Create report - copy: - content: | - {% for host in ansible_play_hosts %} - hostname: {{ host }} - listening_ports: - {% for port in hostvars[host].listening_ports['stdout_lines'] %} - {{ port }} - {% endfor %} - - {% endfor %} - dest: /tmp/listening_port_report.txt - mode: "0644" - delegate_to: localhost - run_once: true # noqa: run-once[task] diff --git a/manual-test.rc b/manual-test.rc deleted file mode 100644 index 7016c453..00000000 --- a/manual-test.rc +++ /dev/null @@ -1,33 +0,0 @@ -export VIRTUAL_ENV=$(pwd) -export ANSIBLE_HOST_KEY_CHECKING=False -export ANSIBLE_SSH_CONTROL_PATH=/tmp/%%h-%%r - -# TODO (odyssey4me) These are only here as they are non-standard folder -# names for Ansible 1.9.x. We are using the standard folder names for -# Ansible v2.x. We can remove this when we move to Ansible 2.x. -export ANSIBLE_ACTION_PLUGINS=${HOME}/.ansible/plugins/action -export ANSIBLE_CALLBACK_PLUGINS=${HOME}/.ansible/plugins/callback -export ANSIBLE_FILTER_PLUGINS=${HOME}/.ansible/plugins/filter -export ANSIBLE_LOOKUP_PLUGINS=${HOME}/.ansible/plugins/lookup - -# This is required as the default is the current path or a path specified -# in ansible.cfg -export ANSIBLE_LIBRARY=${HOME}/.ansible/plugins/library - -# This is required as the default is '/etc/ansible/roles' or a path -# specified in ansible.cfg -export ANSIBLE_ROLES_PATH=${HOME}/.ansible/roles:$(pwd)/.. - -export ANSIBLE_SSH_ARGS="-o ControlMaster=no \ - -o UserKnownHostsFile=/dev/null \ - -o StrictHostKeyChecking=no \ - -o ServerAliveInterval=64 \ - -o ServerAliveCountMax=1024 \ - -o Compression=no \ - -o TCPKeepAlive=yes \ - -o VerifyHostKeyDNS=no \ - -o ForwardX11=no \ - -o ForwardAgent=yes" - -echo "Run manual functional tests by executing the following:" -echo "# ./.tox/functional/bin/ansible-playbook -i tests/inventory tests/test.yml" diff --git a/releasenotes/notes/.placeholder b/releasenotes/notes/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/releasenotes/source/_static/.placeholder b/releasenotes/source/_static/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/releasenotes/source/_templates/.placeholder b/releasenotes/source/_templates/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py deleted file mode 100644 index c983fbce..00000000 --- a/releasenotes/source/conf.py +++ /dev/null @@ -1,264 +0,0 @@ -#!/usr/bin/env python3 - -# 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. - -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# needs_sphinx = '1.0' - -# 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', - 'reno.sphinxext', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -author = 'OpenStack-Ansible Contributors' -category = 'Miscellaneous' -copyright = '2014-2016, OpenStack-Ansible Contributors' -description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.' -role_name = 'tests' -target_name = 'openstack-ansible-' + role_name -title = 'OpenStack-Ansible Documentation: Central testing repository' - -# Release notes do not need a version number in the title, they -# cover multiple releases. -# The full version, including alpha/beta/rc tags. -release = '' -# The short X.Y version. -version = '' - -# openstackdocstheme options -openstackdocs_repo_name = 'openstack/' + target_name -openstackdocs_bug_project = 'openstack-ansible' -openstackdocs_bug_tag = '' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# today = '' -# Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# default_role = None - -# 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 - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'native' - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'openstackdocs' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -# html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -# html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# html_extra_path = [] - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -# html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# html_additional_pages = {} - -# If false, no module index is generated. -# html_domain_indices = True - -# If false, no index is generated. -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = target_name + '-docs' - - -# -- Options for LaTeX output --------------------------------------------- - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, target_name + '.tex', - title, author, 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, target_name, - title, [author], 1) -] - -# If true, show URL addresses after external links. -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, target_name, - title, author, 'OpenStack-Ansible', - description, category), -] - -# Documents to append as an appendix to all manuals. -# texinfo_appendices = [] - -# If false, no module index is generated. -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False - -# -- Options for Internationalization output ------------------------------ -locale_dirs = ['locale/'] diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst deleted file mode 100644 index 7ab36081..00000000 --- a/releasenotes/source/index.rst +++ /dev/null @@ -1,14 +0,0 @@ -================================ - OpenStack-Ansible Release Notes -================================ - -.. toctree:: - :maxdepth: 1 - - unreleased - zed - ussuri - train - stein - rocky - newton diff --git a/releasenotes/source/newton.rst b/releasenotes/source/newton.rst deleted file mode 100644 index 97036ed2..00000000 --- a/releasenotes/source/newton.rst +++ /dev/null @@ -1,6 +0,0 @@ -=================================== - Newton Series Release Notes -=================================== - -.. release-notes:: - :branch: origin/stable/newton diff --git a/releasenotes/source/rocky.rst b/releasenotes/source/rocky.rst deleted file mode 100644 index 40dd517b..00000000 --- a/releasenotes/source/rocky.rst +++ /dev/null @@ -1,6 +0,0 @@ -=================================== - Rocky Series Release Notes -=================================== - -.. release-notes:: - :branch: stable/rocky diff --git a/releasenotes/source/stein.rst b/releasenotes/source/stein.rst deleted file mode 100644 index efaceb66..00000000 --- a/releasenotes/source/stein.rst +++ /dev/null @@ -1,6 +0,0 @@ -=================================== - Stein Series Release Notes -=================================== - -.. release-notes:: - :branch: stable/stein diff --git a/releasenotes/source/train.rst b/releasenotes/source/train.rst deleted file mode 100644 index 58390039..00000000 --- a/releasenotes/source/train.rst +++ /dev/null @@ -1,6 +0,0 @@ -========================== -Train Series Release Notes -========================== - -.. release-notes:: - :branch: stable/train diff --git a/releasenotes/source/unreleased.rst b/releasenotes/source/unreleased.rst deleted file mode 100644 index cd22aabc..00000000 --- a/releasenotes/source/unreleased.rst +++ /dev/null @@ -1,5 +0,0 @@ -============================== - Current Series Release Notes -============================== - -.. release-notes:: diff --git a/releasenotes/source/ussuri.rst b/releasenotes/source/ussuri.rst deleted file mode 100644 index e21e50e0..00000000 --- a/releasenotes/source/ussuri.rst +++ /dev/null @@ -1,6 +0,0 @@ -=========================== -Ussuri Series Release Notes -=========================== - -.. release-notes:: - :branch: stable/ussuri diff --git a/releasenotes/source/zed.rst b/releasenotes/source/zed.rst deleted file mode 100644 index 6cc2b155..00000000 --- a/releasenotes/source/zed.rst +++ /dev/null @@ -1,6 +0,0 @@ -======================== -Zed Series Release Notes -======================== - -.. release-notes:: - :branch: unmaintained/zed diff --git a/run_tests.sh b/run_tests.sh deleted file mode 100755 index 35280c84..00000000 --- a/run_tests.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2015, Rackspace US, Inc. -# -# 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. - -# PURPOSE: -# This script clones the openstack-ansible-tests repository to the -# tests/common folder in order to be able to re-use test components -# for role testing. This is intended to be the thinnest possible -# shim for test execution outside of OpenStack CI. - -# WARNING: -# This file is maintained in the openstack-ansible-tests repository. -# https://opendev.org/openstack/openstack-ansible-tests/src/run_tests.sh -# If you need to modify this file, update the one in the openstack-ansible-tests -# repository and then update this file as well. The purpose of this file is to -# prepare the host and then execute all the tox tests. -# - -## Shell Opts ---------------------------------------------------------------- -set -xeu - -## Vars ---------------------------------------------------------------------- - -WORKING_DIR="$(readlink -f $(dirname $0))" -OSA_PROJECT_NAME="$(sed -n 's|^project=openstack/\(.*\).git$|\1|p' $(pwd)/.gitreview)" - -COMMON_TESTS_PATH="${WORKING_DIR}/tests/common" -TESTING_HOME=${TESTING_HOME:-$HOME} -ZUUL_TESTS_CLONE_LOCATION="/home/zuul/src/opendev.org/openstack/openstack-ansible-tests" - -# Use .gitreview as the key to determine the appropriate -# branch to clone for tests. -TESTING_BRANCH=$(awk -F'=' '/defaultbranch/ {print $2}' "${WORKING_DIR}/.gitreview") -if [[ "${TESTING_BRANCH}" == "" ]]; then - TESTING_BRANCH="master" -fi - -## Main ---------------------------------------------------------------------- - -# Source distribution information -source /etc/os-release || source /usr/lib/os-release - -# Figure out the appropriate package install command -case ${ID,,} in - centos|rhel|fedora|rocky) pkg_mgr_cmd="dnf install -y" ;; - ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;; - *) echo "unsupported distribution: ${ID,,}"; exit 1 ;; -esac - -# Install git so that we can clone the tests repo if git is not available -which git &>/dev/null || eval sudo "${pkg_mgr_cmd}" git - -# Clone the tests repo for access to the common test script -if [[ ! -d "${COMMON_TESTS_PATH}" ]]; then - # The tests repo doesn't need a clone, we can just - # symlink it. - if [[ "${OSA_PROJECT_NAME}" == "openstack-ansible-tests" ]]; then - ln -s "${WORKING_DIR}" "${COMMON_TESTS_PATH}" - - # In zuul v3 any dependent repository is placed into - # /home/zuul/src/opendev.org, so we check to see - # if there is a tests checkout there already. If so, we - # symlink that and use it. - elif [[ -d "${ZUUL_TESTS_CLONE_LOCATION}" ]]; then - ln -s "${ZUUL_TESTS_CLONE_LOCATION}" "${COMMON_TESTS_PATH}" - - # Otherwise we're clearly not in zuul or using a previously setup - # repo in some way, so just clone it from upstream. - else - git clone -b "${TESTING_BRANCH}" \ - https://opendev.org/openstack/openstack-ansible-tests \ - "${COMMON_TESTS_PATH}" - fi -fi - -# Execute the common test script -source tests/common/run_tests_common.sh diff --git a/run_tests_common.sh b/run_tests_common.sh deleted file mode 100755 index 584daf5e..00000000 --- a/run_tests_common.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2015, Rackspace US, Inc. -# -# 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. - -## Shell Opts ---------------------------------------------------------------- - -set -o pipefail -set -xeuo - -## Prerequisite check -------------------------------------------------------- - -# Check whether the require environment variables are set. -if [[ -z ${WORKING_DIR+x} ]] ||\ - [[ -z ${COMMON_TESTS_PATH+x} ]] ||\ - [[ -z ${TESTING_HOME+x} ]] ||\ - [[ -z ${TESTING_BRANCH+x} ]] ||\ - [[ -z ${pkg_mgr_cmd+x} ]] ||\ - [[ -z ${ID+x} ]] ||\ - [[ -z ${VERSION+x} ]]; then - echo "Required environment variables are not set." - echo "Please ensure that run_tests.sh is used to execute tests." - exit 1 -fi - -## Vars ---------------------------------------------------------------------- - -# The bindep file contains the basic distribution packages -# required in order to install pip, and ansible via pip. -BINDEP_FILE=${BINDEP_FILE:-bindep.txt} - -## Main ---------------------------------------------------------------------- - -# Perform the initial distribution package install -# to allow pip and bindep to work. -case "${ID,,}" in - amzn|centos|rhel|rocky) - case ${VERSION_ID} in - 8) - pkg_list="python38 python38-devel redhat-lsb-core" - ;; - 9) - pkg_list="python3 python3-devel curl" - ;; - esac - ;; - ubuntu|debian) - pkg_list="python3-dev python3-pip virtualenv lsb-release curl" - sudo apt-get update - ;; - *) - echo "Unsupported distribution: ${ID,,}" - exit 1 - ;; -esac -eval sudo ${pkg_mgr_cmd} ${pkg_list} - -PIP_EXEC_PATH=$(which pip3 || which pip) - -if [[ "${ID,,}" == "centos" ]] && [[ ${VERSION_ID} == "8" ]]; then - sudo alternatives --set python3 /usr/bin/python3.8 -fi - -# Install bindep and tox -sudo "${PIP_EXEC_PATH}" install 'bindep>=2.4.0' 'tox<4' - -if [[ "${ID,,}" == "fedora" ]]; then - sudo dnf -y install redhat-lsb-core yum-utils -fi - -# Get a list of packages to install with bindep. If packages need to be -# installed, bindep exits with an exit code of 1. -BINDEP_PKGS=$(bindep -b -f "${BINDEP_FILE}" test || true) -echo "Packages to install: ${BINDEP_PKGS}" - -# Install OS packages using bindep -if [[ ${#BINDEP_PKGS} > 0 ]]; then - case "${ID,,}" in - centos|fedora|rhel|rocky) - sudo dnf install -y ${BINDEP_PKGS} - ;; - ubuntu|debian) - sudo apt-get update - sudo DEBIAN_FRONTEND=noninteractive \ - apt-get -q --option "Dpkg::Options::=--force-confold" \ - --assume-yes install ${BINDEP_PKGS} - ;; - esac -fi - -# Get envlist in a $env1,$env2,...,$envn format -toxenvs="$(tox -l | tr '\n' ',' | sed 's/,$//')" - -# Execute all $toxenvs or only a specific one -tox -e "${1:-$toxenvs}" - -# vim: set ts=4 sw=4 expandtab: diff --git a/setting-nodepool-variables.yml b/setting-nodepool-variables.yml deleted file mode 100644 index 901e6747..00000000 --- a/setting-nodepool-variables.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Setting nodepool variables - hosts: all - gather_facts: true - any_errors_fatal: true - tasks: - - - name: Check if this is an OpenStack-CI nodepool instance - stat: - path: /etc/nodepool - register: nodepool - delegate_to: localhost - - - include_tasks: "common-tasks/test-set-nodepool-vars.yml" - when: - - nodepool.stat.exists | bool diff --git a/sync-test-repos.sh b/sync-test-repos.sh deleted file mode 100755 index 167e0f0c..00000000 --- a/sync-test-repos.sh +++ /dev/null @@ -1,228 +0,0 @@ -#!/bin/bash - -# Copyright 2017, SUSE LINUX GmbH. -# -# 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. - -# This script will sync $files_to_sync files across all supported repositories as -# returned by the gen-projects-list.sh script. The goal here is to try and sync -# all these files at regular intervals so the code in the repositories is -# tested in the same way on both the OpenStack CI and the Vagrant platforms. -# This script will open reviews in the OpenStack gerrit so make sure your system is -# configured properly to submit upstream reviews. Use ./sync-test-repos.sh -h -# to get more information on how to use this script. Bugs about this script -# should be submitted to the openstack-ansible project on launchpad as usual. - -# This script has a partner which is executed by the proposal bot here: -# https://opendev.org/openstack/project-config/src/playbooks/proposal/sync_openstack_ansible_common_files.sh -# Changes made to this file should be mirrored there when applicable. - -set -eu - -usage() { - cat < Temporary directory for OSA repositories: ${tempdir}" -mkdir ${tempdir} - -pushd ${tempdir} &> /dev/null - -echo "=> Cloning openstack-ansible-tests repository" -eval git clone ${openstack_git_url}/openstack/openstack-ansible-tests -echo -e "\n---------------------------------------------\n" - -for proj in ${osa_projects[@]}; do - proj_dir=$(basename ${proj}) - - # Skip the project if it is in the excluded list - check_and_ignore ${proj_dir} && continue - - echo "=> ##### ${proj} #####" - eval git clone ${openstack_git_url}/$proj - - pushd $proj_dir &> /dev/null - - git checkout -b openstack/openstack-ansible-tests/sync-tests - # if there an open review, re-use it - open_review=$(git review --no-color -l | \ - grep -v "^Found" | \ - grep "Updated from OpenStack Ansible Tests" | \ - tail -n1 | awk '{print $1}') - [[ -n ${open_review} ]] && \ - echo "Using existing review #${open_review} for ${proj_dir}" && \ - git review -x ${open_review} - - popd &> /dev/null - - # Copy files - pushd openstack-ansible-tests &> /dev/null - copy_files ${proj_dir} - popd &> /dev/null - - process_changes ${proj_dir} ${open_review:="__no_review__"} - # Clean up the directory - rm -rf ${proj_dir} - echo -e "=> ##################################################\n" -done - -popd &> /dev/null - -echo "All OpenStack Ansible repositories have been synced successfully!" -echo "Happy testing ;-)" - -exit 0 diff --git a/sync/doc/requirements.txt b/sync/doc/requirements.txt deleted file mode 100644 index 07801f87..00000000 --- a/sync/doc/requirements.txt +++ /dev/null @@ -1,16 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. - -# WARNING: -# This file is maintained in the openstack-ansible-tests repository. -# https://opendev.org/openstack/openstack-ansible-tests/src/branch/master/sync/doc/requirements.txt -# If you need to modify this file, update the one in the -# openstack-ansible-tests repository. Once it merges there, the changes will -# automatically be proposed to all the repositories which use it. - -sphinx>=2.0.0,!=2.1.0 # BSD -sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD -openstackdocstheme>=2.2.1 # Apache-2.0 -reno>=3.1.0 # Apache-2.0 -doc8>=0.6.0 # Apache-2.0 diff --git a/test-ansible-collection-requirements.yml b/test-ansible-collection-requirements.yml deleted file mode 100644 index 0890f4f0..00000000 --- a/test-ansible-collection-requirements.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -collections: -- name: openstack.cloud - source: https://opendev.org/openstack/ansible-collections-openstack - type: git - version: 2.2.0 -- name: openstack.config_template - source: https://opendev.org/openstack/ansible-config_template - type: git - version: 2.1.0 -- name: openstack.osa - source: https://opendev.org/openstack/openstack-ansible-plugins - type: git - version: 6dd080c6f6e55f69f56dcfb312977cfddac8fd86 -- name: community.general - source: https://github.com/ansible-collections/community.general - type: git - version: 8.2.0 -- name: community.rabbitmq - source: https://github.com/ansible-collections/community.rabbitmq - type: git - version: 1.2.3 -- name: community.mysql - source: https://github.com/ansible-collections/community.mysql - type: git - version: 3.8.0 -- name: community.crypto - source: https://github.com/ansible-collections/community.crypto - type: git - version: 2.16.2 -- name: ansible.posix - source: https://github.com/ansible-collections/ansible.posix - type: git - version: 1.5.4 -- name: gluster.gluster - source: https://github.com/gluster/gluster-ansible-collection - type: git - version: 1.0.2 -- name: ansible.netcommon - source: https://github.com/ansible-collections/ansible.netcommon - type: git - version: v6.0.0 -- name: ansible.utils - source: https://github.com/ansible-collections/ansible.utils - type: git - version: v3.0.0 -- name: openvswitch.openvswitch - source: https://github.com/ansible-collections/openvswitch.openvswitch - type: git - version: 2.1.1 diff --git a/test-ansible-deps.txt b/test-ansible-deps.txt deleted file mode 100644 index 88ea7a1a..00000000 --- a/test-ansible-deps.txt +++ /dev/null @@ -1,17 +0,0 @@ -# WARNING: -# This file is use by all OpenStack-Ansible roles for testing purposes. -# Any changes here will affect all OpenStack-Ansible role repositories -# with immediate effect. - -# PURPOSE: -# Python requirements listed here are imported by the roles via tox -# target configuration in each role. - -# The Ansible version used for testing -ansible-core==2.15.9 - -# Used for the ip filter within ansible -netaddr - -# Used for the ansible openssl_* modules -pyOpenSSL diff --git a/test-ansible-env-prep.sh b/test-ansible-env-prep.sh deleted file mode 100755 index 3a94b3fe..00000000 --- a/test-ansible-env-prep.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -# WARNING: -# This file is use by all OpenStack-Ansible roles for testing purposes. -# Any changes here will affect all OpenStack-Ansible role repositories -# with immediate effect. - -# PURPOSE: -# This script prepares the host with all the required Ansible -# roles and plugins to execute the test playbook. - -## Shell Opts ---------------------------------------------------------------- - -set -e -set -x - -## Vars ---------------------------------------------------------------------- - -export TESTING_HOME=${TESTING_HOME:-$HOME} -export WORKING_DIR=${WORKING_DIR:-$(pwd)} -export ROLE_NAME=${ROLE_NAME:-''} -export OSA_PROJECT_NAME="$(sed -n 's|^project=openstack/\(.*\).git$|\1|p' $(pwd)/.gitreview)" -export ANSIBLE_INVENTORY=${ANSIBLE_INVENTORY:-$WORKING_DIR/tests/inventory} -export ANSIBLE_ROLE_REQUIREMENTS_PATH=${ANSIBLE_ROLE_REQUIREMENTS_PATH:-$WORKING_DIR/tests/ansible-role-requirements.yml} -export ANSIBLE_EXTRA_ROLE_DIRS=${ANSIBLE_EXTRA_ROLE_DIRS:-''} - -export ANSIBLE_CFG_PATH="${TESTING_HOME}/.ansible.cfg" -export ANSIBLE_LOG_DIR="${TESTING_HOME}/.ansible/logs" -export ANSIBLE_NOCOLOR=1 -export ANSIBLE_PLUGIN_DIR="${TESTING_HOME}/.ansible/plugins" -export ANSIBLE_ROLE_DEP_DIR="${TESTING_HOME}/.ansible/roles" -export ANSIBLE_ROLE_DIR="${TESTING_HOME}/.ansible/testing-role" -export COMMON_TESTS_PATH="${WORKING_DIR}/tests/common" - -# The place where zuul clones dependent repositories to -ZUUL_PLUGINS_CLONE_LOCATION="/home/zuul/src/opendev.org/openstack/openstack-ansible-plugins" - -# Use .gitreview as the key to determine the appropriate -# branch to clone for tests. -export TESTING_BRANCH=${TESTING_BRANCH:-`awk -F'=' '/defaultbranch/ {print $2}' "${WORKING_DIR}/.gitreview"`} -if [[ "${TESTING_BRANCH}" == "" ]]; then - export TESTING_BRANCH="master" -fi - -export SERVICES_BRANCH=${SERVICES_BRANCH:-$TESTING_BRANCH} - -# Use pip opts to add options to the pip install command. -# This can be used to tell it which index to use, etc. -export PIP_OPTS=${PIP_OPTS:-""} - -echo "TESTING_HOME: ${TESTING_HOME}" -echo "TESTING_BRANCH: ${TESTING_BRANCH}" -echo "SERVICES_BRANCH: ${SERVICES_BRANCH}" -echo "WORKING_DIR: ${WORKING_DIR}" -echo "ROLE_NAME: ${ROLE_NAME}" -echo "ANSIBLE_INVENTORY: ${ANSIBLE_INVENTORY}" - -# Output all the zuul parameters if they're set -if [ -z "${ZUUL_CHANGE_IDS}" ]; then - echo -e "\n### ZUUL PARAMETERS BEGIN ###\n" - printenv | grep ^ZUUL || true - echo -e "\n### ZUUL PARAMETERS END ###\n" -fi - -# Toggle the reset of all data cloned from other repositories. -export TEST_RESET=${TEST_RESET:-false} - -# Make sure that python is not buffering output so that the -# console output is immediate. -export PYTHONUNBUFFERED=1 - -## Functions ----------------------------------------------------------------- - -function setup_ara { - - # Don't do anything if ARA has already been set up - [[ -L "${ANSIBLE_PLUGIN_DIR}/callback/ara" ]] && return 0 - - # Dynamically figure out the location of ARA (ex: py2 vs py3) - ara_location=$(python -m ara.setup.callback_plugins 2>/dev/null) - - echo "Linking ${ara_location} to ${ANSIBLE_PLUGIN_DIR}/callback/ara" - mkdir -p "${ANSIBLE_PLUGIN_DIR}/callback/ara" - if [ -d ${ara_location} ]; then - ln -sf "${ara_location}" "${ANSIBLE_PLUGIN_DIR}/callback/ara/" - fi - -} - -## Main ---------------------------------------------------------------------- - -# If the test reset toggle is set, destroy the existing cloned data. -if [ "${TEST_RESET}" == "true" ]; then - echo "Resetting all cloned data." - rm -f "${ANSIBLE_CFG_PATH}" - rm -rf "${ANSIBLE_LOG_DIR}" - rm -rf "${ANSIBLE_PLUGIN_DIR}" - rm -rf "${ANSIBLE_ROLE_DIR}" -fi - -# Create the directory which will hold all Ansible logs -mkdir -p "${ANSIBLE_LOG_DIR}" - -if [[ ! -d "${ANSIBLE_PLUGIN_DIR}" ]]; then - # The plugins repo doesn't need a clone, we can just - # symlink it. - if [[ "${OSA_PROJECT_NAME}" == "openstack-ansible-plugins" ]]; then - ln -s ${WORKING_DIR} "${ANSIBLE_PLUGIN_DIR}" - - # In zuul v3 any dependent repository is placed into - # /home/zuul/src/opendev.org, so we check to see - # if there is a tests checkout there already. If so, we - # symlink that and use it. - elif [[ -d "${ZUUL_PLUGINS_CLONE_LOCATION}" ]]; then - ln -s "${ZUUL_PLUGINS_CLONE_LOCATION}" "${ANSIBLE_PLUGIN_DIR}" - - # Otherwise we're clearly not in zuul or using a previously setup - # repo in some way, so just clone it from upstream. - else - git clone -b "${TESTING_BRANCH}" \ - https://opendev.org/openstack/openstack-ansible-plugins \ - "${ANSIBLE_PLUGIN_DIR}" - fi -fi - -# Ensure we use the HTTPS/HTTP proxy with pip if it is specified -if [ -n "$HTTPS_PROXY" ]; then - PIP_OPTS+=" --proxy $HTTPS_PROXY" -elif [ -n "$HTTP_PROXY" ]; then - PIP_OPTS+=" --proxy $HTTP_PROXY" -fi - -# Using tox for requirements management requires in-repo -# requirements files for all our repositories. Rather than -# do that, we make use of the tests repo to capture our -# common requirements and use this to install them. -# This reduces our review requirement rate and simplifies -# maintenance for us for the tox config. It also makes it -# usable with 'Depends-On', which is marvellous! - -# If the repo has its own test-requirements file, then use -# it with the common one. -if [[ -f "${WORKING_DIR}/test-requirements.txt" ]]; then - PIP_OPTS+=" --requirement ${WORKING_DIR}/test-requirements.txt" -fi - -# We add the common requirements after the in-repo requirements -# so that the in-repo ones take precedence. -PIP_OPTS+=" --requirement ${COMMON_TESTS_PATH}/test-requirements.txt" - -# If the repo has a doc/requirements.txt file, add it to the -# requirements list. This is necessary for the linters test -# to be able to execute doc8. -if [[ -f "${WORKING_DIR}/doc/requirements.txt" && "${TOX_ENV_NAME}" != "functional"* ]]; then - PIP_OPTS+=" --requirement ${WORKING_DIR}/doc/requirements.txt" -fi - -# We want to install ansible, but also constrain it. -# This is necessary due to ARA having ansible as a -# requirement. -PIP_OPTS+=" --requirement ${COMMON_TESTS_PATH}/test-ansible-deps.txt" - -# Retrieve a copy of OpenStack's upper constraints If Depends-On is -# used, the requirements repo will be cloned, so we prefer -# local copy from zuul. -REQS_REPO_HOME="${TESTING_HOME}/src/opendev.org/openstack/requirements" -if [[ -d "${REQS_REPO_HOME}" ]]; then - cp "${REQS_REPO_HOME}/upper-constraints.txt" /tmp/upper-constraints.txt -else - curl -L "${TOX_CONSTRAINTS_FILE:-https://opendev.org/openstack/requirements/raw/${SERVICES_BRANCH}/upper-constraints.txt}" -o /tmp/upper-constraints.txt -fi - -# Filter out pip/wheel from OpenStack upper constraints -# These are already constrained in OSA global-requirement-pins.txt -cp /tmp/upper-constraints.txt /tmp/upper-constraints-filtered.txt -sed -i '/pip=/d' /tmp/upper-constraints-filtered.txt -sed -i '/wheel=/d' /tmp/upper-constraints-filtered.txt - -PIP_OPTS+=" --constraint /tmp/upper-constraints-filtered.txt" - -source /etc/os-release || source /usr/lib/os-release - -# Install ARA from PyPi -PIP_OPTS+=" ara[server]" - -# Install all python packages -python -m pip install ${PIP_OPTS} - -# Install all ansible collections -ANSIBLE_COLLECTION_REQUIREMENTS_PATH="${COMMON_TESTS_PATH}/test-ansible-collection-requirements.yml" \ - ansible-playbook -i ${ANSIBLE_INVENTORY} ${COMMON_TESTS_PATH}/get-ansible-collection-requirements.yml -v - -# Download the Ansible role repositories if they are not present on the host. -# This is ignored if there is no ansible-role-requirements file. -if [[ ! -d "${ANSIBLE_ROLE_DEP_DIR}" ]]; then - # Download the common test Ansible role repositories. - ANSIBLE_ROLE_REQUIREMENTS_PATH=${COMMON_TESTS_PATH}/test-ansible-role-requirements.yml \ - ansible-playbook -i ${ANSIBLE_INVENTORY} \ - ${COMMON_TESTS_PATH}/get-ansible-role-requirements.yml \ - -v - - if [[ -f "${ANSIBLE_ROLE_REQUIREMENTS_PATH}" ]]; then - ansible-playbook -i ${ANSIBLE_INVENTORY} \ - ${COMMON_TESTS_PATH}/get-ansible-role-requirements.yml \ - -v - if [[ ! -e "${ANSIBLE_ROLE_DEP_DIR}/plugins" ]]; then - ln -s "${ANSIBLE_PLUGIN_DIR}" "${ANSIBLE_ROLE_DEP_DIR}/plugins" - fi - fi -fi - -# If a role name is provided, replace the role in the roles folder with a link -# to the current folder. This ensures that the test executes with the checked -# out git repo. -if [ ! -z "${ROLE_NAME}" ]; then - echo "Linking ${ANSIBLE_ROLE_DIR}/${ROLE_NAME} to ${WORKING_DIR}" - mkdir -p "${ANSIBLE_ROLE_DIR}" - rm -rf "${ANSIBLE_ROLE_DIR}/${ROLE_NAME}" - ln -s "${WORKING_DIR}" "${ANSIBLE_ROLE_DIR}/${ROLE_NAME}" -else - echo "Skipping the role link because no role name was provided." -fi - -# Ensure that the Ansible configuration file is in the right place -if [ ! -f "${ANSIBLE_CFG_PATH}" ]; then - if [ -f "${COMMON_TESTS_PATH}/test-ansible.cfg" ]; then - echo "Linking ${ANSIBLE_CFG_PATH} to ${COMMON_TESTS_PATH}/test-ansible.cfg" - ln -s "${COMMON_TESTS_PATH}/test-ansible.cfg" "${ANSIBLE_CFG_PATH}" - else - echo "Skipping the ansible.cfg link because ${COMMON_TESTS_PATH}/test-ansible.cfg is not there!" - fi -else - echo "Found ${ANSIBLE_CFG_PATH} so there's nothing more to do." -fi - -# Adjust the Ansible configuration file to include the extra -# role paths if any are provided and they're not already set. -if [ ! -z "${ANSIBLE_EXTRA_ROLE_DIRS}" ]; then - if ! grep -q "roles_path.*${ANSIBLE_EXTRA_ROLE_DIRS}" "${ANSIBLE_CFG_PATH}"; then - sed -i "s|roles_path.*HOME/.ansible/roles.*|roles_path = $HOME/.ansible/roles:${ANSIBLE_ROLE_DIR}:${ANSIBLE_EXTRA_ROLE_DIRS}|" "${ANSIBLE_CFG_PATH}" - fi -fi - -# Setup ARA -setup_ara diff --git a/test-ansible-functional.sh b/test-ansible-functional.sh deleted file mode 100755 index e6f80c6d..00000000 --- a/test-ansible-functional.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -# WARNING: -# This file is use by all OpenStack-Ansible roles for testing purposes. -# Any changes here will affect all OpenStack-Ansible role repositories -# with immediate effect. - -# PURPOSE: -# This script executes a test Ansible playbook for the purpose of -# functionally testing the role. It supports a convergence test, -# check mode and an idempotence test. - -## Shell Opts ---------------------------------------------------------------- - -set -e - -## Vars ---------------------------------------------------------------------- -# Source distribution information -source /etc/os-release || source /usr/lib/os-release - -#TODO: cleanup on ansible 2.10 if debian is in config/base.yml -if [ "${ID}" == "debian" ] && [ "${VERSION_ID}" == "10" ]; then - ANSIBLE_PYTHON_INTERPRETER="/usr/bin/python3" -fi - -export ANSIBLE_PYTHON_INTERPRETER=${ANSIBLE_PYTHON_INTERPRETER:-auto} - -export TESTING_HOME=${TESTING_HOME:-$HOME} -export WORKING_DIR=${WORKING_DIR:-$(pwd)} -export ROLE_NAME=${ROLE_NAME:-''} - -export ANSIBLE_REMOTE_TEMP="/tmp" -export ANSIBLE_OVERRIDES=${ANSIBLE_OVERRIDES:-$WORKING_DIR/tests/$ROLE_NAME-overrides.yml} -export ANSIBLE_PARAMETERS=${ANSIBLE_PARAMETERS:-""} -export TEST_PLAYBOOK=${TEST_PLAYBOOK:-$WORKING_DIR/tests/test.yml} -export TEST_CHECK_MODE=${TEST_CHECK_MODE:-false} -export TEST_IDEMPOTENCE=${TEST_IDEMPOTENCE:-false} - -export COMMON_TESTS_PATH="${WORKING_DIR}/tests/common" - -echo "ANSIBLE_OVERRIDES: ${ANSIBLE_OVERRIDES}" -echo "ANSIBLE_PARAMETERS: ${ANSIBLE_PARAMETERS}" -echo "TEST_PLAYBOOK: ${TEST_PLAYBOOK}" -echo "TEST_CHECK_MODE: ${TEST_CHECK_MODE}" -echo "TEST_IDEMPOTENCE: ${TEST_IDEMPOTENCE}" -echo "ANSIBLE_PYTHON_INTERPRETER: ${ANSIBLE_PYTHON_INTERPRETER}" - -## Functions ----------------------------------------------------------------- - -function set_ansible_parameters { - - if [ -f "${ANSIBLE_OVERRIDES}" ]; then - ANSIBLE_CLI_PARAMETERS="${ANSIBLE_PARAMETERS} -e @${ANSIBLE_OVERRIDES}" - else - ANSIBLE_CLI_PARAMETERS="${ANSIBLE_PARAMETERS}" - fi - -} - -function execute_ansible_playbook { - - CMD_TO_EXECUTE="ansible-playbook ${TEST_PLAYBOOK} $@ ${ANSIBLE_CLI_PARAMETERS}" - echo "Executing: ${CMD_TO_EXECUTE}" - echo "With:" - echo " ANSIBLE_INVENTORY: ${ANSIBLE_INVENTORY}" - echo " ANSIBLE_LOG_PATH: ${ANSIBLE_LOG_PATH}" - - ${CMD_TO_EXECUTE} - -} - -## Main ---------------------------------------------------------------------- -source /etc/os-release - -# Check if SELinux is present and which mode is currently set. -if [[ -x /usr/sbin/getenforce ]]; then - SELINUX_STATUS=$(/usr/sbin/getenforce) -else - SELINUX_STATUS="Unavailable" -fi -echo "Current SELinux status: ${SELINUX_STATUS}" - -# NOTE(mhayden): SELinux policies for CentOS are still incomplete. Ensure -# SELinux is not in enforcing mode during tests. -if [ "${SELINUX_STATUS}" == "Enforcing" ]; then - echo "NOTE: CentOS SELinux policies are incomplete." - echo "Switching SELinux mode from Enforcing to Permissive." - sudo /usr/sbin/setenforce 0 -fi - -# Ensure that the Ansible environment is properly prepared -source "${COMMON_TESTS_PATH}/test-ansible-env-prep.sh" - -# Prepare the extra CLI parameters used in each execution -set_ansible_parameters - -# If the test for check mode is enabled, then execute it -if [ "${TEST_CHECK_MODE}" == "true" ]; then - - # Set the path for the output log - export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-check.log" - - # Execute the test playbook in check mode - execute_ansible_playbook --check - -fi - -# Set the path for the output log -export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute.log" - -# Execute the test playbook -execute_ansible_playbook - -# If the idempotence test is enabled, then execute the -# playbook again and verify that nothing changed/failed -# in the output log. - -if [ "${TEST_IDEMPOTENCE}" == "true" ]; then - - # Set the path for the output log - export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-idempotence.log" - - # Execute the test playbook - execute_ansible_playbook - - # Exit with a failure if we find "changed" or "failed" followed by anything - # other than a zero. - if grep -qP '(changed|failed)=(?!0)' ${ANSIBLE_LOG_PATH}; then - echo "Idempotence test: fail" - exit 1 - else - echo "Idempotence test: pass" - fi - -fi diff --git a/test-ansible-lint.sh b/test-ansible-lint.sh deleted file mode 100755 index 975dfe4f..00000000 --- a/test-ansible-lint.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -# WARNING: -# This file is use by all OpenStack-Ansible roles for testing purposes. -# Any changes here will affect all OpenStack-Ansible role repositories -# with immediate effect. - -# PURPOSE: -# This script executes ansible-lint against the role directory. - -## Shell Opts ---------------------------------------------------------------- - -set -e -set -x - -## Vars ---------------------------------------------------------------------- - -export WORKING_DIR=${WORKING_DIR:-$(pwd)} -export COMMON_TESTS_PATH="${WORKING_DIR}/tests/common" -export TEST_PLAYBOOK=${TEST_PLAYBOOK:-$WORKING_DIR/tests/test.yml} -export ANSIBLE_LINT_PARAMS=${ANSIBLE_LINT_PARAMS:-} - -echo "TEST_PLAYBOOK: ${TEST_PLAYBOOK}" -echo "ANSIBLE_LINT_PARAMS: ${ANSIBLE_LINT_PARAMS}" - -## Main ---------------------------------------------------------------------- - -# Ensure that the Ansible environment is properly prepared -source "${COMMON_TESTS_PATH}/test-ansible-env-prep.sh" - -# Execute ansible-lint. We do not want to test dependent roles located -# in $HOME/.ansible/roles since we only care about the role we are currently -# testing. -ANSIBLE_LINT_WARNINGS="-w 208 -w 306 -w 502 -w 503 -w var-naming -w role-name -w metadata -w fqcn -w yaml[truthy]" -ansible-lint ${ANSIBLE_LINT_PARAMS} ${ANSIBLE_LINT_WARNINGS} --exclude=$HOME/.ansible/roles ${TEST_PLAYBOOK} diff --git a/test-ansible-role-requirements.yml b/test-ansible-role-requirements.yml deleted file mode 100644 index 95997db5..00000000 --- a/test-ansible-role-requirements.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- name: config_template - scm: git - src: https://opendev.org/openstack/ansible-config_template - version: master -- name: openstack_openrc - scm: git - src: https://opendev.org/openstack/openstack-ansible-openstack_openrc - version: master -- name: python_venv_build - src: https://opendev.org/openstack/ansible-role-python_venv_build - scm: git - version: master -- name: systemd_mount - src: https://opendev.org/openstack/ansible-role-systemd_mount - scm: git - version: master -- name: systemd_networkd - src: https://opendev.org/openstack/ansible-role-systemd_networkd - scm: git - version: master -- name: systemd_service - src: https://opendev.org/openstack/ansible-role-systemd_service - scm: git - version: master -- name: uwsgi - src: https://opendev.org/openstack/ansible-role-uwsgi - scm: git - version: master \ No newline at end of file diff --git a/test-ansible-syntax.sh b/test-ansible-syntax.sh deleted file mode 100755 index 49a23acc..00000000 --- a/test-ansible-syntax.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -# WARNING: -# This file is use by all OpenStack-Ansible roles for testing purposes. -# Any changes here will affect all OpenStack-Ansible role repositories -# with immediate effect. - -# PURPOSE: -# This script executes ansible-syntax against the role test playbook. - -## Shell Opts ---------------------------------------------------------------- - -set -e -set -x - -## Vars ---------------------------------------------------------------------- - -export WORKING_DIR=${WORKING_DIR:-$(pwd)} -export COMMON_TESTS_PATH="${WORKING_DIR}/tests/common" -export ANSIBLE_INVENTORY=${ANSIBLE_INVENTORY:-$WORKING_DIR/tests/inventory} -export TEST_PLAYBOOK=${TEST_PLAYBOOK:-$WORKING_DIR/tests/test.yml} - -## Main ---------------------------------------------------------------------- - -# Ensure that the Ansible environment is properly prepared -source "${COMMON_TESTS_PATH}/test-ansible-env-prep.sh" - -# Execute the Ansible syntax check -ansible-playbook --syntax-check \ - --list-tasks \ - ${TEST_PLAYBOOK} diff --git a/test-ansible.cfg b/test-ansible.cfg deleted file mode 100644 index f3e2d713..00000000 --- a/test-ansible.cfg +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -# WARNING: -# This file is use by all OpenStack-Ansible roles for testing purposes. -# Any changes here will affect all OpenStack-Ansible role repositories -# with immediate effect. - -# PURPOSE: -# This is a set of configuration options for Ansible. - -[defaults] -transport = openstack.osa.ssh -host_key_checking = False -control_path = /tmp/%%h-%%r -ssh_args = -o ControlMaster=no -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ServerAliveInterval=64 -o ServerAliveCountMax=1024 -o Compression=no -o TCPKeepAlive=yes -o VerifyHostKeyDNS=no -o ForwardX11=no -o ForwardAgent=yes -library = $HOME/.ansible/plugins/library:$HOME/.ansible/roles/ceph-ansible/library -callback_plugins = $HOME/.ansible/plugins/callback:$HOME/.ansible/roles/ceph-ansible/plugins/callback -action_plugins = $HOME/.ansible/roles/ceph-ansible/plugins/actions -roles_path = $HOME/.ansible/roles:$HOME/.ansible/testing-role -collections_path = /etc/ansible diff --git a/test-bashate.sh b/test-bashate.sh deleted file mode 100755 index cd52c5dc..00000000 --- a/test-bashate.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -# WARNING: -# This file is use by all OpenStack-Ansible roles for testing purposes. -# Any changes here will affect all OpenStack-Ansible role repositories -# with immediate effect. - -# PURPOSE: -# This script executes bashate against all the files it find that match -# the search pattern. The search pattern is meant to find any shell -# scripts present in the role. -# -# The test ignores the following rules: -# -# E003: Indent not multiple of 4 (we prefer to use multiples of 2) -# -# 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) - -## Shell Opts ---------------------------------------------------------------- - -set -e - -## Vars ---------------------------------------------------------------------- - -export WORKING_DIR=${WORKING_DIR:-$(pwd)} - -## Main ---------------------------------------------------------------------- - -grep --recursive --binary-files=without-match \ - --files-with-match '^.!.*\(ba\)\?sh$' \ - --exclude-dir .tox \ - --exclude-dir .git \ - "${WORKING_DIR}" | xargs -n1 bashate --error . --verbose --ignore=E003,E006,E040 diff --git a/test-distro_install-vars.yml b/test-distro_install-vars.yml deleted file mode 100644 index aeabe371..00000000 --- a/test-distro_install-vars.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -# Copyright 2018, SUSE LINUX GmbH. -# -# 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. - -# Note(odyssey4me): -# Ubuntu does not publish tempest plugin packages. They do -# all their testing using the source-based installation of -# tempest. As such, for all ubuntu distribution tests we -# force the use of the source install for tempest. -tempest_install_method: "{{ (ansible_facts['distribution'] | lower == 'ubuntu') | ternary('source', 'distro') }}" - -# -# Use $role_install_method=distro so we can test the combined -# result. We add all the os_* roles here even though some of them -# may not have been converted to support the dual installation method. -# This is effectively the result of the following command -# ./gen-projects-list.sh | grep -o 'os_.*' | grep -v 'os_tempest' | cut -d "_" -f 2 | xargs -I {} echo {}_install_method: distro -# -almanach_install_method: distro -aodh_install_method: distro -barbican_install_method: distro -blazar_install_method: distro -ceilometer_install_method: distro -cinder_install_method: distro -cloudkitty_install_method: distro -congress_install_method: distro -designate_install_method: distro -glance_install_method: distro -gnocchi_install_method: distro -heat_install_method: distro -horizon_install_method: distro -ironic_install_method: distro -karbor_install_method: distro -keystone_install_method: distro -magnum_install_method: distro -masakari_install_method: distro -mistral_install_method: distro -molteniron_install_method: distro -monasca_install_method: distro -monasca-agent_install_method: distro -monasca-ui_install_method: distro -neutron_install_method: distro -nova_install_method: distro -octavia_install_method: distro -panko_install_method: distro -placement_install_method: distro -rally_install_method: distro -sahara_install_method: distro -searchlight_install_method: distro -swift_install_method: distro -tacker_install_method: distro -trove_install_method: distro -watcher_install_method: distro -zaqar_install_method: distro -zun_install_method: distro diff --git a/test-install-cinder.yml b/test-install-cinder.yml deleted file mode 100644 index 0fb01a60..00000000 --- a/test-install-cinder.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Deploy cinder API services - hosts: cinder_api - remote_user: root - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - roles: - - role: "os_cinder" - -- name: Deploy the rest of cinder - hosts: "cinder_all:!cinder_api" - remote_user: root - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - roles: - - role: "os_cinder" diff --git a/test-install-etcd.yml b/test-install-etcd.yml deleted file mode 100644 index 1a082c70..00000000 --- a/test-install-etcd.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Copyright 2016, Rackspace US, Inc. -# -# 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: Deploy etcd - hosts: etcd_all - remote_user: root - gather_facts: true - any_errors_fatal: true - roles: - - role: "etcd" diff --git a/test-install-galera.yml b/test-install-galera.yml deleted file mode 100644 index ddfcd756..00000000 --- a/test-install-galera.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Deploy galera - hosts: galera_all - remote_user: root - gather_facts: true - any_errors_fatal: true - roles: - - role: "galera_server" - vars: - galera_install_client: true - galera_install_server: true - vars_files: - - test-vars.yml diff --git a/test-install-glance.yml b/test-install-glance.yml deleted file mode 100644 index b3620bec..00000000 --- a/test-install-glance.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Playbook for deploying glance - hosts: glance_all - remote_user: root - gather_facts: true - any_errors_fatal: true - roles: - - role: "os_glance" - vars_files: - - test-vars.yml diff --git a/test-install-gnocchi.yml b/test-install-gnocchi.yml deleted file mode 100644 index ecfea6ef..00000000 --- a/test-install-gnocchi.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Deploy gnocchi - hosts: gnocchi_all - remote_user: root - gather_facts: true - any_errors_fatal: true - roles: - - role: "os_gnocchi" - vars_files: - - test-vars.yml diff --git a/test-install-haproxy.yml b/test-install-haproxy.yml deleted file mode 100644 index 93d17c6e..00000000 --- a/test-install-haproxy.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -# Copyright 2017, Rackspace US, Inc. -# -# 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: Install haproxy - hosts: localhost - # We explicitly do not use 'remote_user: root' here because the - # role totally fails when we do due to the delegation of the - # hatop package download into /opt/cache/files due to that path - # not being writable. - # TODO(odyssey4me): - # Figure out whether this issue happens for normal (non localhost) - # delegation, and how to resolve the issue. - become: yes - any_errors_fatal: true - roles: - - role: "haproxy_server" - haproxy_service_configs: "{{ haproxy_default_services | default([]) }}" - vars_files: - - test-vars.yml diff --git a/test-install-heat.yml b/test-install-heat.yml deleted file mode 100644 index 44fc2f2c..00000000 --- a/test-install-heat.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Playbook for deploying heat - hosts: heat_all - remote_user: root - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - roles: - - role: "os_heat" diff --git a/test-install-horizon.yml b/test-install-horizon.yml deleted file mode 100644 index 98807ba6..00000000 --- a/test-install-horizon.yml +++ /dev/null @@ -1,67 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Playbook for deploying horizon - hosts: horizon_all - remote_user: root - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - roles: - - role: "os_horizon" - -- name: Playbook to add nova service and endpoint (required by Horizon) - hosts: localhost - connection: local - become: no - gather_facts: false - any_errors_fatal: true - vars_files: - - test-vars.yml - tasks: - - name: Add nova service to the keystone service catalog - os_keystone_service: - cloud: default - state: present - name: "{{ nova_service_name }}" - service_type: "{{ nova_service_type }}" - description: "{{ nova_service_description }}" - endpoint_type: admin - verify: "{{ not keystone_service_adminuri_insecure }}" - register: add_service - until: add_service is success - retries: 5 - delay: 10 - - - name: Add nova endpoints to keystone endpoint catalog - os_keystone_endpoint: - cloud: default - state: present - service: "{{ nova_service_name }}" - endpoint_interface: "{{ item.interface }}" - url: "{{ item.url }}" - region: "{{ nova_service_region }}" - register: add_service - until: add_service is success - retries: 5 - delay: 10 - with_items: - - interface: "public" - url: "{{ nova_service_publicurl }}" - - interface: "internal" - url: "{{ nova_service_internalurl }}" - - interface: "admin" - url: "{{ nova_service_adminurl }}" diff --git a/test-install-infra.yml b/test-install-infra.yml deleted file mode 100644 index df8c0b86..00000000 --- a/test-install-infra.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Importing test-install-memcached - import_playbook: test-install-memcached.yml - -- name: Importing test-install-rabbitmq - import_playbook: test-install-rabbitmq.yml - -- name: Importing test-install-galera - import_playbook: test-install-galera.yml diff --git a/test-install-ironic.yml b/test-install-ironic.yml deleted file mode 100644 index c0fe1de8..00000000 --- a/test-install-ironic.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Playbook for installing Ironic - hosts: ironic_all - remote_user: root - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - roles: - - role: "os_ironic" diff --git a/test-install-keystone.yml b/test-install-keystone.yml deleted file mode 100644 index b5ed418e..00000000 --- a/test-install-keystone.yml +++ /dev/null @@ -1,74 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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 MQ/DB services - hosts: keystone_all[0] - gather_facts: true - any_errors_fatal: true - remote_user: root - vars_files: - - test-vars.yml - tasks: - -- name: Playbook for deploying keystone - hosts: keystone_all - serial: 1 - remote_user: root - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - pre_tasks: - # In order to ensure that any container, software or - # config file changes which causes a container/service - # restart do not cause an unexpected outage, we drain - # the load balancer back end for this container. - - include_tasks: common-tasks/haproxy-endpoint-manage.yml - vars: - haproxy_state: disabled - when: - - "groups['keystone_all'] | length > 1" - - name: "Pre-service deployment tasks from os_keystone role" - include_role: - name: os_keystone - tasks_from: main_pre.yml - roles: - - role: "os_keystone" - post_tasks: - # Now that container changes are done, we can set - # the load balancer back end for this container - # to available again. - - include_tasks: common-tasks/haproxy-endpoint-manage.yml - vars: - haproxy_state: enabled - when: - - "groups['keystone_all'] | length > 1" - -- name: Playbook for finalising the keystone db migrations - hosts: keystone_all[0] - remote_user: root - gather_facts: false - any_errors_fatal: true - vars_files: - - test-vars.yml - tasks: - - name: Perform a Keystone DB sync contract - command: keystone-manage db_sync --contract - become: yes - become_user: keystone - environment: - PATH: "/openstack/venvs/keystone-{{ keystone_venv_tag }}/bin:{{ ansible_env.PATH }}" - tags: - - skip_ansible_lint diff --git a/test-install-memcached.yml b/test-install-memcached.yml deleted file mode 100644 index c8031358..00000000 --- a/test-install-memcached.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Deploy memcached - hosts: memcached_all - remote_user: root - gather_facts: true - any_errors_fatal: true - roles: - - role: "memcached_server" - vars_files: - - test-vars.yml diff --git a/test-install-neutron.yml b/test-install-neutron.yml deleted file mode 100644 index 995f10b8..00000000 --- a/test-install-neutron.yml +++ /dev/null @@ -1,90 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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_playbook: setting-nodepool-variables.yml - -- name: Make /lib/modules accessible on neutron_agent containers - hosts: neutron_agent - # We explicitly do not use 'remote_user: root' here because the - # play totally fails to apply the extra container config through - # delegation. - become: True - gather_facts: true - any_errors_fatal: true - vars: - kernel_module_path: - apt: "{{ ansible_facts['distribution_release'] != 'focal' | ternary('lib/modules', 'usr/lib/modules') }}" - dnf: "usr/lib/modules" - vars_files: - - test-vars.yml - tasks: - - - name: Neutron extra lxc config - lxc_container: - name: "{{ container_name }}" - container_command: | - [[ ! -d "/{{ kernel_module_path[ansible_facts['pkg_mgr']] }}" ]] && mkdir -p "/{{ kernel_module_path[ansible_facts['pkg_mgr']] }}" - container_config: - - "lxc.apparmor.profile=unconfined" - - "lxc.cgroup.devices.allow=a *:* rmw" - - "lxc.mount.entry=/{{ kernel_module_path[ansible_facts['pkg_mgr']] }} {{ kernel_module_path[ansible_facts['pkg_mgr']] }} none bind 0 0" - delegate_to: "{{ physical_host }}" - - - name: Wait for container connectivity - wait_for_connection: - connect_timeout: "{{ lxc_container_wait_params.connect_timeout | default(omit) }}" - delay: "{{ lxc_container_wait_params.delay | default(omit) }}" - sleep: "{{ lxc_container_wait_params.sleep | default(omit) }}" - timeout: "{{ lxc_container_wait_params.timeout | default(omit) }}" - - - -- name: Prepare for neutron services - hosts: neutron_all - remote_user: root - gather_facts: true - any_errors_fatal: true - vars: - required_packages: - apt: - - "libffi-dev" - dnf: - - "libffi-devel" - vars_files: - - test-vars.yml - tasks: - - # NOTE: These are typically installed in the repo server where we build the - # neutron wheel - - name: Install packages required to build neutron python package - package: - name: "{{ required_packages[ansible_facts['pkg_mgr']] }}" - state: present - register: install_packages - until: install_packages is success - retries: 5 - delay: 2 - - - -- name: Deploy neutron server - hosts: neutron_all - remote_user: root - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - roles: - - role: "os_neutron" diff --git a/test-install-nova.yml b/test-install-nova.yml deleted file mode 100644 index aab732bf..00000000 --- a/test-install-nova.yml +++ /dev/null @@ -1,67 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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_playbook: setting-nodepool-variables.yml - -- name: Prepare for nova services - hosts: nova_all - remote_user: root - gather_facts: true - any_errors_fatal: true - vars: - required_packages: - apt: - - libxml2-dev - - libxslt-dev - - libffi-dev - - pkg-config - - libvirt-dev - dnf: - - libxml2-devel - - libxslt-devel - - libffi-devel - - pkgconfig - - libvirt-devel - vars_files: - - test-vars.yml - tasks: - # NOTE: These are typically installed in the repo server where we build the - # nova wheel - - name: Install packages required to build nova python package - package: - name: "{{ required_packages[ansible_facts['pkg_mgr']] }}" - state: present - - - -- name: Deploy nova control plane - hosts: "nova_all:!nova_compute" - remote_user: root - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - roles: - - role: "os_nova" - -- name: Deploy nova compute - hosts: "nova_compute" - remote_user: root - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - roles: - - role: "os_nova" diff --git a/test-install-openstack-hosts.yml b/test-install-openstack-hosts.yml deleted file mode 100644 index f31b6f43..00000000 --- a/test-install-openstack-hosts.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -# Copyright 2016, Rackspace US, Inc. -# -# 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: Execute the openstack-host role - hosts: localhost - # This set of tasks runs against localhost - # and requires root access, but tests run as - # the user running the playbook (zuul). As - # such, we use a local connection and become. - connection: local - become: yes - gather_facts: true - any_errors_fatal: true - roles: - - role: "openstack_hosts" - vars_files: - - test-vars.yml diff --git a/test-install-rabbitmq.yml b/test-install-rabbitmq.yml deleted file mode 100644 index fd9c84c4..00000000 --- a/test-install-rabbitmq.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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. - -# The rabbitmq needs access to hostvars for all containers in order -# to set the values in /etc/hosts. We therefore collect all host/container -# facts before continuing. -- name: Gather facts - hosts: "rabbitmq_all" - remote_user: root - gather_facts: true - -# The cluster must be stopped when doing major/minor upgrades -# http://www.rabbitmq.com/clustering.html#upgrading -- name: Stop RabbitMQ nodes that are not the upgrader - hosts: "rabbitmq_all[1:]" - serial: 1 - any_errors_fatal: true - remote_user: root - tasks: - - name: "Stop RabbitMQ" - service: - name: "rabbitmq-server" - state: "stopped" - when: - - (rabbitmq_upgrade | default(false)) | bool - -- name: Deploy Rabbitmq - hosts: rabbitmq_all - serial: 1 - remote_user: root - gather_facts: true - any_errors_fatal: true - roles: - - role: "rabbitmq_server" - vars_files: - - test-vars.yml diff --git a/test-install-swift.yml b/test-install-swift.yml deleted file mode 100644 index c9d63de8..00000000 --- a/test-install-swift.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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_playbook: test-setup-swifthosts.yml - -- name: Playbook for deploying swift - hosts: "{{ swift_groups | default('swift_all:swift_remote_all') }}" - # We explicitly do not use 'remote_user: root' here because the - # role totally fails when we do due to not being able to apply sysctl - # settings through delegation. - # TODO(odyssey4me): - # Figure out whether this issue happens for normal (non localhost) - # delegation, and how to resolve the issue. - become: True - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - roles: - - role: "os_swift" diff --git a/test-install-tempest.yml b/test-install-tempest.yml deleted file mode 100644 index 9d510500..00000000 --- a/test-install-tempest.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Playbook for deploying tempest - hosts: utility_all - # We explicitly do not use 'remote_user: root' here because the - # role totally fails when we do due to the delegation of the - # cirros image download into /opt/cache/files due to that path - # not being writable. - # TODO(odyssey4me): - # Figure out whether this issue happens for normal (non localhost) - # delegation, and how to resolve the issue. - become: True - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - tasks: - - name: Setup clouds.yaml for the root user - include_role: - name: openstack_openrc - vars: - openrc_file_dest: "/root/openrc" - openrc_file_owner: "root" - openrc_openstack_client_config_dir_dest: "/root/.config/openstack" - openrc_openstack_client_config_dir_owner: "root" - openrc_clouds_yml_file_owner: "root" - - - name: Include Tempest role - include_role: - name: "{{ tempest_rolename | default('os_tempest') }}" diff --git a/test-log-collect.sh b/test-log-collect.sh deleted file mode 100755 index bd52011d..00000000 --- a/test-log-collect.sh +++ /dev/null @@ -1,281 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -# WARNING: -# This file is use by all OpenStack-Ansible roles for testing purposes. -# Any changes here will affect all OpenStack-Ansible role repositories -# with immediate effect. - -# PURPOSE: -# This script collects, renames and compresses the logs produced in -# a role test if the host is in OpenStack-CI. - -## Vars ---------------------------------------------------------------------- - -export WORKING_DIR=${WORKING_DIR:-$(pwd)} -export TESTING_HOME=${TESTING_HOME:-$HOME} - -export RSYNC_CMD="rsync --archive --copy-links --ignore-errors --quiet --no-perms --no-owner --no-group --whole-file --inplace" - -# NOTE(cloudnull): This is a very simple list of common directories in /etc we -# wish to search for when storing gate artifacts. When adding -# things to this list please alphabetize the entries so it's -# easy for folks to find and adjust items as needed. -COMMON_ETC_LOG_NAMES="almanach \ - apt \ - aodh \ - apache2 \ - barbican \ - blazar \ - ceilometer \ - cinder \ - cloudkitty \ - congress \ - designate \ - glance \ - gnocchi \ - haproxy \ - heat \ - horizon \ - httpd \ - ironic \ - karbor \ - keystone \ - magnum \ - manila \ - mariadb \ - memcached \ - molteniron \ - monasca \ - mongodb \ - my.cnf \ - mysql \ - netplan \ - network \ - nginx \ - neutron \ - nova \ - octavia \ - panko \ - pip.conf \ - pki \ - qpid-dispatch \ - rabbitmq \ - rally \ - repo \ - resolv.conf \ - rsyslog \ - sahara \ - searchlight \ - sasl2 \ - swift \ - ssh \ - sysconfig/network-scripts \ - sysconfig/network \ - systemd/network \ - tacker \ - tempest \ - trove \ - watcher \ - yum \ - yum.repos.d \ - zaqar \ - zun \ - zypp" - -## Functions ----------------------------------------------------------------- - -function repo_information { - [[ "${1}" != "host" ]] && lxc_cmd="lxc-attach --name ${1} --" || lxc_cmd="" - echo "Collecting list of installed packages and enabled repositories for \"${1}\"" - # Redhat package debugging - if eval sudo ${lxc_cmd} which dnf &>/dev/null; then - eval sudo ${lxc_cmd} dnf repolist -v > "${WORKING_DIR}/logs/redhat-rpm-repolist-${1}.txt" || true - eval sudo ${lxc_cmd} dnf list installed > "${WORKING_DIR}/logs/redhat-rpm-list-installed-${1}.txt" || true - - # Ubuntu package debugging - elif eval sudo ${lxc_cmd} which apt-get &> /dev/null; then - eval sudo ${lxc_cmd} apt-cache policy | grep http | awk '{print $1" "$2" "$3}' | sort -u > "${WORKING_DIR}/logs/ubuntu-apt-repolist-${1}.txt" || true - eval sudo ${lxc_cmd} apt list --installed > "${WORKING_DIR}/logs/ubuntu-apt-list-installed-${1}.txt" || true - fi -} - -function store_artifacts { - # Store known artifacts only if they exist. If the target directory does - # exist, it will be created. - # USAGE: store_artifacts /src/to/artifacts /path/to/store - if sudo test -e "${1}"; then - if [[ ! -d "${2}" ]]; then - mkdir -vp "${2}" - fi - echo "Running artifact sync for \"${1}\" to \"${2}\"" - sudo ${RSYNC_CMD} ${1} ${2} || true - fi -} - -function store_journal_artifacts { - # Store lines from a known unit's journal as a plain-text log file. - # USAGE: store_journal_artifacts UNIT_TO_MATCH /path/to/store - if [ $? == 0 ]; then - if [[ ! -d "${2}" ]]; then - mkdir -vp "${2}" - fi - if [[ ${3:-false} != false ]]; then - if [[ -f "/var/log/journal/${3}/system.journal" ]]; then - SYSTEMD_UNITS=$(sudo journalctl --file="/var/log/journal/${3}/system.journal" \ - --output=json-pretty | grep -w UNIT | sort -u | awk -F'"' '{print $4}' | grep "${1}") - for service_unit in $(echo -e "${SYSTEMD_UNITS}"); do - echo "Pulling journal for ${service_unit}" - sudo journalctl --file="/var/log/journal/${3}/system.journal" \ - --since="1 hour ago" \ - --unit="${service_unit}" | sudo tee "${2}/${service_unit}.journal.log" &>/dev/null - done - fi - else - SYSTEMD_UNITS=$(sudo journalctl --output=json-pretty | grep -w UNIT | sort -u | awk -F'"' '{print $4}' | grep "${1}") - for service_unit in $(echo -e "${SYSTEMD_UNITS}"); do - echo "Pulling journal for ${service_unit}" - sudo journalctl --since="1 hour ago" \ - --unit="${service_unit}" | sudo tee "${2}/${service_unit}.journal.log" &>/dev/null - done - fi - fi -} - -function find_files { - find "${WORKING_DIR}/logs/" -type f \ - ! -name "*.gz" \ - ! -name '*.html' \ - ! -name '*.subunit' \ - ! -name "*.journal" \ - ! -name 'ansible.sqlite' | egrep -v 'stackviz|ara-report' -} - -function rename_files { - find_files |\ - while read filename; do \ - mv ${filename} ${filename}.txt || echo "WARNING: Could not rename ${filename}"; \ - done -} - -## Main ---------------------------------------------------------------------- - -echo "#### BEGIN LOG COLLECTION ###" - -mkdir -vp "${WORKING_DIR}/logs" - -# Gather basic logs -store_artifacts /openstack/log/ansible-logging/ "${WORKING_DIR}/logs/ansible" -store_artifacts /openstack/log/ "${WORKING_DIR}/logs/openstack" -store_artifacts /var/log/ "${WORKING_DIR}/logs/host" - - -# Figure out the correct path for ARA -# As this script is not run through tox, and the tox envs are all -# different names, we need to try and find the right path to execute -# ARA from. -source /etc/os-release || source /usr/lib/os-release - -ARA_CMD="$(find ${WORKING_DIR}/.tox -path "*/bin/ara-manage" -type f | head -n 1)" -ARA_OPTIONS="generate ${WORKING_DIR}/logs/ara-report" - -if [[ "${ARA_CMD}" != "" ]]; then - echo "Generating ARA static html report." - ${ARA_CMD} ${ARA_OPTIONS} -fi - -# Store the ara sqlite database in the openstack-ci expected path -store_artifacts "${TESTING_HOME}/.ara/ansible.sqlite" "${WORKING_DIR}/logs/ara-report/" - -# Store netstat report -store_artifacts /tmp/listening_port_report.txt "${WORKING_DIR}/logs/host" - -# Verify the integrity of the journal files but do not fail if one of them is not usable -echo "Verifying journal files consistency..." -find /var/log/journal/ -type f -name "*.journal" -exec bash -c 'sudo journalctl --file={} --verify || true' \; - -# Gather host etc artifacts -for service in ${COMMON_ETC_LOG_NAMES}; do - store_artifacts "/etc/${service}" "${WORKING_DIR}/logs/etc/host/" - store_journal_artifacts "${service}" "${WORKING_DIR}/logs/host" -done - -# Gather container etc artifacts -if which lxc-ls &> /dev/null; then - for CONTAINER_NAME in $(sudo lxc-ls -1); do - CONTAINER_PID=$(sudo lxc-info -p -n ${CONTAINER_NAME} | awk '{print $2}') - ETC_DIR="/proc/${CONTAINER_PID}/root/etc" - MACHINE_ID="$(sudo cat ${ETC_DIR}/machine-id)" - LOG_DIR="/proc/${CONTAINER_PID}/root/var/log" - repo_information ${CONTAINER_NAME} - for service in ${COMMON_ETC_LOG_NAMES}; do - store_artifacts ${ETC_DIR}/${service} "${WORKING_DIR}/logs/etc/openstack/${CONTAINER_NAME}/" - store_artifacts ${LOG_DIR}/${service} "${WORKING_DIR}/logs/openstack/${CONTAINER_NAME}/" - store_journal_artifacts ${service} "${WORKING_DIR}/logs/openstack/${CONTAINER_NAME}" "${MACHINE_ID}" - done - done -fi - -# NOTE(mhayden): All of the files must be world-readable so that the log -# pickup jobs will work properly. Without this, you get a "File not found" -# when trying to read the files in the job results. -# NOTE(odyssey4me): Using '--chown $(whoami) --chmod=ugo+rX' in the rsync -# CMD to achieve this would be optimal, but the CentOS version of rsync -# (3.0.x) does not support that option. -sudo chmod -R ugo+rX "${WORKING_DIR}/logs/" -sudo chown -R $(whoami) "${WORKING_DIR}/logs/" - -# Rename all files gathered to have a .txt suffix so that the compressed -# files are viewable via a web browser in OpenStack-CI. -rename_files - -# If we could not find ARA, assume it was not installed -# and skip all the related activities. -if [[ "${ARA_CMD}" != "" && ! (${VERSION_ID} == "8" && ${ID} == "centos") ]]; then - # Generate the ARA subunit report so that the - # results reflect in OpenStack-Health - mkdir -vp "${WORKING_DIR}/logs/ara-data" - echo "Generating ARA report subunit report." - ${ARA_CMD} generate subunit "${WORKING_DIR}/logs/ara-data/testrepository.subunit" || true -fi - -# Get a dmesg output so we can look for kernel failures -dmesg > "${WORKING_DIR}/logs/dmesg.log.txt" || true - -# Collect job environment -env > "${WORKING_DIR}/logs/environment.txt" || true - -# output ram usage -free -m > "${WORKING_DIR}/logs/memory-available.txt" || true - -# iptables -sudo iptables -nvL > "${WORKING_DIR}/logs/iptables.txt" || true -sudo iptables -t nat -nvL > "${WORKING_DIR}/logs/iptables-nat.txt" || true - -repo_information host - -# Record the active interface configs -if which ethtool &> /dev/null && which ip &> /dev/null; then - for interface in $(ip -o link | awk -F':' '{print $2}' | sed 's/@.*//g'); do - echo "ethtool -k ${interface}" - ethtool -k ${interface} > "${WORKING_DIR}/logs/ethtool-${interface}-${TS}-cfg.txt" || true - done -else - echo "No ethtool or iproute2 available" | tee -a "${WORKING_DIR}/logs/ethtool-${TS}-${interface}-cfg.txt" -fi - -echo "#### END LOG COLLECTION ###" - diff --git a/test-pep8.sh b/test-pep8.sh deleted file mode 100755 index 33a43893..00000000 --- a/test-pep8.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -# WARNING: -# This file is use by all OpenStack-Ansible roles for testing purposes. -# Any changes here will affect all OpenStack-Ansible role repositories -# with immediate effect. - -# PURPOSE: -# This script executes flake8 against all the files it find that match -# the search pattern. The search pattern is meant to find any python -# scripts present in the role. - -## Shell Opts ---------------------------------------------------------------- - -set -e - -## Vars ---------------------------------------------------------------------- - -export WORKING_DIR=${WORKING_DIR:-$(pwd)} - -## Main ---------------------------------------------------------------------- - -grep --recursive --binary-files=without-match \ - --files-with-match '^.!.*python$' \ - --exclude-dir .eggs \ - --exclude-dir .git \ - --exclude-dir .tox \ - --exclude-dir *.egg-info \ - --exclude-dir doc \ - "${WORKING_DIR}" | xargs flake8 --verbose diff --git a/test-prepare-containers.yml b/test-prepare-containers.yml deleted file mode 100644 index d2716333..00000000 --- a/test-prepare-containers.yml +++ /dev/null @@ -1,70 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Gather facts for the LXC hosts - hosts: localhost - # This set of tasks runs against localhost - # and requires root access, but tests run as - # the user running the playbook (zuul). As - # such, we use a local connection and become. - connection: local - become: yes - gather_facts: true - tasks: - - include_tasks: "common-tasks/test-set-nodepool-vars.yml" - -- name: Importing destroy_containers - import_playbook: destroy_containers.yml - when: destroy_first | default(True) | bool - -- name: Playbook for creating containers - hosts: all_containers - # We explicitly do not use 'remote_user: root' here because the - # role totally fails when we do due to the delegation of various - # tasks to localhost for creating the /openstack and /var/lib/lxc - # directories. - # TODO(odyssey4me): - # Figure out whether this issue happens for normal (non localhost) - # delegation, and how to resolve the issue. - become: True - gather_facts: False - any_errors_fatal: true - tasks: - - name: Create containers - include_role: - name: "lxc_container_create" - - name: Wait for container connectivity - wait_for_connection: - connect_timeout: "{{ lxc_container_wait_params.connect_timeout | default(omit) }}" - delay: "{{ lxc_container_wait_params.delay | default(omit) }}" - sleep: "{{ lxc_container_wait_params.sleep | default(omit) }}" - timeout: "{{ lxc_container_wait_params.timeout | default(omit) }}" - vars_files: - - test-vars.yml - -# TODO(evrardjp): Move this as an include_role above like the patch -# https://review.openstack.org/525109 -# when https://review.openstack.org/#/c/521598 is in, -# to optimize serialization -- name: Execute the openstack-host role on containers - hosts: all_containers - remote_user: root - gather_facts: true - pre_tasks: - - include_tasks: "common-tasks/test-set-nodepool-vars.yml" - roles: - - role: "openstack_hosts" - vars_files: - - test-vars.yml diff --git a/test-prepare-host.yml b/test-prepare-host.yml deleted file mode 100644 index 26305a37..00000000 --- a/test-prepare-host.yml +++ /dev/null @@ -1,231 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Importing test-repo-setup - import_playbook: test-repo-setup.yml - -- name: Playbook for configuring hosts - hosts: localhost - # This set of tasks runs against localhost - # and requires root access, but tests run as - # the user running the playbook (zuul). As - # such, we use a local connection and become. - connection: local - become: yes - vars_files: - - test-vars.yml - tasks: - - include_tasks: "common-tasks/test-set-nodepool-vars.yml" - - - name: Clear iptables rules - shell: "{{ playbook_dir }}/iptables-clear.sh" - register: iptables_clear - tags: - - skip_ansible_lint - - # This is a very dirty hack due to images.linuxcontainers.org - # constantly failing to resolve in openstack-infra. - - name: Implement hard-coded hosts entries for consistently failing name - lineinfile: - path: "/etc/hosts" - line: "{{ item }}" - state: present - with_items: - - "91.189.91.21 images.linuxcontainers.org us.images.linuxcontainers.org" - - "91.189.88.37 images.linuxcontainers.org uk.images.linuxcontainers.org" - - # NOTE(mhayden): Using package_state=present on CentOS should allow for - # more gate jobs to complete properly and expose more problems that can - # be fixed (instead of timeouts). - - name: Use present for package_state on CentOS - set_fact: - package_state: "{{ (ansible_facts['pkg_mgr'] == 'dnf') | ternary('present', 'latest') }}" - - - name: Setup clouds.yaml for the test user - include_role: - name: openstack_openrc - vars: - openrc_file_dest: "{{ lookup('env', 'HOME') }}/openrc" - openrc_file_owner: "{{ lookup('env', 'USER') }}" - openrc_openstack_client_config_dir_dest: "{{ lookup('env', 'HOME') }}/.config/openstack" - openrc_openstack_client_config_dir_owner: "{{ lookup('env', 'USER') }}" - openrc_clouds_yml_file_owner: "{{ lookup('env', 'USER') }}" - - - name: Setup clouds.yaml for the root user - include_role: - name: openstack_openrc - vars: - openrc_file_dest: "/root/openrc" - openrc_file_owner: "root" - openrc_openstack_client_config_dir_dest: "/root/.config/openstack" - openrc_openstack_client_config_dir_owner: "root" - openrc_clouds_yml_file_owner: "root" - -- name: Importing test-install-openstack-hosts - import_playbook: test-install-openstack-hosts.yml - -- name: Playbook for configuring the LXC host - hosts: localhost - # This set of tasks runs against localhost - # and requires root access, but tests run as - # the user running the playbook (zuul). As - # such, we use a local connection and become. - connection: local - become: yes - vars_files: - - test-vars.yml - roles: - - role: "lxc_hosts" - - post_tasks: - - name: Trigger dnsmasq restart - command: /bin/true - changed_when: - - (lxc_net_manage_iptables is defined) and (lxc_net_manage_iptables | bool) - - (iptables_clear is defined) and (iptables_clear is changed) - notify: - - Restart dnsmasq - -- name: Playbook for configuring test host networking - hosts: localhost - # This set of tasks runs against localhost - # and requires root access, but tests run as - # the user running the playbook (zuul). As - # such, we use a local connection and become. - connection: local - become: yes - vars: - iptool_path: - debian: "/sbin/ip" - redhat: "/usr/sbin/ip" - vars_files: - - test-vars.yml - tasks: - - name: Run the systemd-networkd role - include_role: - name: systemd_networkd - vars: - systemd_interface_cleanup: true - systemd_run_networkd: true - systemd_netdevs: |- # noqa jinja[spacing] - {% set systemd_network_devices = [] %} - {% for interface in (bridges | default([])) %} - {% if interface is string %} - {% set _ = systemd_network_devices.append({'NetDev': {'Name': 'dummy-' + interface, 'Kind': 'dummy'}}) %} - {% set _ = systemd_network_devices.append({'NetDev': {'Name': interface, 'Kind': 'bridge'}}) %} - {% else %} - {% set interface_name = interface.name | default('br-mgmt') %} - {% set _ = systemd_network_devices.append({'NetDev': {'Name': 'dummy-' + interface_name, 'Kind': 'dummy'}}) %} - {% set _ = systemd_network_devices.append({'NetDev': {'Name': interface_name, 'Kind': 'bridge'}}) %} - {% if interface.veth_peer is defined %} - {% set _ = systemd_network_devices.append({'NetDev': {'Name': interface_name + '-veth', 'Kind': 'veth'}, - 'Peer': {'Name': interface.veth_peer} - }) %} - {% endif %} - {% endif %} - {% endfor %} - {{ systemd_network_devices }} - systemd_networks: |- - {# If the interface is a string or no ip address is defined and the default address "10.1.0.1/24" will be used #} - {% set systemd_network_networks = [] %} - {% for interface in (bridges | default([])) %} - {% if interface is string %} - {% set _ = systemd_network_networks.append({'interface': 'dummy-' + interface, 'bridge': interface}) %} - {% set _ = systemd_network_networks.append({'interface': interface, 'address': '10.1.0.1', 'netmask': '255.255.255.0'}) %} - {% else %} - {% set interface_name = (interface.name | default('br-mgmt')) %} - {% if interface.alias is defined %} - {% set _ = systemd_network_networks.append({'interface': 'dummy-' + interface_name, 'bridge': interface_name}) %} - {% set _ = systemd_network_networks.append({'interface': interface_name, - 'netmask': (interface.netmask | default('255.255.255.0')), - 'config_overrides': {'Network': {'Address': {(interface.ip_addr | default('10.1.0.1')): null, - (interface.alias | string): null} - }}}) %} - {% else %} - {% set _ = systemd_network_networks.append({'interface': 'dummy-' + interface_name, 'bridge': interface_name}) %} - {% set _ = systemd_network_networks.append({'interface': interface_name, - 'address': (interface.ip_addr | default('10.1.0.1')), - 'netmask': (interface.netmask | default('255.255.255.0')), - 'ipforward': true}) %} - {% endif %} - {% if interface.veth_peer is defined %} - {% set _ = systemd_network_networks.append({'interface': interface.veth_peer + '-veth', 'bridge': interface_name}) %} - {% endif %} - {% endif %} - {% endfor %} - {{ systemd_network_networks }} - - - name: Run the systemd service role - include_role: - name: systemd_service - vars: - systemd_services: - - service_name: "networking-post-up" - config_overrides: - Unit: - Description: networking-post-up - After: network-online.target - Wants: network-online.target - Service: - RemainAfterExit: yes - service_type: oneshot - execstarts: |- - {% set veths = ['-/sbin/ethtool -K ' + - (bootstrap_host_public_interface | default(ansible_default_ipv4['alias'])) + - ' gso off sg off tso off tx off'] %} - {% for interface in (bridges | default([])) %} - {% if interface is string %} - {% set _ = veths.append('-' + iptool_path[ansible_facts['os_family'] | lower] + ' link set ' + interface + ' up') %} - {% set _ = veths.append('-/sbin/ethtool -K ' + interface + ' gso off sg off tso off tx off') %} - {% else %} - {% set interface_name = (interface.name | default('br-mgmt')) %} - {% set _ = veths.append('-' + iptool_path[ansible_facts['os_family'] | lower] + ' link set ' + interface_name + ' up') %} - {% set _ = veths.append('-/sbin/ethtool -K ' + interface_name + ' gso off sg off tso off tx off') %} - {% if interface.veth_peer is defined %} - {% set _ = veths.append('-' + iptool_path[ansible_facts['os_family'] | lower] + ' link set ' + interface_name + '-veth up') %} - {% set _ = veths.append('-' + iptool_path[ansible_facts['os_family'] | lower] + ' link set ' + interface.veth_peer + ' up') %} - {% set _ = veths.append('-/sbin/ethtool -K ' + interface.veth_peer + ' gso off sg off tso off tx off') %} - {% endif %} - {% endif %} - {% endfor %} - {{ veths }} - enabled: yes - state: started - systemd_tempd_prefix: openstack - tags: - - network-config - - post_tasks: - - name: (RE)Gather facts post setup - setup: - gather_subset: "all" - - - name: Set interfaces fact - set_fact: - active_interfaces: |- - {% set interfaces = [] %} - {% for interface in (bridges | default([])) %} - {% if interface is string %} - {% set interface_name = interface %} - {% else %} - {% set interface_name = interface.name | default('br-mgmt') %} - {% endif %} - {% set _ = interfaces.append(hostvars[inventory_hostname][('ansible_' + (interface_name | replace('-', '_')))]['active'] | bool) %} - {% endfor %} - {{ interfaces }} - - - name: Check that new network interfaces are up - assert: - that: "{{ active_interfaces }}" diff --git a/test-prepare-keys.yml b/test-prepare-keys.yml deleted file mode 100644 index cad7a181..00000000 --- a/test-prepare-keys.yml +++ /dev/null @@ -1,179 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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. - -# Note(andymccr): -# This uses local connection for the initial key setup -# as no key is setup to allow a connection to localhost -# as a remote host. -- name: Playbook for establishing ssh keys - hosts: localhost - gather_facts: false - any_errors_fatal: true - connection: local - become: yes - tasks: - - name: Ensure root has a .ssh directory - file: - path: /root/.ssh - state: directory - owner: root - group: root - mode: "0700" - - - name: Create ssh key pair for root - community.crypto.openssh_keypair: - path: /root/.ssh/id_rsa - comment: "openstack-ansible-tests generated" - - - name: Get root private key - slurp: - src: /root/.ssh/id_rsa - register: private_key_get - changed_when: false - - - name: Get root public key - slurp: - src: /root/.ssh/id_rsa.pub - register: public_key_get - changed_when: false - - - name: Set key facts - set_fact: - root_public_key: "{{ public_key_get.content | b64decode }}" - root_private_key: "{{ private_key_get.content | b64decode }}" - - - name: Add root ssh key to authorized_keys - authorized_key: - user: "root" - key: "{{ root_public_key }}" - -# Note(hwoarang): -# This uses local connection for the initial key setup -# as no key is setup to allow a connection to localhost -# as a remote host. -- name: Playbook for establishing user ssh keys - hosts: localhost - connection: local - become: no - any_errors_fatal: true - vars: - _user_id: "{{ lookup('env', 'USER') }}" - tasks: - - name: Run following tasks only when current user is not root - when: - - _user_id != 'root' - block: - # Shell used because facts may not be ready yet - - name: Get user home directory - shell: | - set -o pipefail - getent passwd '{{ _user_id }}' | cut -d':' -f6 - args: - executable: /bin/bash - register: user_home - changed_when: false - - - name: Set local user home fact - set_fact: - calling_user_home: "{{ user_home.stdout }}" - - - name: Ensure user has a .ssh directory - file: - path: "{{ calling_user_home }}/.ssh" - state: directory - owner: "{{ _user_id }}" - group: "{{ _user_id }}" - mode: "0700" - - - name: Ensure user has the known private key - copy: - content: "{{ root_private_key }}" - dest: "{{ calling_user_home }}/.ssh/id_rsa" - owner: "{{ _user_id }}" - group: "{{ _user_id }}" - mode: "0600" - - - name: Ensure user has the known public key - copy: - content: "{{ root_public_key }}" - dest: "{{ calling_user_home }}/.ssh/id_rsa.pub" - owner: "{{ _user_id }}" - group: "{{ _user_id }}" - mode: "0600" - - - name: Ensure local user can ssh to localhost - authorized_key: - user: "{{ _user_id }}" - key: "{{ root_public_key }}" - -- name: Create SSHD CA - hosts: "{{ openstack_ssh_keypairs_setup_host | default('localhost') }}" - gather_facts: false - become: yes - tasks: - - name: "Create SSHD certificate authority" - include_role: - name: openstack.osa.ssh_keypairs - vars: - ssh_keypairs_setup_host: localhost - ssh_keypairs_dir: "/etc/openstack_deploy/ssh_keypairs" - ssh_keypairs: - - name: "OpenStack-Ansible-SSH-Signing-Key" - ssh_keypairs_install_authorities: false - ssh_keypairs_install_keypairs: false - ssh_keypairs_install_authorized_keys: false - -- name: Create CA certificates - hosts: "{{ openstack_pki_setup_host | default('localhost') }}" - gather_facts: false - become: true - tasks: - - name: "Create CA certificates" - include_role: - name: pki - tasks_from: main_ca.yml - vars: - pki_dir: "/etc/openstack_deploy/pki" - pki_create_ca: true - pki_authorities: - - name: "ExampleCorpRoot" - provider: selfsigned - basic_constraints: "CA:TRUE" - cn: "Example Corp Root CA" - email_address: "pki@example.com" - country_name: "GB" - state_or_province_name: "England" - organization_name: "Example Corporation" - organizational_unit_name: "IT Security" - key_usage: - - digitalSignature - - cRLSign - - keyCertSign - not_after: "+3650d" - - name: "ExampleCorpIntermediate" - provider: ownca - basic_constraints: "CA:TRUE,pathlen:0" - cn: "Example Corp Openstack Infrastructure Intermediate CA" - email_address: "pki@example.com" - country_name: "GB" - state_or_province_name: "England" - organization_name: "Example Corporation" - organizational_unit_name: "IT Security" - key_usage: - - digitalSignature - - cRLSign - - keyCertSign - not_after: "+3650d" - signed_by: "ExampleCorpRoot" diff --git a/test-repo-setup.yml b/test-repo-setup.yml deleted file mode 100644 index dad251f9..00000000 --- a/test-repo-setup.yml +++ /dev/null @@ -1,57 +0,0 @@ ---- -# Copyright 2017, Rackspace US, Inc. -# -# 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: Playbook for setting facts for git repository - hosts: localhost - connection: local - become: no - gather_facts: false - any_errors_fatal: true - tasks: - - name: Ensure repo directory exists - file: - state: directory - path: "{{ development_repo_directory }}" - mode: "0755" - - # Git clones for developer testing are expected to be in the - # following structure, which mirrors how zuul v3 implements - # the clones: - # - # /src// - # - # eg: /home/zuul/src/opendev.org/keystone - # /home/zuul/src/github.com/projectcalico/felix - # - - name: Check for repositories that are cloned in the repos directory - command: "find {{ development_repo_directory }} -maxdepth 3 -mindepth 3 -type d" - register: projects_directory_find - tags: - - skip_ansible_lint - - # For the constraint file we assume that the egg name - # matches the repo folder name. - - name: Set var for git install branch - copy: - dest: "{{ development_repo_directory }}/local-package-constraints-{{ test_branch | replace('/', '_') }}.txt" - content: | - ## Ansible Managed - {% for folder_path in projects_directory_find.stdout_lines %} - file://{{ folder_path }}#egg={{ folder_path.split("/")[-1] }} - {% endfor %} - mode: "0755" - - vars_files: - - test-vars.yml diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 2efedd45..00000000 --- a/test-requirements.txt +++ /dev/null @@ -1,46 +0,0 @@ -# These requirements are used across all OSA role tests, and used -# for all ansible lint/syntax tests too. -# They need to *only* include the requirements for ansible in the -# tox venv - nothing more. Anything else *must* be implemented in -# the applicable role itself as a *_pip_packages list member as -# those are actually used in production. -# -# The global requirements process and its related tests expect there -# to be a minimum here. A requirement cannot be bare. A good guide -# for any new packages added here would be to grab the minimum version -# set out in openstack/requirements/lower-constraints.txt. -# What's set as a minimum does not matter to OSA, because we always -# use the version from openstack/requirements/upper-constraints.txt -# -# Anything which is not currently accepted in the general OpenStack -# requirements repo should be added in the test-ansible-deps.txt file -# instead so that it does not cause a requirements test failure. - -# Used for lint tests -bashate>=0.5.1 # Apache-2.0 -flake8==3.8.3 # MIT -ansible-lint==6.22.1 # MIT - -# Used to help make SNI connections work from python -# if python itself does not support it properly (<2.7.9). -pyasn1!=0.2.3,>=0.1.8 # BSD -pyOpenSSL>=17.1.0 # Apache-2.0 -requests>=2.14.2 # Apache-2.0 - -# We use this for our own keystone module. -# TODO(odyssey4me): Remove this once we no -# longer use our own keystone module. -python-keystoneclient>=3.8.0 # Apache-2.0 - -# We use this for the octavia role to be able -# to upload a tagged image. -# Remove this once Ansible can do this with -# modules instead. -python-openstackclient>=3.14.2 - -# We use this for the Ansible openstack -# modules. -openstacksdk>=0.14.0 # Apache-2.0 - -# We use this for the json_query filter -jmespath>=0.9.3 # MIT diff --git a/test-setup-cinder-localhost.yml b/test-setup-cinder-localhost.yml deleted file mode 100644 index 8b4bde20..00000000 --- a/test-setup-cinder-localhost.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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 cinder-volumes volume group - hosts: localhost - # This set of tasks runs against localhost - # and requires root access, but tests run as - # the user running the playbook (zuul). As - # such, we use a local connection and become. - connection: local - become: yes - tasks: - - name: Install lvm2 package - package: - name: lvm2 - - - name: Create sparse Cinder file - command: "truncate -s 10G /openstack/cinder.img" - args: - creates: /openstack/cinder.img - register: cinder_create - - - name: Get a loopback device for cinder file - command: losetup -f - when: cinder_create is changed - register: cinder_losetup - - - name: Create the loopback device - command: "losetup {{ cinder_losetup.stdout }} /openstack/cinder.img" - when: cinder_create is changed - - - name: Make LVM physical volume on the cinder device - command: "{{ item }}" - when: cinder_create is changed - with_items: - - "pvcreate {{ cinder_losetup.stdout }}" - - "pvscan" - - - name: Add cinder-volumes volume group - lvg: - vg: cinder-volumes - pvs: "{{ cinder_losetup.stdout }}" - when: cinder_create is changed - diff --git a/test-setup-host.yml b/test-setup-host.yml deleted file mode 100644 index 5d28c415..00000000 --- a/test-setup-host.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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. - -# Prepare the user ssh keys -- import_playbook: test-prepare-keys.yml - -# Prepare the host -- import_playbook: test-prepare-host.yml - -# Prepare the containers -- import_playbook: test-prepare-containers.yml diff --git a/test-setup-swifthosts.yml b/test-setup-swifthosts.yml deleted file mode 100644 index fcbf6d18..00000000 --- a/test-setup-swifthosts.yml +++ /dev/null @@ -1,110 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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: Swift setup - hosts: swift_hosts - # We explicitly do not use 'remote_user: root' here because the - # role totally fails when we do due to not being able to update - # the apt cache when trying to install packages for the ironic - # role. - # TODO(odyssey4me): - # Figure out whether this issue happens for normal (non localhost) - # delegation, and how to resolve the issue. - become: True - gather_facts: true - any_errors_fatal: true - vars_files: - - test-vars.yml - tasks: - - name: Ensure xfsprogs is installed on localhost - package: - name: xfsprogs - state: present - # NOTE(hwoarang) Use the ansible_facts['pkg_mgr'] fact gathered by - # the setup module for the container because package manager - # detection does not work as expected when the task is delegated. - # The reason is that the package module expects hostvars['%s']['ansible_facts']['pkg_mgr'] - # to be populated on delegated tasks but this is not the case here - # because we haven't run the setup module on localhost. - use: "{{ ansible_facts['pkg_mgr'] }}" - delegate_to: "{{ physical_host }}" - run_once: true - - - name: Ensure xfsprogs is installed on containers - package: - name: xfsprogs - state: present - - - name: Openstack directory Create - file: - state: directory - path: "/openstack/{{ item }}" - with_items: - - 'swift1' - - 'swift2' - - - name: Create sparse Swift files - command: "truncate -s 1024G /opt/{{ container_name }}_{{ item }}.img" - args: - creates: "/opt/{{ container_name }}_{{ item }}.img" - with_items: - - 'swift1' - - 'swift2' - register: swift_create - delegate_to: "{{ physical_host }}" - - - name: Format the Swift files - filesystem: - fstype: xfs - opts: '-K' - dev: "/opt/{{ container_name }}_{{ item }}.img" - when: swift_create is changed - with_items: - - 'swift1' - - 'swift2' - delegate_to: "{{ physical_host }}" - - - name: Create the Swift fstab entries and mount the file systems - mount: - name: "/srv/{{ container_name }}_{{ item }}" - src: "/opt/{{ container_name }}_{{ item }}.img" - fstype: xfs - opts: 'loop,noatime,nodiratime,nobarrier,logbufs=8' - passno: 0 - dump: 0 - state: mounted - with_items: - - 'swift1' - - 'swift2' - register: mount_status - until: mount_status is success - retries: 5 - delay: 2 - delegate_to: "{{ physical_host }}" - - - name: Swift extra lxc config - lxc_container: - name: "{{ container_name }}" - container_config: - - "lxc.mount.entry=/srv/{{ container_name }}_swift1 openstack/swift1 none bind 0 0" - - "lxc.mount.entry=/srv/{{ container_name }}_swift2 openstack/swift2 none bind 0 0" - delegate_to: "{{ physical_host }}" - - - name: Wait for container connectivity - wait_for_connection: - connect_timeout: "{{ lxc_container_wait_params.connect_timeout | default(omit) }}" - delay: "{{ lxc_container_wait_params.delay | default(omit) }}" - sleep: "{{ lxc_container_wait_params.sleep | default(omit) }}" - timeout: "{{ lxc_container_wait_params.timeout | default(omit) }}" diff --git a/test-vars.yml b/test-vars.yml deleted file mode 100644 index e822256a..00000000 --- a/test-vars.yml +++ /dev/null @@ -1,514 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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. - -# General Environment Settings -# NB the vip addresses aren't used, we specify per service -external_lb_vip_address: 127.0.0.1 -internal_lb_vip_address: 127.0.0.1 -debug: true -test_branch: "{{ lookup('env', 'TESTING_BRANCH') | default('master', true) }}" -services_branch: "{{ lookup('env', 'SERVICES_BRANCH') | default('master', true) }}" - -## Container destruction when testing repeatedly -force_containers_destroy: True -force_containers_data_destroy: True - -# Setup host variables that can be reused later -# These need to be defaulted if the group is not available -# To get around ansible evaluating the hostvars variable, we set a string -test_galera_group: "{{ ((groups['galera_all'] is defined) and (groups['galera_all'] | length > 0)) | ternary('galera_all', 'all_containers') }}" -test_rabbitmq_group: "{{ ((groups['rabbitmq_all'] is defined) and (groups['rabbitmq_all'] | length > 0)) | ternary('rabbitmq_all', 'all_containers') }}" -test_memcached_group: "{{ ((groups['memcached_all'] is defined) and (groups['memcached_all'] | length > 0)) | ternary('memcached_all', 'all_containers') }}" -test_keystone_group: "{{ ((groups['keystone_all'] is defined) and (groups['keystone_all'] | length > 0)) | ternary('keystone_all', 'all_containers') }}" -test_glance_group: "{{ ((groups['glance_all'] is defined) and (groups['glance_all'] | length > 0)) | ternary('glance_all', 'all_containers') }}" -test_nova_api_metadata_group: "{{ ((groups['nova_api_metadata'] is defined) and (groups['nova_api_metadata'] | length > 0)) | ternary('nova_api_metadata', 'all_containers') }}" -test_nova_api_compute_group: "{{ ((groups['nova_api_os_compute'] is defined) and (groups['nova_api_os_compute'] | length > 0)) | ternary('nova_api_os_compute', 'all_containers') }}" -test_nova_console_group: "{{ ((groups['nova_console'] is defined) and (groups['nova_console'] | length > 0)) | ternary('nova_console', 'all_containers') }}" -test_neutron_server_group: "{{ ((groups['neutron_server'] is defined) and (groups['neutron_server'] | length > 0)) | ternary('neutron_server', 'all_containers') }}" -test_swift_proxy_group: "{{ ((groups['swift_proxy'] is defined) and (groups['swift_proxy'] | length > 0)) | ternary('swift_proxy', 'all_containers') }}" -test_gnocchi_group: "{{ ((groups['gnocchi_all'] is defined) and (groups['gnocchi_all'] | length > 0)) | ternary('gnocchi_all', 'all_containers') }}" -test_ironic_api_group: "{{ ((groups['ironic_api'] is defined) and (groups['ironic_api'] | length > 0)) | ternary('ironic_api', 'all_containers') }}" -test_cinder_api_group: "{{ ((groups['cinder_api'] is defined) and (groups['cinder_api'] | length > 0)) | ternary('cinder_api', 'all_containers') }}" -test_galera_host: "{{ hostvars[groups[test_galera_group][0]]['ansible_host'] }}" -test_rabbitmq_host: "{{ hostvars[groups[test_rabbitmq_group][0]]['ansible_host'] }}" -test_memcached_host: "{{ hostvars[groups[test_memcached_group][0]]['ansible_host'] }}" -test_keystone_host: "{{ hostvars[groups[test_keystone_group][0]]['ansible_host'] }}" -test_glance_host: "{{ hostvars[groups[test_glance_group][0]]['ansible_host'] }}" -test_nova_api_metadata_host: "{{ hostvars[groups[test_nova_api_metadata_group][0]]['ansible_host'] }}" -test_nova_api_compute_host: "{{ hostvars[groups[test_nova_api_compute_group][0]]['ansible_host'] }}" -test_nova_console_host: "{{ hostvars[groups[test_nova_console_group][0]]['ansible_host'] }}" -test_neutron_server_host: "{{ hostvars[groups[test_neutron_server_group][0]]['ansible_host'] }}" -test_swift_proxy_host: "{{ hostvars[groups[test_swift_proxy_group][0]]['ansible_host'] }}" -test_gnocchi_api_host: "{{ hostvars[groups[test_gnocchi_group][0]]['ansible_host'] }}" -test_ironic_api_host: "{{ hostvars[groups[test_ironic_api_group][0]]['ansible_host'] }}" -test_cinder_api_host: "{{ hostvars[groups[test_cinder_api_group][0]]['ansible_host'] }}" - -## LXC container default bind mounts -lxc_container_default_bind_mounts: - - host_directory: "/openstack/backup/{{ inventory_hostname }}" - container_directory: "/var/backup" - - host_directory: "/openstack/log/{{ inventory_hostname }}" - container_directory: "/var/log" - -# LXC Settings -lxc_net_address: 10.100.100.1 -lxc_net_netmask: 255.255.255.0 -lxc_net_dhcp_range: 10.100.100.2,10.100.100.99 -lxc_net_bridge: lxcbr0 -lxc_kernel_options: - - { key: 'fs.inotify.max_user_instances', value: 1024 } -lxc_container_config_list: - - "lxc.apparmor.profile={{ (hostvars[physical_host]['ansible_facts']['distribution'] == 'Debian') | ternary('unconfined', 'lxc-openstack') }}" - -is_metal: "{{ not (ansible_facts['virtualization_type'] in ['lxc', 'systemd-nspawn']) }}" -physical_host: localhost - -# Galera Settings -galera_address: "{{ test_galera_host }}" -galera_root_password: secrete -galera_root_user: root -galera_innodb_buffer_pool_size: 256M -galera_innodb_log_buffer_size: 32M -galera_wsrep_node_name: "{{ inventory_hostname }}" -galera_wsrep_provider_options: - - { option: "gcache.size", value: "32M" } -galera_server_id: "{{ inventory_hostname | string_2_int }}" -galera_disable_privatedevices: true - -# RabbitMQ Settings -rabbitmq_cookie_token: secrete -rabbitmq_servers: "{{ test_rabbitmq_host }}" -rabbitmq_use_ssl: False -rabbitmq_port: 5672 -rabbitmq_password: "secrete" - -# Oslo Messaging RPC Settings -oslomsg_rpc_transport: rabbit -oslomsg_rpc_port: "{{ rabbitmq_port }}" -oslomsg_rpc_servers: "{{ rabbitmq_servers }}" -oslomsg_rpc_use_ssl: "{{ rabbitmq_use_ssl }}" -oslomsg_rpc_host_group: "{{ test_rabbitmq_group }}" -oslomsg_rpc_password: "{{ rabbitmq_password }}" -oslomsg_rpc_policies: - - name: "HA" - pattern: '^(?!(amq\.)|(.*_fanout_)|(reply_)).*' - priority: 0 - tags: "ha-mode=all" - -# Oslo Messaging Notify Settings -oslomsg_notify_transport: rabbit -oslomsg_notify_port: "{{ rabbitmq_port }}" -oslomsg_notify_servers: "{{ rabbitmq_servers }}" -oslomsg_notify_use_ssl: "{{ rabbitmq_use_ssl }}" -oslomsg_notify_host_group: "{{ test_rabbitmq_group }}" -oslomsg_notify_password: "{{ rabbitmq_password }}" -oslomsg_notify_policies: - - name: "HA" - pattern: '^(?!(amq\.)|(.*_fanout_)|(reply_)).*' - priority: 0 - tags: "ha-mode=all" - -# Memcache Settings -memcached_listen: "{{ test_memcached_host }}" -memcached_servers: "{{ test_memcached_host }}" -memcached_encryption_key: "secrete" -memcached_disable_privatedevices: true - -# Keystone Settings -keystone_ssl: True -keystone_admin_user_name: admin -keystone_admin_tenant_name: admin -keystone_auth_admin_password: "SuperSecretePassword" -keystone_service_adminuri_insecure: false -keystone_service_internaluri_insecure: false -keystone_service_publicuri: "http://{{ test_keystone_host }}:5000" -keystone_service_publicurl: "{{ keystone_service_publicuri }}/v3" -keystone_service_internaluri: "http://{{ test_keystone_host }}:5000" -keystone_service_internalurl: "{{ keystone_service_internaluri }}/v3" -keystone_service_adminuri: "http://{{ test_keystone_host }}:5000" -keystone_service_adminurl: "{{ keystone_service_adminuri }}/v3" -keystone_service_password: "secrete" -keystone_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}" -keystone_oslomsg_notify_password: "{{ oslomsg_notify_password }}" -keystone_container_mysql_password: "SuperSecrete" -keystone_venv_tag: "testing" -keystone_developer_mode: true -keystone_git_install_branch: "{{ services_branch }}" -keystone_service_region: RegionOne -keystone_cache_servers: "[{% for host in groups[test_memcached_group] %}\"{{ hostvars[host]['ansible_host'] }}:11211\"{% if not loop.last %},{% endif %}{% endfor %}]" - -# Glance specific settings -glance_service_publicuri: "http://{{ test_glance_host }}:9292" -glance_service_publicurl: "{{ glance_service_publicuri }}" -glance_service_internaluri: "http://{{ test_glance_host }}:9292" -glance_service_internalurl: "{{ glance_service_internaluri }}" -glance_service_adminuri: "http://{{ test_glance_host }}:9292" -glance_service_adminurl: "{{ glance_service_adminuri }}" -glance_service_port: 9292 -glance_service_user_name: glance -glance_container_mysql_password: "SuperSecrete" -glance_developer_mode: true -glance_git_install_branch: "{{ services_branch }}" -glance_profiler_hmac_key: "secrete" -glance_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}" -glance_oslomsg_notify_password: "{{ oslomsg_notify_password }}" -glance_service_password: "secrete" -glance_venv_tag: "testing" -glance_host: "{{ test_glance_host }}" - -# Nova specific settings -nova_api_container_mysql_password: "SuperSecrete" -nova_glance_api_servers: "http://{{ test_glance_host }}:9292" -nova_container_mysql_password: "SuperSecrete" -nova_developer_mode: true -nova_git_install_branch: "{{ services_branch }}" -nova_keystone_auth_plugin: password -nova_management_address: "{{ ansible_host }}" -nova_metadata_port: 8775 -nova_metadata_host: "{{ test_nova_api_metadata_host }}" -nova_metadata_protocol: http -nova_metadata_insecure: False -nova_metadata_proxy_secret: "secrete" -nova_novncproxy_vncserver_listen: localhost -nova_novncproxy_vncserver_proxyclient_address: localhost -nova_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}" -nova_oslomsg_notify_password: "{{ oslomsg_notify_password }}" -nova_program_name: nova-api-os-compute -nova_service_adminuri: "http://{{ test_nova_api_compute_host }}:8774" -nova_service_adminurl: "{{ nova_service_adminuri }}/v2.1" -nova_service_publicuri: "http://{{ test_nova_api_compute_host }}:8774" -nova_service_publicurl: "{{ nova_service_publicuri }}/v2.1" -nova_service_internaluri: "http://{{ test_nova_api_compute_host }}:8774" -nova_service_internalurl: "{{ nova_service_internaluri }}/v2.1" -nova_spice_html5proxy_base_uri: "http://{{ test_nova_console_host }}:6082" -nova_spice_html5proxy_base_url: "{{ nova_spice_html5proxy_base_uri }}/spice_auto.html" -nova_service_password: "secrete" -nova_service_project_domain_id: default -nova_service_project_name: service -nova_service_region: RegionOne -nova_service_user_domain_id: default -nova_service_user_name: nova -nova_venv_bin: "/openstack/venvs/nova-{{ nova_venv_tag }}/bin" -nova_venv_tag: "testing" -nova_discover_hosts_in_cells_interval: '-1' -# lxd specific vars -lxd_trust_password: "SuperSecrete" -nova_cell0_database: "nova_cell0" - -# Neutron specific settings -neutron_container_mysql_password: SuperSecrete -neutron_developer_mode: true -neutron_git_install_branch: "{{ services_branch }}" -neutron_fwaas_git_install_branch: "{{ services_branch }}" -neutron_vpnaas_git_install_branch: "{{ services_branch }}" -neutron_dynamic_routing_git_install_branch: "{{ services_branch }}" -# networking-calico is branchless -networking_calico_git_install_branch: "3.12.0" -networking_odl_git_install_branch: "{{ services_branch }}" -networking_sfc_git_install_branch: "{{ services_branch }}" -networking_bgpvpn_git_install_branch: "{{ services_branch }}" - -neutron_ha_vrrp_auth_password: secrete -neutron_management_address: "{{ test_neutron_server_host }}" -neutron_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}" -neutron_oslomsg_notify_password: "{{ oslomsg_notify_password }}" -neutron_service_publicuri: "http://{{ test_neutron_server_host }}:9696" -neutron_service_publicurl: "{{ neutron_service_publicuri }}" -neutron_service_adminuri: "http://{{ test_neutron_server_host }}:9696" -neutron_service_adminurl: "{{ neutron_service_adminuri }}" -neutron_service_internaluri: "http://{{ test_neutron_server_host }}:9696" -neutron_serivce_internalurl: "{{ neutron_service_internaluri }}" -neutron_service_password: "secrete" -neutron_service_project_name: service -neutron_service_region: RegionOne -neutron_service_user_name: neutron -neutron_venv_tag: testing -neutron_provider_networks: - network_types: "vxlan" - network_vxlan_ranges: "1:1000" -neutron_plugin_type: ml2.lxb - -# Cinder specific settings -cinder_backends_rbd_inuse: false -cinder_ceph_client: cinder -cinder_container_mysql_password: "SuperSecrete" -cinder_developer_mode: true -cinder_git_install_branch: "{{ services_branch }}" -cinder_glance_api_servers: "http://{{ test_glance_host }}:9292" -cinder_profiler_hmac_key: "secrete" -cinder_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}" -cinder_oslomsg_notify_password: "{{ oslomsg_notify_password }}" -cinder_service_password: "secrete" -cinder_venv_tag: "testing" -cinder_service_port: 8776 -cinder_service_proto: http -cinder_service_publicuri: "{{ cinder_service_proto }}://{{ test_cinder_api_host }}:{{ cinder_service_port }}" -cinder_service_publicurl: "{{ cinder_service_publicuri }}/v1/%(tenant_id)s" -cinder_service_adminuri: "{{ cinder_service_proto }}://{{ test_cinder_api_host }}:{{ cinder_service_port }}" -cinder_service_adminurl: "{{ cinder_service_adminuri }}/v1/%(tenant_id)s" -cinder_service_internaluri: "{{ cinder_service_proto }}://{{ test_cinder_api_host }}:{{ cinder_service_port }}" -cinder_service_internalurl: "{{ cinder_service_internaluri }}/v1/%(tenant_id)s" -cinder_service_v2_port: 8776 -cinder_service_v2_proto: http -cinder_service_v2_publicuri: "{{ cinder_service_v2_proto }}://{{ tst_cinder_api_host }}:{{ cinder_service_v2_port }}" -cinder_service_v2_publicurl: "{{ cinder_service_publicuri }}/v2/%(tenant_id)s" -cinder_service_v2_adminuri: "{{ cinder_service_v2_proto }}://{{ test_cinder_api_host }}:{{ cinder_service_v2_port }}" -cinder_service_v2_adminurl: "{{ cinder_service_adminuri }}/v2/%(tenant_id)s" -cinder_service_v2_internaluri: "{{ cinder_service_v2_proto }}://{{ test_cinder_api_host }}:{{ cinder_service_v2_port }}" -cinder_service_v2_internalurl: "{{ cinder_service_internaluri }}/v2/%(tenant_id)s" -cinder_backends: - lvm: - volume_group: cinder-volumes - volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver - volume_backend_name: LVM_iSCSI -cinder_default_volume_type: lvm - -# Swift specific settings -swift_oslomsg_notify_password: "{{ oslomsg_notify_password }}" -swift_container_mysql_password: "SuperSecrete" -swift_dispersion_password: "secrete" -swift_hash_path_prefix: "secrete_prefx" -swift_hash_path_suffix: "secrete_suffix" -swift_service_password: "secrete" -swift_developer_mode: true -swift_git_install_branch: "{{ services_branch }}" -swift_venv_tag: untagged -swift_venv_bin: "/openstack/venvs/swift-{{ swift_venv_tag }}/bin" -swift_service_publicuri: "http://{{ test_swift_proxy_host }}:8080" -swift_service_adminuri: "http://{{ test_swift_proxy_host }}:8080" -swift_service_internaluri: "http://{{ test_swift_proxy_host }}:8080" -swift: - storage_network: "{{ test_swift_storage_network | default('eth2') }}" - replication_network: "{{ test_swift_repl_network | default('eth3') }}" - part_power: 8 - repl_number: "{{ test_swift_repl_number | default(3) }}" - region: "{{ test_swift_region | default(1) }}" - drives: - - name: swift1 - - name: swift2 - mount_point: /openstack - storage_policies: - - policy: - name: gold - index: 0 - default: True -swift_proxy_server_conf_overrides: - "filter:keystoneauth": - reseller_prefix: "AUTH, SERVICE" - "SERVICE_service_roles": "test5" - -# Heat specific settings -heat_venv_tag: "testing" -heat_developer_mode: True -heat_git_install_branch: "{{ services_branch }}" -heat_service_password: secrete -heat_stack_domain_admin_password: secrete -heat_auth_encryption_key: 32characterslongboguskeyvaluefoo -heat_container_mysql_password: "SuperSecrete" -heat_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}" -heat_oslomsg_notify_password: "{{ oslomsg_notify_password }}" - -# Gnocchi specific settings -gnocchi_venv_tag: "testing" -gnocchi_developer_mode: true -gnocchi_service_publicuri: "http://{{ test_gnocchi_api_host }}:8041" -gnocchi_service_adminuri: "http://{{ test_gnocchi_api_host }}:8041" -gnocchi_service_internaluri: "http://{{ test_gnocchi_api_host }}:8041" -gnocchi_container_mysql_password: "secrete" -gnocchi_keystone_auth: yes -gnocchi_service_password: "secrete" -gnocchi_ssl_external: false - -# Ironic specific settings -ironic_venv_tag: "testing" -ironic_developer_mode: True -ironic_git_install_branch: "{{ services_branch }}" -ironic_service_publicuri: "http://{{ test_ironic_api_host }}:6385" -ironic_service_publicurl: "{{ ironic_service_publicuri }}" -ironic_service_adminuri: "http://{{ test_ironic_api_host }}:6385" -ironic_service_adminurl: "{{ ironic_service_adminuri }}" -ironic_service_internaluri: "http://{{ test_ironic_api_host }}:6385" -ironic_service_internalurl: "{{ ironic_service_internaluri }}" -ironic_service_password: "secrete" -ironic_service_name: ironic -ironic_service_project_name: "service" -ironic_container_mysql_password: "secrete" -ironic_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}" -ironic_oslomsg_notify_password: "{{ oslomsg_notify_password }}" -ironic_swift_temp_url_secret_key: secrete -ironic_keystone_auth_plugin: password -ironic_glance_api_servers: "http://{{ test_glance_host }}:9292" - -# Horizon Settings -horizon_developer_mode: true -horizon_venv_tag: "testing" -horizon_git_install_branch: "{{ services_branch }}" -horizon_requirements_git_install_branch: "{{ services_branch }}" -horizon_container_mysql_password: "SuperSecrete" -horizon_secret_key: "SuperSecreteHorizonKey" -horizon_external_ssl: False - -# Tempest specific settings -#NOTE(jrosser) tempest master is broken, fix is hopefully https://review.opendev.org/c/openstack/tempest/+/771817 -#tempest_git_repo: https://opendev.org/openstack/tempest -# We prefer to use the released versions of tempest for stable branches, but -# we deploy the latest for the master branch. -tempest_venv_download: False -# tempest_venv_bin is set to use the same naming convention -# as the other venvs (with the tag 'testing') -tempest_venv_bin: "/opt/tempest-testing/bin" -tempest_public_subnet_cidr: 10.1.3.0/24 -tempest_public_subnet_allocation_pools: "10.1.3.150-10.1.3.200" -tempest_log_dir: "/var/log/" -tempest_main_group: utility_all -tempest_run: yes -tempest_service_available_aodh: "{{ ((groups['aodh_all'] is defined) and (groups['aodh_all'] | length > 0)) }}" -tempest_service_available_ceilometer: "{{ ((groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0)) }}" -tempest_service_available_cinder: "{{ ((groups['cinder_all'] is defined) and (groups['cinder_all'] | length > 0)) }}" -tempest_service_available_glance: "{{ ((groups['glance_all'] is defined) and (groups['glance_all'] | length > 0)) }}" -tempest_service_available_heat: "{{ ((groups['heat_all'] is defined) and (groups['heat_all'] | length > 0)) }}" -tempest_service_available_horizon: "{{ ((groups['horizon_all'] is defined) and (groups['horizon_all'] | length > 0)) }}" -tempest_service_available_neutron: "{{ ((groups['neutron_all'] is defined) and (groups['neutron_all'] | length > 0)) }}" -tempest_service_available_nova: "{{ ((groups['nova_all'] is defined) and (groups['nova_all'] | length > 0)) }}" -tempest_service_available_swift: "{{ ((groups['swift_all'] is defined) and (groups['swift_all'] | length > 0)) }}" -tempest_service_available_zaqar: "{{ ((groups['zaqar_all'] is defined) and (groups['zaqar_all'] | length > 0)) }}" -tempest_use_tempestconf: false -tempest_run_stackviz: False -tempest_image_dir: "/opt/cache/files" -tempest_test_includelist: - - smoke - -# openrc settings -openrc_os_password: "{{ keystone_auth_admin_password }}" -openrc_os_domain_name: "Default" -openrc_os_auth_url: "http://{{ test_keystone_host }}:5000/v3" - -# Set workers for all services to optimise memory usage -ceilometer_api_workers: 2 -ceilometer_collector_workers: 2 -ceilometer_notification_workers: 2 -cinder_osapi_volume_workers: 2 -glance_api_threads: 2 -heat_api_threads: 2 -horizon_wsgi_threads: 2 -keystone_wsgi_processes: 2 -neutron_api_workers: 2 -neutron_metadata_workers: 1 -neutron_rpc_workers: 1 -nova_api_threads: 2 -nova_wsgi_processes: 2 -repo_nginx_threads: 2 -swift_account_server_workers: 2 -swift_container_server_workers: 2 -swift_object_server_workers: 2 -swift_proxy_server_workers: 2 -glance_wsgi_processes: 2 -cinder_wsgi_processes: 2 -neutron_wsgi_processes: 2 -swift_wsgi_processes: 2 -heat_wsgi_processes: 2 -octavia_wsgi_processes: 2 -ironic_wsgi_processes: 2 - - -# PIP install options - -# This ensures that libvirt-python is built from source. A pre-built -# wheel can be missing libvirt capabilities from the installed version -# of libvirt-bin, leading to nova-compute failing to start. -# -# NOTE(hwoarang) cryptography may bundle openssl in the wheel and that -# causes symbol conflicts if a different openssl is provided by the -# distribution. As such, it's probably safer to re-build cryptography -# ourselves just to be sure that the correct distro libraries are used -# see https://github.com/pyca/cryptography/issues/3804 -# This keeps poping up every now and then so it might worth keeping this -# around even if the upstream issue is resolved -#Cryptography is shipping with wheels, and recent bugs for -#dynamic linking in wheel building [1] should be fixed now. -# We should therefore use the wheels. -# 1: https://github.com/pyca/cryptography/pull/3811 -pip_install_options: "--no-binary libvirt-python" - -# The URL/path of a constraints file to use when installing the additional pip packages. -pip_install_upper_constraints: "https://opendev.org/openstack/openstack-ansible/raw/{{ test_branch }}/global-requirement-pins.txt --constraint https://opendev.org/openstack/requirements/raw/{{ services_branch }}/upper-constraints.txt" - -# apply openstack-ansible global constraints for python_venv_build -_global_pins_file_url: "https://opendev.org/openstack/openstack-ansible/raw/{{ test_branch }}/global-requirement-pins.txt" - -venv_build_global_constraints: >- - {{ lookup('url', _global_pins_file_url, wantlist=True) | reject('match','^#.*$') | reject('equalto', '') | list }} - -requirements_git_install_branch: "{{ services_branch.split('/')[-1] }}" - -# As role tests are executed in temporary environments, we don't need -# to always fetch the latest get-pip.py script -pip_get_pip_force: no - -# We do not have a repo container, thus we should not attempt to build wheels -venv_wheel_build_enable: False - -# Test install options -install_test_packages: True - -## Parameters provided to the wait_for_connection module after a container -## reboot is triggered by the role -lxc_container_wait_params: - # Wait 3 seconds before attempting the first connection - delay: 3 - # Wait 60 seconds for the container to respond - timeout: 60 - -## Developer mode variables -# Location of development repositories directory -development_repo_directory: "{{ lookup('env', 'OPENSTACK_REPO_DIRECTORY') | default(lookup('env', 'TESTING_HOME') ~ '/src', true) }}" - -## Container bind mounts -# Bind mount the repositories into each container to allow development work -lxc_container_bind_mounts: - - host_directory: "{{ development_repo_directory }}" - container_directory: "{{ development_repo_directory }}" -# Bind mount the pip cache into each container to speed up builds - - host_directory: "/root/.cache/pip" - container_directory: "/root/.cache/pip" - -## haproxy variables -haproxy_ssl: no - -openstack_user_kernel_options: - - key: 'kernel.printk' - value: '4 1 7 4' - -#python3 -## OpenStack service python version -openstack_venv_python_executable: "python3" -uwsgi_python_executable: "{{ openstack_venv_python_executable }}" - -## OpenStack db setup host -openstack_db_setup_host: infra1 - -## ssh keypairs -openstack_ssh_keypairs_dir: "/etc/openstack_deploy/ssh_keypairs" -openstack_ssh_signing_key: "OpenStack-Ansible-SSH-Signing-Key" -openstack_ssh_keypairs_authorities: - - name: "{{ openstack_ssh_signing_key }}" - -## certificate authority -openstack_pki_authorities: - # placeholder to ensure that this var is defined and list is length > 0 - - true - -openstack_pki_dir: "/etc/openstack_deploy/pki" -openstack_pki_service_intermediate_cert_name: "ExampleCorpIntermediate" diff --git a/tests/ansible-role-requirements.yml b/tests/ansible-role-requirements.yml deleted file mode 100644 index 13e6c9a7..00000000 --- a/tests/ansible-role-requirements.yml +++ /dev/null @@ -1,57 +0,0 @@ ---- -- name: apt_package_pinning - src: https://opendev.org/openstack/openstack-ansible-apt_package_pinning - scm: git - version: master -- name: memcached_server - src: https://opendev.org/openstack/openstack-ansible-memcached_server - scm: git - version: master -- name: openstack_hosts - src: https://opendev.org/openstack/openstack-ansible-openstack_hosts - scm: git - version: master -- name: lxc_hosts - src: https://opendev.org/openstack/openstack-ansible-lxc_hosts - scm: git - version: master -- name: lxc_container_create - src: https://opendev.org/openstack/openstack-ansible-lxc_container_create - scm: git - version: master -- name: galera_client - src: https://opendev.org/openstack/openstack-ansible-galera_client - scm: git - version: master -- name: galera_server - src: https://opendev.org/openstack/openstack-ansible-galera_server - scm: git - version: master -- name: rabbitmq_server - src: https://opendev.org/openstack/openstack-ansible-rabbitmq_server - scm: git - version: master -- name: os_keystone - src: https://opendev.org/openstack/openstack-ansible-os_keystone - scm: git - version: master -- name: openstack_openrc - src: https://opendev.org/openstack/openstack-ansible-openstack_openrc - scm: git - version: master -- name: os_tempest - src: https://opendev.org/openstack/openstack-ansible-os_tempest - scm: git - version: master -- name: systemd_service - src: https://opendev.org/openstack/ansible-role-systemd_service - scm: git - version: master -- name: python_venv_build - src: https://opendev.org/openstack/ansible-role-python_venv_build - scm: git - version: master -- name: pki - src: https://opendev.org/openstack/ansible-role-pki - scm: git - version: master diff --git a/tests/group_vars/all_containers.yml b/tests/group_vars/all_containers.yml deleted file mode 100644 index 802a50f4..00000000 --- a/tests/group_vars/all_containers.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -container_networks: - management_address: - address: "{{ ansible_host }}" - bridge: "br-mgmt" - interface: "eth1" - netmask: "255.255.255.0" - type: "veth" -physical_host: localhost -properties: - service_name: "{{ inventory_hostname }}" diff --git a/tests/host_vars/localhost.yml b/tests/host_vars/localhost.yml deleted file mode 100644 index 253043ce..00000000 --- a/tests/host_vars/localhost.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Copyright 2016, Rackspace US, Inc. -# -# 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. - -bridges: - - "br-mgmt" - - name: "br-test1" - ip_addr: "10.1.1.1" - - name: "br-test2" - ip_addr: "10.1.2.1" - veth_peer: "veth-test" - diff --git a/tests/inventory b/tests/inventory deleted file mode 100644 index 6f330092..00000000 --- a/tests/inventory +++ /dev/null @@ -1,34 +0,0 @@ -[all] -localhost ansible_connection=local ansible_become=True is_metal=true physical_host=aio1 -infra1 ansible_host=10.1.0.2 ansible_become=True ansible_user=root container_name=infra1 container_tech=lxc -keystone1 ansible_host=10.1.0.3 ansible_become=True ansible_user=root container_name=keystone1 container_tech=lxc - -[all_containers] -infra1 -keystone1 - -[oslomsg_rpc_all] -infra1 - -[oslomsg_notify_all] -infra1 - -[rabbitmq_all] -infra1 - -[galera_all] -infra1 - -[memcached_all] -infra1 - -[service_all:children] -rabbitmq_all -galera_all -memcached_all - -[keystone_all] -keystone1 - -[utility_all] -keystone1 diff --git a/tests/test.yml b/tests/test.yml deleted file mode 100644 index bc0321d2..00000000 --- a/tests/test.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Copyright 2015, Rackspace US, Inc. -# -# 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. - -# Prepare the user ssh keys -- name: Importing test-prepare-keys - import_playbook: common/test-prepare-keys.yml - -# Prepare the host -- name: Importing test-prepare-host - import_playbook: common/test-prepare-host.yml - -# Prepare the containers -- name: Importing test-prepare-containers - import_playbook: common/test-prepare-containers.yml - -# Install RabbitMQ/MariaDB/Memcached -- name: Importing test-install-infra - import_playbook: common/test-install-infra.yml - -# Install Keystone -- name: Importing test-install-keystone - import_playbook: common/test-install-keystone.yml - -# Install Tempest -- name: Importing test-install-tempest - import_playbook: common/test-install-tempest.yml - -# Gather port status -- name: Importing listening-port-report - import_playbook: common/listening-port-report.yml diff --git a/tox.ini b/tox.ini deleted file mode 100644 index fc744768..00000000 --- a/tox.ini +++ /dev/null @@ -1,94 +0,0 @@ -[tox] -minversion = 3.1 -skipsdist = True -envlist = docs,linters,func - -[testenv] -basepython = python3 -usedevelop = False -commands = - /usr/bin/find . -type f -name "*.pyc" -delete -passenv = - HOME - USER - http_proxy - HTTP_PROXY - https_proxy - HTTPS_PROXY - no_proxy - NO_PROXY - SERVICES_BRANCH -allowlist_externals = - bash -setenv = - PYTHONUNBUFFERED=1 - VIRTUAL_ENV={envdir} - WORKING_DIR={toxinidir} - -[testenv:docs] -deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/doc/requirements.txt -commands = - bash -c "rm -rf doc/build" - doc8 doc - sphinx-build -W --keep-going -b html doc/source doc/build/html - -[testenv:pdf-docs] -deps = {[testenv:docs]deps} -allowlist_externals = - make -commands = - sphinx-build --keep-going -W -b latex doc/source doc/build/pdf - make -C doc/build/pdf - -[doc8] -# Settings for doc8: -extensions = .rst - -[testenv:releasenotes] -deps = {[testenv:docs]deps} -commands = - sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html - -# environment used by the -infra templated tarballs job -[testenv:venv] -commands = - {posargs} - -[testenv:pep8] -commands = - bash -c "{toxinidir}/tests/common/test-pep8.sh" - -[flake8] -# Ignores the following rules due to how ansible modules work in general -# F403 'from ansible.module_utils.basic import *' used; -# unable to detect undefined names -ignore=F403 - -[testenv:bashate] -commands = - bash -c "{toxinidir}/tests/common/test-bashate.sh" - -[testenv:ansible-syntax] -commands = - bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh" - -[testenv:ansible-lint] -commands = - bash -c "{toxinidir}/tests/common/test-ansible-lint.sh" - -[testenv:functional] -commands = - bash -c "{toxinidir}/tests/common/test-ansible-functional.sh" -setenv = - {[testenv]setenv} - ANSIBLE_OVERRIDES={toxinidir}/test-vars.yml - -[testenv:linters] -commands = - bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh" - {[testenv:pep8]commands} - {[testenv:bashate]commands} - {[testenv:ansible-lint]commands} - {[testenv:ansible-syntax]commands} diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml deleted file mode 100644 index 79867622..00000000 --- a/zuul.d/jobs.yaml +++ /dev/null @@ -1,146 +0,0 @@ ---- -# Copyright 2017, Rackspace US, Inc. -# -# 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. - -- job: - name: openstack-ansible-base - parent: base - description: | - The base job which all other openstack-ansible jobs - should use as a parent to ensure that the correct - repositories ae in place. - required-projects: - - name: openstack/ansible-hardening - - name: openstack/ansible-role-python_venv_build - - name: openstack/ansible-role-pki - - name: openstack/ansible-role-systemd_mount - - name: openstack/ansible-role-systemd_networkd - - name: openstack/ansible-role-systemd_service - - name: openstack/openstack-ansible - - name: openstack/openstack-ansible-apt_package_pinning - - name: openstack/openstack-ansible-ceph_client - - name: openstack/ansible-config_template - - name: openstack/openstack-ansible-galera_client - - name: openstack/openstack-ansible-galera_server - - name: openstack/openstack-ansible-haproxy_server - - name: openstack/openstack-ansible-lxc_container_create - - name: openstack/openstack-ansible-lxc_hosts - - name: openstack/openstack-ansible-memcached_server - - name: openstack/openstack-ansible-openstack_hosts - - name: openstack/openstack-ansible-openstack_openrc - - name: openstack/openstack-ansible-os_aodh - - name: openstack/openstack-ansible-os_barbican - - name: openstack/openstack-ansible-os_blazar - - name: openstack/openstack-ansible-os_ceilometer - - name: openstack/openstack-ansible-os_cinder - - name: openstack/openstack-ansible-os_designate - - name: openstack/openstack-ansible-os_glance - - name: openstack/openstack-ansible-os_gnocchi - - name: openstack/openstack-ansible-os_heat - - name: openstack/openstack-ansible-os_keystone - - name: openstack/openstack-ansible-os_horizon - - name: openstack/openstack-ansible-os_ironic - - name: openstack/openstack-ansible-os_magnum - - name: openstack/openstack-ansible-os_manila - - name: openstack/openstack-ansible-os_masakari - - name: openstack/openstack-ansible-os_mistral - - name: openstack/openstack-ansible-os_neutron - - name: openstack/openstack-ansible-os_nova - - name: openstack/openstack-ansible-os_octavia - - name: openstack/openstack-ansible-os_panko - - name: openstack/openstack-ansible-os_placement - - name: openstack/openstack-ansible-os_rally - - name: openstack/openstack-ansible-os_swift - - name: openstack/openstack-ansible-os_tacker - - name: openstack/openstack-ansible-os_tempest - - name: openstack/openstack-ansible-os_trove - - name: openstack/openstack-ansible-plugins - - name: openstack/ansible-role-qdrouterd - - name: openstack/openstack-ansible-rabbitmq_server - - name: openstack/openstack-ansible-repo_server - - name: openstack/openstack-ansible-rsyslog_client - - name: openstack/openstack-ansible-rsyslog_server - - name: openstack/openstack-ansible-nspawn_container_create - - name: openstack/openstack-ansible-nspawn_hosts - - name: openstack/requirements - pre-run: zuul.d/playbooks/pre-gate-cleanup.yml - run: zuul.d/playbooks/run.yml - post-run: zuul.d/playbooks/post.yml - -- job: - name: openstack-ansible-functional - parent: openstack-ansible-base - description: | - Run functional tests for an OpenStack-Ansible project. - Uses tox with the ``functional`` environment by default, - but the environment name can be changed through the use - of the ``tox_env`` variable. - irrelevant-files: - - ^\.git.* - - ^.*\.(example|md|rst)$ - - ^deploy-guide/.* - - ^doc/.* - - ^releasenotes/.* - - ^setup\.(cfg|py)$ - - ^Vagrantfile - timeout: 5400 # 90 mins - vars: - tox_env: functional - -- job: - name: openstack-ansible-linters - parent: openstack-ansible-base - description: | - Run lint tests for an OpenStack-Ansible project. - Uses tox with the ``linters`` environment. - timeout: 1800 # 30 mins - nodeset: ubuntu-jammy - vars: - tox_env: linters - -- job: - name: openstack-ansible-upgrade - parent: openstack-ansible-functional - # TODO(mnaser): We need to switch to using the integrated repo for the - # upgrade tests down the line because the current role upgrade - # jobs don't properly do upgrades and use roles from master - # with roles from older stable branches. - voting: false - description: | - Run upgrade tests for an OpenStack-Ansible project. - Uses tox with the ``upgrade`` environment. - vars: - tox_env: upgrade - -- job: - name: openstack-ansible-functional-ubuntu-jammy - parent: openstack-ansible-functional - nodeset: ubuntu-jammy - -- job: - name: openstack-ansible-functional-centos-9-stream - parent: openstack-ansible-functional - nodeset: centos-9-stream - -- job: - name: openstack-ansible-cross-repo-functional - parent: openstack-ansible-functional - description: | - Run functional tests for an OpenStack-Ansible project. - Uses tox with the ``functional`` environment by default, - but the environment name can be changed through the use - of the ``tox_env`` variable. The OpenStack-Ansible repo - to execute the tests from must be specified in the - ``osa_test_repo`` variable. - nodeset: ubuntu-bionic diff --git a/zuul.d/playbooks/post.yml b/zuul.d/playbooks/post.yml deleted file mode 100644 index 49a9b812..00000000 --- a/zuul.d/playbooks/post.yml +++ /dev/null @@ -1,61 +0,0 @@ ---- -# Copyright 2017, Rackspace US, Inc. -# -# 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. - -- hosts: all - tasks: - - name: Set current test repo (cross-repo) - set_fact: - current_test_repo: "opendev.org/{{ osa_test_repo }}" - when: - - osa_test_repo is defined - - - name: Set current test repo (non-cross-repo) - set_fact: - current_test_repo: "{{ zuul.project.canonical_name }}" - when: - - osa_test_repo is not defined - - - name: Run log collection script - shell: | - echo "TEST_EXIT_CODE: ${TEST_EXIT_CODE}" - if [[ -d "tests/common" ]]; then - source tests/common/test-log-collect.sh - else - echo "The common tests repo has not been cloned yet. Logs cannot be collected without it." - fi - args: - executable: "/bin/bash" - chdir: "{{ ansible_user_dir }}/src/{{ current_test_repo }}" - environment: - TEST_EXIT_CODE: "{{ zuul_success | lower }}" - - - name: Check whether a logs folder exists - stat: - path: "{{ ansible_user_dir }}/src/{{ current_test_repo }}/logs" - get_attributes: no - get_checksum: no - get_mime: no - register: logs_folder - - - name: Copy logs back to the executor - synchronize: - src: "{{ ansible_user_dir }}/src/{{ current_test_repo }}/logs" - dest: "{{ zuul.executor.log_root }}/" - mode: pull - rsync_opts: - - "--quiet" - when: - - logs_folder.stat is defined - - logs_folder.stat.exists | bool diff --git a/zuul.d/playbooks/pre-gate-cleanup.yml b/zuul.d/playbooks/pre-gate-cleanup.yml deleted file mode 100644 index 2209ae87..00000000 --- a/zuul.d/playbooks/pre-gate-cleanup.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -# Copyright 2020, VEXXHOST, Inc. -# -# 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: Cleanup gate images - hosts: all - become: yes - become_user: root - tasks: - - name: Switch apt source from https to http - replace: - path: /etc/apt/sources.list - regexp: 'https' - replace: "http" - when: - - ansible_facts['distribution_release'] in ['focal', 'jammy'] - - - name: Remove package blacklist for dnf - lineinfile: - dest: '/etc/dnf/dnf.conf' - regexp: "^exclude=" - state: absent - when: ansible_pkg_mgr == 'dnf' - diff --git a/zuul.d/playbooks/run.yml b/zuul.d/playbooks/run.yml deleted file mode 100644 index db614b49..00000000 --- a/zuul.d/playbooks/run.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -# Copyright 2017, Rackspace US, Inc. -# -# 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. - -- hosts: all - tasks: - - name: Set current test repo (cross-repo) - set_fact: - current_test_repo: "opendev.org/{{ osa_test_repo }}" - when: - - osa_test_repo is defined - - - name: Set current test repo (non-cross-repo) - set_fact: - current_test_repo: "{{ zuul.project.canonical_name }}" - when: - - osa_test_repo is not defined - - - name: Run testing script - shell: | - ./run_tests.sh {{ tox_env }} - args: - executable: "/bin/bash" - chdir: "{{ ansible_user_dir }}/src/{{ current_test_repo }}" - environment: - TESTING_BRANCH: "{{ testing_branch | default('') }}" - SERVICES_BRANCH: "{{ services_branch | default('') }}" diff --git a/zuul.d/project-templates.yaml b/zuul.d/project-templates.yaml deleted file mode 100644 index ecd5a94e..00000000 --- a/zuul.d/project-templates.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- project-template: - name: openstack-ansible-linters - check: - jobs: - - openstack-ansible-linters - gate: - jobs: - - openstack-ansible-linters - -- project-template: - name: openstack-ansible-role-jobs - check: - jobs: - - openstack-ansible-functional-centos-9-stream - - openstack-ansible-functional-ubuntu-jammy - gate: - jobs: - - openstack-ansible-functional-ubuntu-jammy diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml deleted file mode 100644 index 8a35db8b..00000000 --- a/zuul.d/project.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Copyright 2017, Rackspace US, Inc. -# -# 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. - -- project: - templates: - - openstack-ansible-linters - - openstack-ansible-role-jobs - - check-requirements - - publish-openstack-docs-pti - - build-release-notes-jobs-python3