diff --git a/.ansible-lint b/.ansible-lint deleted file mode 100644 index 4d9515e0d..000000000 --- a/.ansible-lint +++ /dev/null @@ -1,15 +0,0 @@ ---- -exclude_paths: - - roles/validate-ui/.travis.yml - - roles/oooci-build-images/tasks/main.yaml # the role 'discover-latest-image' was not found -parseable: true -quiet: false -skip_list: - - empty-string-compare # https://github.com/ansible/ansible-lint/issues/457 - - role-name # Role name run-test does not match ``^[a-z][a-z0-9_]+$`` pattern - - risky-file-permissions # File permissions unset or incorrect - - package-latest - - document-start -verbosity: 1 -mock_modules: - - zuul_return diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 2f48b5eeb..000000000 --- a/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -tripleo-jobs.db -tripleo-jobs.html -tripleo-jobs.html-table -*.swp -*~ -scripts/website/out_html/ -scripts/website/reviewday/ -scripts/website/tripleo-ci/ -scripts/website/tripleo-docs/ -scripts/website/tripleosphinx/ -scripts/website/planet-2.0/ -scripts/website/planet.html.tmplc - -.eggs/ -.tox/ -.coverage -.pytest_cache/ -__pycache__/ -scripts/emit_releases_file/assets/ -*.pyc -scripts/emit_releases_file/htmlcov/ -scripts/emit_releases_file/pytest-report.html -tripleo_ci.egg-info/ -.cache diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index a49f62d06..000000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -repos: - - repo: https://github.com/python/black.git - rev: 22.10.0 - hooks: - - id: black - language_version: python3 - - repo: https://github.com/pycqa/flake8.git - rev: 5.0.4 - hooks: - - id: flake8 - additional_dependencies: - - flake8-black>=0.1.1 - language_version: python3 - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 - hooks: - - id: end-of-file-fixer - - id: trailing-whitespace - - id: mixed-line-ending - - id: check-byte-order-marker - - id: check-executables-have-shebangs - - id: check-merge-conflict - - id: debug-statements - - id: check-yaml - files: .*\.(yaml|yml)$ - - repo: https://github.com/pycqa/flake8 - rev: '5.0.4' - hooks: - - id: flake8 - - repo: https://github.com/ansible/ansible-lint.git - rev: v6.16.0 - hooks: - - id: ansible-lint - always_run: true - pass_filenames: false - additional_dependencies: - - ansible-core - - yamllint - - repo: https://github.com/openstack-dev/bashate.git - rev: 2.1.1 - hooks: - - id: bashate - entry: bashate --error . --ignore=E006,E040 - # Run bashate check for all bash scripts - # Ignores the following rules: - # E006: Line longer than 79 columns (as many scripts use jinja - # templating, this is very difficult) - # E040: Syntax error determined using `bash -n` (as many scripts - # use jinja templating, this will often fail and the syntax - # error will be discovered in execution anyway) diff --git a/.yamllint b/.yamllint deleted file mode 100644 index 69b4b4159..000000000 --- a/.yamllint +++ /dev/null @@ -1,6 +0,0 @@ ---- -extends: default - -rules: - line-length: - max: 180 diff --git a/README.rst b/README.rst index 21f43391a..4ee2c5f13 100644 --- a/README.rst +++ b/README.rst @@ -1,188 +1,10 @@ -toci -==== +This project is no longer maintained. -Description ------------ +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". -TripleO CI test framework. - -Tools to help run CI jobs for TripleO. Includes things like: - -* Shell scripts to help execute jobs on CI slave nodes (Jenkins slaves) -* A test environment broker framework which uses a client-server - model to execute jobs on a remote bare metal machine in an isolated - test environment (using VMs). -* Image elements to help build images for the test environment - broker nodes. -* Heat templates to help deploy and maintain test environment nodes - using an undercloud. -* Helper script(s) to generate CI status reports. (tox -ecireport -- -f) -* Helper `getthelogs` script to download important job logs locally. - Then you may want to inspect the logs for known errors and contribute - discovered search patterns as the - `elastic-recheck queries `_. - - -OpenStack Infrastructure is deploying multiple jobs with different scenarios. -OpenStack services are balanced between different scenarios because OpenStack -Infastructure Jenkins slaves can not afford the load of running everything on -the same node. - -Usage Details -------------- - -On March 2017, the ansible quickstart framework was added to TOCI to gradually -replace the bash scripts that drove the jobs. Part of the original framework has -been changed to allow the new framework to handle jobs, but maintaining -backwards compatibility with the original framework while jobs are being -transitioned - -TOCI entry point -~~~~~~~~~~~~~~~~ - -Upon starting a job, based on the configuration of its layout, zuul will call -devstack-gate, which is needed for the basic nodepool node setup, but will then -pass the control to ``toci_gate_test.sh``. -During the transition, this will be a symbolic link to -``toci_gate_test-oooq.sh``. - -Quickstart Transition scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The initial part of ``toci_gate_test-oooq.sh`` script decides whether to exec -the original workflow or continue with the quickstart workflow, based on the job -type passed down by zuul layout parameters. To move a job to the new quickstart -framework, it is enough to propose a change to zuul layout to add a "featureset" -keyword on its type. -When using the quickstart workflow, the rest of the script will assemble a set of -arguments to pass to quickstart scripts, based on the components of the job type -separated by dashes e.g. a job type value of "periodic-ovb-featureset001" -will make the script assemble arguments to deal with "ovb" provisioning, -and set featurset001 to be the test matrix for the job. -This script will also invoke the test environment broker to create the proper -ovb environment. -At the end the ``toci_gate_test-oooq.sh`` will pass control to -``toci_quickstart.sh`` script that will actually call quickstart with its -parameters. - -Quickstart Framework -~~~~~~~~~~~~~~~~~~~~ - - ``toci_quickstart.sh`` consists of three parts, setup, invocationo and logs - collection. - -For more information about feature sets and test matrix please see - -.. _Featureset Documentation: https://docs.openstack.org/developer/tripleo-quickstart/feature-configuration.html - -from quickstart documentation -The new workflow uses the directory toci-quickstart/ to store TripleO ci specific -configurations, roles or playbooks for the quickstart workflow -The parts of quickstart under scripts/ are instead handled by the original -framework only - -Original Framework -~~~~~~~~~~~~~~~~~~ - -Job parameters are configured in ``toci_gate_test-orig.sh``. Control passes to -one of the ``toci_instack_*.sh`` scripts (depending on the type of job being -run) which do environment-specific setup. These scripts then call -``scripts/deploy.sh`` to run the actual deployment steps. For most things, -``deploy.sh`` simply calls ``scripts/tripleo.sh`` with the appropriate -parameters. - -In ascii art, the flow of the scripts would look like: - -toci_gate_test -> toci_instack_* -> deploy.sh -> tripleo.sh - -There's some additional complexity that this description glosses over, but -for the most part only tripleo-ci admins need to worry about it. - -temprevert, cherry-pick, pin -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -There are three functions available in tripleo-ci which can be used to alter -the git repos of non-tripleo projects that are used in tripleo-ci. They only -work on projects that are part of OpenStack. Use of these should -be avoided whenever possible as any changes made during a ci run will not -apply to regular users of TripleO. However, they can be useful for determining -which commit broke something, and in rare cases we may want to use them -until a project can sort out a problem itself. - -To apply one of these functions during a ci run, add it to the appropriate -location in the ``toci_instack_*.sh`` script. There should be a comment that -says "Tempreverts/cherry-picks/pins go here." - -.. note:: Do not include the bug number in the commit message where you - propose adding one of these functions. Any change whose commit - message includes a reference to the bug will not apply the function. - This is to allow testing of patches intended to fix the bug. - -.. warning:: As of this writing, these functions all apply against the latest - master branch of the project in question. They do not respect - the current-tripleo repo versions. - -* temprevert - - Revert a commit from a project. Takes 3 parameters: project, commit id, - and bug number. Example:: - - temprevert neutron 2ad9c679ed8718633732da1e97307f9fd9647dcc 1654032 - -* pin - - Pin to a commit from a project. This usually is not necessary now that our - repos are gated by the promotion jobs. Takes 3 parameters: project, - commit id, and bug number. Example:: - - pin neutron 2ad9c679ed8718633732da1e97307f9fd9647dcc 1654032 - -* cherrypick - - Cherry-pick an active review from a project. Takes 3 parameters: project, - Gerrit refspec, and bug number. The Gerrit refspec can be found under the - download button of the change in question. Example:: - - cherrypick neutron refs/changes/49/317949/28 1654032 - -Service testing matrix ----------------------- - -The CI testing matrix for all scenarios is defined in -`tripleo-heat-templates `_. -This matrix describes the services that will run in each environment. - -Feature testing matrix ----------------------- - -======================== ===== == ======= -Feature nonha ha updates ------------------------- ----- -- ------- -undercloud ssl X -overcloud ssl X -ceph X X -ipv4 net-iso X -ipv6 net-iso X -pacemaker X X -predictable placement X -introspection X -======================== ===== == ======= - -How to deprecate job? ---------------------- - -1. Move the job definition to zuul.d/deprecated-jobs.yaml -2. Change the parent job to 'tripleo-ci-deprecated' -3. Change the branches var value to 'none/deprecated' -4. Remove job usage from the project-templates and from projects. - -Documentation -------------- - -Please refer to the official `TripleO documentation -`_ -for details regarding TripleO CI. - -Please refer to the official `TripleO Quickstart documentation -`_ -for details regarding the tools used in TripleO CI. +For any further questions, please email +openstack-discuss@lists.openstack.org or join #openstack-dev on +OFTC. diff --git a/bindep.txt b/bindep.txt deleted file mode 100644 index 3d90e93cb..000000000 --- a/bindep.txt +++ /dev/null @@ -1,5 +0,0 @@ -# This is a cross-platform list tracking distribution packages needed by tests; -# see http://docs.openstack.org/infra/bindep/ for additional information. - -libssl-dev [platform:dpkg] -openssl-devel [platform:redhat] diff --git a/conftest.py b/conftest.py deleted file mode 100644 index 037585c98..000000000 --- a/conftest.py +++ /dev/null @@ -1 +0,0 @@ -pytest_plugins = ['pytest_html'] diff --git a/constraints.txt b/constraints.txt deleted file mode 100644 index 0faf81560..000000000 --- a/constraints.txt +++ /dev/null @@ -1,265 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.9 -# To update, run: -# -# pip-compile --output-file=constraints.txt --pip-args='-chttps://releases.openstack.org/constraints/upper/master' requirements.txt setup.py test-requirements.txt -# -ansi2html==1.6.0 - # via - # -r test-requirements.txt - # molecule -ansible==2.9.23 - # via -r test-requirements.txt -ansible-lint==5.0.12 - # via molecule -appdirs==1.4.4 - # via virtualenv -arrow==1.1.0 - # via jinja2-time -attrs==21.2.0 - # via pytest -bcrypt==3.2.0 - # via paramiko -binaryornot==0.4.4 - # via cookiecutter -bracex==2.1.1 - # via wcmatch -cerberus==1.3.2 - # via molecule -certifi==2021.5.30 - # via requests -cffi==1.14.5 - # via - # bcrypt - # cryptography - # pynacl -cfgv==3.3.0 - # via pre-commit -chardet==4.0.0 - # via - # binaryornot - # requests -click==8.0.1 - # via - # click-help-colors - # cookiecutter - # molecule -click-help-colors==0.9 - # via molecule -colorama==0.4.4 - # via - # -r requirements.txt - # rich - # tripleo-ci (setup.py) -commonmark==0.9.1 - # via rich -cookiecutter==1.7.3 - # via molecule -coverage==5.5 - # via pytest-cov -cryptography==3.4.7 - # via - # ansible - # paramiko -distlib==0.3.2 - # via virtualenv -docker==5.0.0 - # via molecule-docker -enrich==1.2.6 - # via - # ansible-lint - # molecule -execnet==1.9.0 - # via pytest-xdist -filelock==3.0.12 - # via virtualenv -greenlet==1.1.0 - # via sqlalchemy -identify==2.2.10 - # via pre-commit -idna==2.10 - # via requests -iniconfig==1.1.1 - # via pytest -jenkinsapi==0.3.11 - # via - # -r requirements.txt - # tripleo-ci (setup.py) -jinja2==3.0.1 - # via - # ansible - # cookiecutter - # jinja2-time - # molecule -jinja2-time==0.2.0 - # via cookiecutter -markupsafe==2.0.1 - # via jinja2 -molecule[test]==3.3.4 - # via - # -r test-requirements.txt - # molecule-containers - # molecule-docker - # molecule-podman - # pytest-molecule -molecule-containers==0.2.1 - # via -r test-requirements.txt -molecule-docker==0.2.4 - # via - # -r test-requirements.txt - # molecule-containers -molecule-podman==0.3.0 - # via - # -r test-requirements.txt - # molecule-containers -more-itertools==8.8.0 - # via pytest-plus -nodeenv==1.6.0 - # via pre-commit -packaging==20.9 - # via - # ansible-lint - # molecule - # pytest -paramiko==2.7.2 - # via - # -r test-requirements.txt - # molecule -pbr==5.6.0 - # via - # -r requirements.txt - # tripleo-ci (setup.py) -pexpect==4.8.0 - # via molecule -pluggy==0.13.1 - # via - # molecule - # pytest -poyo==0.5.0 - # via cookiecutter -pre-commit==2.13.0 - # via -r test-requirements.txt -ptyprocess==0.7.0 - # via pexpect -py==1.10.0 - # via - # pytest - # pytest-forked -pycparser==2.20 - # via cffi -pygments==2.9.0 - # via rich -pynacl==1.4.0 - # via paramiko -pyparsing==2.4.7 - # via packaging -pytest==6.2.4 - # via - # -r test-requirements.txt - # molecule - # pytest-cov - # pytest-forked - # pytest-helpers-namespace - # pytest-html - # pytest-metadata - # pytest-mock - # pytest-plus - # pytest-testinfra - # pytest-verbose-parametrize - # pytest-xdist -pytest-cov==2.12.1 - # via - # -r test-requirements.txt - # molecule -pytest-forked==1.3.0 - # via pytest-xdist -pytest-helpers-namespace==2021.4.29 - # via molecule -pytest-html==3.1.1 - # via - # -r test-requirements.txt - # molecule - # pytest-molecule -pytest-metadata==1.11.0 - # via pytest-html -pytest-mock==3.6.1 - # via molecule -pytest-molecule==1.3.4 - # via -r test-requirements.txt -pytest-plus==0.2 - # via - # -r test-requirements.txt - # molecule -pytest-testinfra==6.4.0 - # via molecule -pytest-verbose-parametrize==1.7.0 - # via molecule -pytest-xdist==2.3.0 - # via - # -r test-requirements.txt - # molecule -python-dateutil==2.8.1 - # via arrow -python-slugify==5.0.2 - # via cookiecutter -pytz==2021.1 - # via jenkinsapi -pyyaml==5.4.1 - # via - # -r test-requirements.txt - # ansible - # ansible-lint - # molecule - # molecule-containers - # pre-commit -requests==2.25.1 - # via - # -r test-requirements.txt - # cookiecutter - # docker - # jenkinsapi -rich==10.4.0 - # via - # ansible-lint - # enrich - # molecule -ruamel.yaml==0.17.10 - # via ansible-lint -ruamel.yaml.clib==0.2.2 - # via ruamel.yaml -six==1.16.0 - # via - # bcrypt - # cookiecutter - # jenkinsapi - # pynacl - # pytest-verbose-parametrize - # python-dateutil - # tenacity - # virtualenv -sqlalchemy==1.4.19 - # via - # -r requirements.txt - # tripleo-ci (setup.py) -subprocess-tee==0.3.2 - # via molecule -tenacity==7.0.0 - # via ansible-lint -text-unidecode==1.3 - # via python-slugify -toml==0.10.2 - # via - # pre-commit - # pytest - # pytest-cov -urllib3==1.26.5 - # via requests -virtualenv==20.4.7 - # via pre-commit -wcmatch==8.2 - # via ansible-lint -websocket-client==1.1.0 - # via docker - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/docs/tripleo-quickstart-logs.html b/docs/tripleo-quickstart-logs.html deleted file mode 100644 index b89b78d17..000000000 --- a/docs/tripleo-quickstart-logs.html +++ /dev/null @@ -1,242 +0,0 @@ - - - -README for Quickstart Logs - - - -

Links to important log files

-
    -
  • undercloud/var/log/extra/errors.txt.gz -- the concatenation of all the errors on any node in a single file
  • -
  • undercloud/home/zuul/ -- the source and log output of all templated shell scripts
  • -
  • undercloud/var/log/ - -directories and files copied from /var/log on the undercloud. -If other overcloud/subnodes exist, similar $node/var/log -directories will also exist in these logs.
  • -
  • undercloud/var/log/extra/ - -Available on each node, extra system details like package list, and cpu info gathered from the -undercloud
  • -
  • /var/log/messages is captured in the journal files in /var/log/extras on each node -
  • -
  • undercloud/var/lib/mistral -- output of all ansible used by config-download to drive the overcloud deployment
  • -
-

Links yum repo and rpm info

- -

Links container log files

- -

Links to tempest results

- -

Links to puppet logs

- - -

SELinux Alerts

- - - - -
-

Please refer to the recreation - instructions -

-
- - -
-

- Note: These logs are only available in jobs that use OVB. -

- - -
- -

Check the base directory for a file called *failure_reason* for -automatic failure detection. If no known error has been found the file will -be named "No_failure_reason_found". - -

Most of the undercloud and overcloud deployment log files can -be found in undercloud/home/zuul - -tracebacks and other errors are collected in the following log per node: -

- -

Next check the console log and search for PLAY RECAP. There are sometimes -multiple ansible runs in a job, usually the last one is the relevant. -
If no PLAY RECAP text is found that usually means an infra failure -before Quickstart could even start. -
-If this is a different Ansible error, that could mean either an infra -problem (often has UNREACHABLE in the line) or a bug in Quickstart. -

- -

-Ask on #tripleo to get help or open a bug on -Launchpad. Add the -"ci" tag if it's a CI issue and "quickstart" if you suspect that the bug is in -Quickstart itself.

- -Finally try rechecking or asking on #tripleo -

-
- - -
-

The logs contain files showing variables used in the job run.

- -
- - -
-

Upstream OpenStack Health, Elastic Search and Kibana -

- - -

Tools that will help you spot a trend in TripleO CI -

- -

-Tools to compare one job to another. -

    -
  • jcomparison -- A tool to compare results from one job to another
  • -
  • log reduce -- A tool that uses AI features to reduce the noise in logs and present only what is needed for debug
  • -
-

-
- - - - -
-

As a debugging step, a job can be run manually with '-dryrun' -appended to the job name. When the "playbook dry run" option is invoked, -the playbooks will not execute and collect logs will not run but -certain log files, including 'toci_env_args_output.log', which -contains the environment variables used in the job, and -playbook_executions.log will still be produced in the logs -directory for inspection. This option serves to assist with -debugging and to test the testing scripts themselves.

-
- - - - diff --git a/docs/wanted_ci_jobs.csv b/docs/wanted_ci_jobs.csv deleted file mode 100644 index e92cd765c..000000000 --- a/docs/wanted_ci_jobs.csv +++ /dev/null @@ -1,5 +0,0 @@ -Job Name ,Pacemaker ,Reboot ,Upgrade ,NetIso V4 ,NetIso V6 ,Ceph Scale ,Swift Scale ,Block Scale ,External Ceph ,Ceph on Compute ,Cinder/RBD ,Nova/RBD ,Glance/RBD ,Cinder/NFS ,Glance/NFS ,Glance/Swift ,External LB ,Compute containers ,Public Endpoint TLS ,Internal services TLS -centos-7-updates ,x , ,x , ,x ,x , , , , ,x ,x ,x , , , , , , , -centos-7-ha ,x ,o , ,x , , , , , , , , , , , ,x , , , , -centos-7-nonha , , , , , ,x , , , ,o ,x ,x ,x , , , , , ,x , -centos-7-containers , , , , , , , , , , , , , , , ,x , ,x , , diff --git a/playbooks/deprecated/README.rst b/playbooks/deprecated/README.rst deleted file mode 100644 index 15865ee3d..000000000 --- a/playbooks/deprecated/README.rst +++ /dev/null @@ -1,2 +0,0 @@ -This playbook prints a deprecation warning message to inform -that the job is no longer supported and should not be in use. diff --git a/playbooks/deprecated/pre.yaml b/playbooks/deprecated/pre.yaml deleted file mode 100644 index 67d7d72e1..000000000 --- a/playbooks/deprecated/pre.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- name: Deprecation warning - hosts: all - gather_facts: false - tasks: - - name: Warn that the job is deprecated - debug: - msg: | - -------------------------------------------------------- - D E P R E C A T E D J O B W A R N I N G - -------------------------------------------------------- - This job is deprecated and is no longer supported. - Please DO NOT use this job in your Zuul config. - - Refer to #tripleo irc channel on OFTC for more info. diff --git a/playbooks/nodepool-provider/README.rst b/playbooks/nodepool-provider/README.rst deleted file mode 100644 index 144f16aff..000000000 --- a/playbooks/nodepool-provider/README.rst +++ /dev/null @@ -1,2 +0,0 @@ -This playbook writes a backwards compatible /etc/nodepool/provider file for -legacy jobs running on Zuul v3 which no longer provides that file. diff --git a/playbooks/nodepool-provider/pre.yaml b/playbooks/nodepool-provider/pre.yaml deleted file mode 100644 index 093333983..000000000 --- a/playbooks/nodepool-provider/pre.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -- name: Configure /etc/nodepool/provider for backwards compatibility - hosts: all - gather_facts: false - tasks: - - name: Warn that /etc/nodepool/provider is deprecated - debug: - msg: | - The /etc/nodepool/provider file no longer exists and is being created - for backwards compatibility purposes. The variables provided by this - file are now available through Ansible under hostvars[$HOST]['nodepool']. - - - name: Create /etc/nodepool it if does not exist - become: true - file: - path: /etc/nodepool - state: directory - mode: '0777' - - - name: Create /etc/nodepool/provider file - copy: - content: | - NODEPOOL_PROVIDER={{ nodepool.provider }} - NODEPOOL_CLOUD={{ nodepool.cloud }} - NODEPOOL_REGION={{ nodepool.region }} - NODEPOOL_AZ={{ nodepool.az }} - dest: /etc/nodepool/provider diff --git a/playbooks/openstack-zuul-jobs/legacy/pre.yaml b/playbooks/openstack-zuul-jobs/legacy/pre.yaml deleted file mode 100644 index 39aa32bf5..000000000 --- a/playbooks/openstack-zuul-jobs/legacy/pre.yaml +++ /dev/null @@ -1,83 +0,0 @@ ---- -- hosts: all - gather_facts: false - tasks: - - name: Set IP addresses for the nodes missing private IPs - set_fact: - nodepool_ip: "{{ nodepool.public_ipv4 }}" - when: not (nodepool.private_ipv4 | ipv4) - - - name: Set IP addresses for the nodes without private IPs (a fallback) - set_fact: - nodepool_ip: "{{ nodepool.private_ipv4 | default(nodepool.public_ipv4) }}" - when: nodepool_ip is not defined - -- hosts: all - tasks: - - name: Create nodepool directory - file: - path: /etc/nodepool - state: directory - - - name: Create nodepool sub_nodes file - copy: - dest: /etc/nodepool/sub_nodes - content: "" - - - name: Create nodepool sub_nodes_private file - copy: - dest: /etc/nodepool/sub_nodes_private - content: "" - - - name: Populate nodepool sub_nodes file - lineinfile: - path: /etc/nodepool/sub_nodes - line: "{{ hostvars[item]['nodepool']['public_ipv4'] }}" - with_items: "{{ groups['subnodes'] }}" - when: groups['subnodes'] is defined - - - name: Populate nodepool sub_nodes_private file - lineinfile: - path: /etc/nodepool/sub_nodes_private - line: "{{ hostvars[item]['nodepool_ip'] }}" - insertafter: EOF - with_items: "{{ groups['subnodes'] }}" - when: groups['subnodes'] is defined - - - name: Create nodepool primary file - copy: - dest: /etc/nodepool/primary_node_private - content: "{{ hostvars['primary']['nodepool_ip'] }}" - when: hostvars['primary'] is defined - - - name: Create nodepool node_private for this node - copy: - dest: /etc/nodepool/node_private - content: "{{ nodepool_ip }}" - - - name: Copy ssh keys to nodepool directory - command: "cp .ssh/{{ item }} /etc/nodepool/{{ item }}" - with_items: - - id_rsa - - id_rsa.pub - changed_when: true - - - name: Add sudoers role for zuul-sudo-grep.sh - copy: - dest: /etc/sudoers.d/zuul-sudo-grep - content: "zuul ALL = NOPASSWD:/usr/local/jenkins/slave_scripts/zuul-sudo-grep.sh\n" - mode: 0440 - become: true - - - name: Validate sudoers config after edits - command: "/usr/sbin/visudo -c" - become: true - changed_when: false - - - name: Show the environment passed in to job shell scripts - command: env - args: - executable: /bin/bash - warn: false - environment: '{{ zuul | zuul_legacy_vars }}' - changed_when: false diff --git a/playbooks/tripleo-buildcontainers/docker.yaml b/playbooks/tripleo-buildcontainers/docker.yaml deleted file mode 100644 index 637913022..000000000 --- a/playbooks/tripleo-buildcontainers/docker.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- hosts: all - tasks: - - name: Configure docker proxy - include_role: - name: use-docker-mirror - tasks_from: mirror - - - name: Set fact of docker upstream - set_fact: - use_upstream_docker: false - - - name: Install docker - include_role: - name: ensure-docker diff --git a/playbooks/tripleo-buildcontainers/post.yaml b/playbooks/tripleo-buildcontainers/post.yaml deleted file mode 100644 index f942aa58f..000000000 --- a/playbooks/tripleo-buildcontainers/post.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- hosts: primary - tasks: - - name: Run build containers post tasks - include_role: - name: build-containers - tasks_from: post diff --git a/playbooks/tripleo-buildcontainers/pre.yaml b/playbooks/tripleo-buildcontainers/pre.yaml deleted file mode 100644 index c9888df8c..000000000 --- a/playbooks/tripleo-buildcontainers/pre.yaml +++ /dev/null @@ -1,70 +0,0 @@ ---- -- hosts: all - name: TripleO Setup Container Registry and repos mirror - tasks: - - - name: Disable EPEL repos with dnf if exists - command: dnf config-manager --set-disabled "epel*" - become: true - changed_when: true - failed_when: false - when: - - ansible_pkg_mgr == "dnf" - - - name: Disable EPEL repos with yum if exists - command: yum-config-manager --disable "epel*" - become: true - changed_when: true - failed_when: false - when: - - ansible_pkg_mgr == "yum" - - - name: Container Build for 7 specific distros - when: ansible_distribution_major_version is version(7, '==') - block: - - name: Include tripleo-repos - include_role: - name: tripleo-repos - vars: - override_repos: "{{ buildcontainers_override_repos | default('') }}" - tripleo_repos_repository: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-repos'].src_dir }}" - - # TODO: Move this setting to tripleo-repos yum module - - name: Enable supported container tools version - become: true - shell: | - {{ ansible_pkg_mgr }} module disable container-tools:rhel8 -y; - {{ ansible_pkg_mgr }} module enable container-tools:3.0 -y; - {{ ansible_pkg_mgr }} clean metadata - when: ansible_distribution_major_version is version(8, '==') - - # workaround for LP #1950916 - - name: Check if /etc/yum.repos.d/CentOS-Stream-AppStream.repo exists - stat: - path: /etc/yum.repos.d/CentOS-Stream-AppStream.repo - register: stat_appstream - - - name: Exclude libvirt/qemu from AppStream repo - become: true - lineinfile: - dest: /etc/yum.repos.d/CentOS-Stream-AppStream.repo - line: "exclude=libvirt*,python*libvirt*,qemu*" - when: - - stat_appstream.stat.exists - - release is defined and release in ['master', 'wallaby'] - - - name: Include bindep role - include_role: - name: bindep - vars: - bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/python-tripleoclient'].src_dir }}" - - - name: Setup repos using repo-setup role and release file - when: ansible_distribution_major_version is version(8, '>=') - include_role: - name: tripleo-build-jobs-repos - - - name: Run build containers pre tasks - include_role: - name: build-containers - tasks_from: pre diff --git a/playbooks/tripleo-buildcontainers/run.yaml b/playbooks/tripleo-buildcontainers/run.yaml deleted file mode 100644 index cbf4fb539..000000000 --- a/playbooks/tripleo-buildcontainers/run.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -- hosts: all - name: TripleO container image building job - tasks: - - - name: Re-run repo-setup and build for c8 and c9 (pickup mirrors set in pre) - when: ansible_distribution_major_version is version('8', '>=') - block: - - name: Load vars from release file and set facts needed for repo-setup - include_role: - name: tripleo-build-jobs-repos - tasks_from: load-vars - - name: Run repo-setup again to pickup c9 mirrors - include_role: - name: repo-setup - vars: - repo_setup_dir: "{{ workspace }}" - repo_setup_use_collections: false - - name: "build containers C8 and C9 for hash: {{ buildcontainers_version_hash }}" - include_role: - name: build-containers - vars: - buildcontainers_version_hash: "{{ dlrn_hash|default(omit) }}" - - - name: Run build containers tasks - include_role: - name: build-containers - when: ansible_distribution_major_version is version('7', '==') - - - name: Fail job if it's configured - fail: - msg: >- - Job has finished successfully, but forced to fail by force_job_failure variable - when: force_job_failure|default(false)|bool diff --git a/playbooks/tripleo-buildimages/post.yaml b/playbooks/tripleo-buildimages/post.yaml deleted file mode 100644 index 1f8619d20..000000000 --- a/playbooks/tripleo-buildimages/post.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- hosts: primary - tasks: - - name: Run build-images role post tasks (collect logs) - include_role: - name: oooci-build-images - tasks_from: post diff --git a/playbooks/tripleo-buildimages/pre.yaml b/playbooks/tripleo-buildimages/pre.yaml deleted file mode 100644 index 4230891c1..000000000 --- a/playbooks/tripleo-buildimages/pre.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- hosts: all - name: TripleO image building job pre.yaml - tasks: - - - name: Disable EPEL repos with dnf if exists - command: dnf config-manager --set-disabled "epel*" - become: true - changed_when: true - failed_when: false - when: - - ansible_pkg_mgr == "dnf" - - - name: Disable EPEL repos with yum if exists - command: yum-config-manager --disable "epel*" - become: true - changed_when: true - failed_when: false - when: - - ansible_pkg_mgr == "yum" - - - name: Setup repos using repo-setup role and release file - when: ansible_distribution_major_version is version(8, '>=') - include_role: - name: tripleo-build-jobs-repos - - - name: Include tripleo-repos - when: ansible_distribution_major_version is version(8, '<') - include_role: - name: tripleo-repos - vars: - override_repos: "{{ build_override_repos | default('') }}" - tripleo_repos_repository: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-repos'].src_dir }}" - - - name: Include bindep role - include_role: - name: bindep - vars: - bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/python-tripleoclient'].src_dir }}" - - - name: Import pre tasks from build-images role - include_role: - name: oooci-build-images - tasks_from: pre diff --git a/playbooks/tripleo-buildimages/run-v3.yaml b/playbooks/tripleo-buildimages/run-v3.yaml deleted file mode 100644 index 260f43b83..000000000 --- a/playbooks/tripleo-buildimages/run-v3.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- hosts: all - tasks: - - name: Re-run the repo-setup role for c8 and c9 (after rdo mirror setup in pre) - when: ansible_distribution_major_version is version('8', '>=') - block: - - name: Load vars from release file and set facts needed for repo-setup - include_role: - name: tripleo-build-jobs-repos - tasks_from: load-vars - - name: Run repo-setup again to pickup c9 mirrors - include_role: - name: repo-setup - vars: - repo_setup_dir: "{{ workspace }}" - repo_setup_use_collections: false - - - name: Run image build using the build-images role - include_role: - name: oooci-build-images - - - name: Fail job if it's configured - fail: - msg: >- - Job has finished successfully, but forced to fail by force_job_failure variable - when: force_job_failure | default(false) | bool diff --git a/playbooks/tripleo-buildimages/tmpfiles.yaml b/playbooks/tripleo-buildimages/tmpfiles.yaml deleted file mode 100644 index d26f1e7ba..000000000 --- a/playbooks/tripleo-buildimages/tmpfiles.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- hosts: all - tasks: - - name: remove removal of tmp files - become: true - lineinfile: - path: /usr/lib/tmpfiles.d/tmp.conf - regex: "(10|30)d" - state: absent diff --git a/playbooks/tripleo-ci/centos-compose-repos.yml b/playbooks/tripleo-ci/centos-compose-repos.yml deleted file mode 100644 index 0101f2b02..000000000 --- a/playbooks/tripleo-ci/centos-compose-repos.yml +++ /dev/null @@ -1,92 +0,0 @@ ---- -- hosts: all - vars: - workspace: "{{ ansible_user_dir }}" - tripleo_repos_repository: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-repos'].src_dir }}" - default_compose_url: >- - {%- if (ansible_distribution_major_version is version('8','==')) -%} - https://composes.centos.org/latest-CentOS-Stream-8/compose/ - {%- else -%} - https://odcs.stream.centos.org/production/latest-CentOS-Stream/compose/ - {%- endif -%} - compose_url: >- - {{ - centos_compose_url | - default(job.centos_compose_url) | - default(default_compose_url) - }} - rpm_packages: - - dnf-utils - - git - - python3-libselinux - - python3-pip - - python3-setuptools - - tasks: - - when: (job.dependency is defined and job.dependency == "centos-compose") or - (dependency is defined and dependency == "centos-compose") - block: - - name: Install system packages - become: true - package: - name: "{{ rpm_packages }}" - state: present - - - name: Include dependency-related vars - include_vars: >- - {{ zuul.executor.work_root }}/{{ - zuul.projects[ - 'opendev.org/openstack/tripleo-quickstart' - ].src_dir - }}/config/release/dependency_ci/{{ dependency }}/repo_config.yaml - - - name: Install tripleo-repos - vars: - ansible_python_interpreter: /usr/bin/python3 - become: true - pip: - name: "{{ tripleo_repos_repository }}" - virtualenv: "{{ workspace }}/venv" - # https://github.com/ansible/ansible/issues/52275 - virtualenv_command: "{{ ansible_python_interpreter }} -m venv" - virtualenv_site_packages: true - - - name: Configure repos for CentOS Compose job - become: true - shell: | - set -exo pipefail - source {{ workspace }}/venv/bin/activate - # Populate CentOS compose repos - tripleo-yum-config enable-compose-repos \ - --disable-all-conflicting \ - --release centos-stream-{{ ansible_distribution_major_version }} \ - --compose-url {{ compose_url }} \ - --variants \ - AppStream BaseOS HighAvailability \ - {% if ansible_distribution_major_version is version("8", "==") -%} - PowerTools \ - {% else -%} - CRB \ - {% endif -%} - --disable-repos quickstart-centos-appstreams.repo quickstart-centos-base.repo \ - quickstart-centos-highavailability.repo \ - {% if ansible_distribution_major_version is version("8", "==") -%} - quickstart-centos-powertools.repo - {% else -%} - quickstart-centos-crb.repo - {% endif -%} - register: result - - - name: Rebuild package database - become: true - command: rpm --rebuilddb - - - name: Print out the stdout of result - debug: - msg: "{{ result }}" - - - name: Update all installed packages after new repos are setup # noqa package-latest - become: true - package: - name: '*' - state: latest diff --git a/playbooks/tripleo-ci/ceph.yaml b/playbooks/tripleo-ci/ceph.yaml deleted file mode 100644 index 25749baff..000000000 --- a/playbooks/tripleo-ci/ceph.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- hosts: subnodes - name: Bootstrap subnodes - setup ceph-ansible /dev/loop3 /var/lib/ceph-osd.img - tasks: - - include_role: - name: ceph-loop-device diff --git a/playbooks/tripleo-ci/install-built-repo.yml b/playbooks/tripleo-ci/install-built-repo.yml deleted file mode 100644 index d1bfe232c..000000000 --- a/playbooks/tripleo-ci/install-built-repo.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -- hosts: all - vars: - gating_repo_loop_input: "{{ dict(registry_ip_address_branch|default({})) }}" - tasks: - - when: registry_ip_address_branch is defined - block: - - name: override gating_repo_loop_input if we have distro.keys - when: - - registry_ip_address_distro is defined - - registry_ip_address_distro.keys() | length > 1 - set_fact: - gating_repo_loop_input: "{{ dict(registry_ip_address_distro) }}" - - # Check if we have built something in content provider. - # If we did - create a gating-repo pointing to content provider. The - # port 8766 will be opened. - # If we didn't build, port 8766 will be closed - skip gating-repo creating. - - name: Check if we have a repo - wait_for: - timeout: 2 - port: 8766 - host: '{{ gating_repo_loop_input[item.key] }}' - register: waitfor - ignore_errors: true - loop: '{{ gating_repo_loop_input | dict2items }}' - - # create the gating repo for any branch defined in - # registry_ip_address_branch. - # Allow the release config to appropriately enable the gating repo - # for the branch in use. - # related-review: https://review.opendev.org/ 763747 - # LP: https://launchpad.net/bugs/1907122 - - name: Create a repo if got registry IP from Zuul - become: true - when: - - server is not failed - copy: - dest: /etc/yum.repos.d/gating-repo-{{ server.item.key }}.repo - content: | - [gating-repo-{{ server.item.key }}] - name=Gating repository - baseurl=http://{{ server.item.value }}:8766/ - enabled=1 - gpgcheck=0 - priority=1 - loop: "{{ waitfor.results }}" - loop_control: - loop_var: server diff --git a/playbooks/tripleo-ci/post.yaml b/playbooks/tripleo-ci/post.yaml deleted file mode 100644 index adc9074eb..000000000 --- a/playbooks/tripleo-ci/post.yaml +++ /dev/null @@ -1,138 +0,0 @@ ---- -- name: Return Zuul artifacts - hosts: primary - roles: - - tripleo-ci-post - -- name: Write console log to localhost as fact zuul_console_json - hosts: localhost - tasks: - - name: capture console log json as fact - set_fact: - zuul_console_json: "{{ lookup('file', zuul.executor.log_root + '/job-output.json') }}" - -- name: Generate build report for the container build - hosts: primary - tasks: - - name: "Create log directory" - file: - path: "{{ ansible_user_dir }}/workspace/logs" - state: directory - recurse: true - - - name: Build report (content provider) - include_role: - name: build-containers - tasks_from: build-report - when: - - ansible_distribution_major_version is version('8', '>=') - - provider_job | default(false) | bool - - - name: Check that the report.html exists - stat: - path: "{{ ansible_user_dir }}/workspace/logs/report.html" - register: stat_report_result - - - name: Return report.html artifact to Zuul - zuul_return: - data: - zuul: - artifacts: - - name: "Build report" - url: "logs/report.html" - metadata: - type: build_report - when: stat_report_result.stat.exists - -- name: Collect logs - hosts: primary - tasks: - - name: set collection timeout - set_fact: - collect_timeout_sec: "{{ zuul.post_timeout|default(3600) - copy_logs_time|default(300) }}" - - - name: Copy zuul_console_json log to workspace for reproducer - copy: - content: "{{ hostvars['localhost'].zuul_console_json }}" - dest: "{{ ansible_user_dir }}/workspace/logs/zuul_console.json" - - - name: Check for artifacts created by a previous collect_logs - stat: - path: "{{ ansible_user_dir }}/workspace/logs/undercloud" - register: undercloud_logs - - # Collect logs in ovb needs to run before te broker deletes the overcloud nodes. - # if a timeout happens, collect logs will not run, overcloud nodes will get deleted - # and we'll not even get undercloud logs - # Check if we have and undercloud dir in logs. If not, launch collect logs. - # TODO(gcerami) find a way to run collect logs before te broker deletes the env in - # case of timeout. - - name: Remark of collect logs running before post in ovb - debug: - msg: "OVB job collect logs already run, not running collect_logs in post" - when: environment_type == "ovb" and undercloud_logs.stat.exists - - - name: Run ansible playbook to collect logs for ovb jobs that weren't able to run collect logs - shell: | - if [[ -e {{ ansible_user_dir }}/workspace/logs/collect_logs.sh ]]; then - bash {{ ansible_user_dir }}/workspace/logs/collect_logs.sh - mv {{ ansible_user_dir }}/workspace/logs/collect_logs.sh {{ ansible_user_dir }}/workspace/logs/ovb_collect_logs.sh - fi - when: environment_type == "ovb" and not undercloud_logs.stat.exists - - - name: Check script existence - stat: - path: "{{ ansible_user_dir }}/workspace/logs/collect_logs.sh" - register: collect_logs_path - - - name: Collect logs with a timeout - block: - - name: Run ansible playbook to collect logs - command: | - timeout --preserve-status -s 15 \ - -k {{ [collect_timeout_sec|int, 60]|sum|string }} {{ collect_timeout_sec|string }} \ - bash {{ ansible_user_dir }}/workspace/logs/collect_logs.sh - when: collect_logs_path.stat.exists - register: collect_logs_run - - rescue: - - name: warn when collect logs timed out (SIGTERM or SIGKILL used) - debug: - msg: "ERROR: Collect logs timed out" - when: collect_logs_path.stat.exists and (collect_logs_run.rc == 143 or collect_logs_run.rc == 137) - - - name: warn when collect logs failed - debug: - msg: "ERROR: Collect logs failed, please check the logs" - when: collect_logs_path.stat.exists and collect_logs_run.rc != 143 and collect_logs_run.rc != 137 - - always: - - name: Ensure artifacts directory exists - file: - path: '{{ zuul.executor.work_root }}/artifacts' - state: directory - delegate_to: localhost - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - no_log: true - failed_when: false - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - name: Fail job when logs collection fail and it's critical - fail: - msg: "ERROR: Collect logs failed and job is configured to fail!" - when: - - collect_logs_path.stat.exists - - collect_logs_run.rc != 0 - - fail_logs_collection|default(false)|bool - - zuul.pipeline|default('') != 'gate' diff --git a/playbooks/tripleo-ci/pre.yaml b/playbooks/tripleo-ci/pre.yaml deleted file mode 100644 index 2001e1d91..000000000 --- a/playbooks/tripleo-ci/pre.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- hosts: all - name: Common tasks for nodes preparation - roles: - - role: ci-common-vars - - role: prepare-node diff --git a/playbooks/tripleo-ci/run-provider.yml b/playbooks/tripleo-ci/run-provider.yml deleted file mode 100644 index b1169d686..000000000 --- a/playbooks/tripleo-ci/run-provider.yml +++ /dev/null @@ -1,72 +0,0 @@ ---- -- hosts: all - tasks: - - - name: Collect only facts of network - setup: - gather_subset: - - network - - - name: Discover an IPv4 for provider job - set_fact: - provider_ip: >- - {{ hostvars[groups.all[0]].ansible_host if hostvars[groups.all[0]].ansible_host - is match("[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+") - else hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }} - - - name: Discover the content-provider branch and set ci_branch - include_role: - name: build-containers - tasks_from: set_ci_branch.yml - - - name: Combine override_repos with ci_branch variable - set_fact: - ci_branch: "{{ ci_branch + '-' + override_repos }}" - when: override_repos != '' - - - name: Set branch variables - set_fact: - provider_job_branch: "{{ ci_branch }}" - registry_ip_address_branch: "{'{{ ci_branch }}': '{{ provider_ip }}'}" - registry_ip_address_distro: "{'{{ ansible_distribution_major_version }}': '{{ provider_ip }}'}" - - - name: Check if DLRN tag was dumped in /tmp/container_build_id - stat: - path: /tmp/container_build_id - register: build_id - - - name: Recover DLRN tag - when: build_id.stat.exists - block: - - - name: Load file - slurp: - src: /tmp/container_build_id - register: dlrn_file - - - name: Set fact for DLRN tag - set_fact: - provider_dlrn_hash_branch: "{'{{ ci_branch }}': '{{ dlrn_file['content'] | b64decode | trim }}'}" - provider_dlrn_hash_tag_branch: "{'{{ ci_branch }}': '{{ dlrn_file['content'] | b64decode | trim }}'}" - provider_dlrn_hash_distro: "{'{{ ansible_distribution_major_version }}': '{{ dlrn_file['content'] | b64decode | trim }}'}" - - - name: Return Zuul data - debug: - msg: >- - Running podman registry and repository on - {{ provider_ip | default('nowhere') }} - for branch {{ ci_branch }} and DLRN tag {{ dlrn_hash|default('no tag') }} - - - name: Set registry IP address - zuul_return: - data: - zuul: - pause: true - provider_dlrn_hash_branch: "{{ provider_dlrn_hash_branch|default('') }}" - provider_dlrn_hash_tag_branch: "{{ provider_dlrn_hash_tag_branch|default('') }}" - provider_job_branch: "{{ provider_job_branch }}" - registry_ip_address_branch: "{{ registry_ip_address_branch }}" - registry_ip_address_distro: "{{ registry_ip_address_distro }}" - provider_dlrn_hash_distro: "{{ provider_dlrn_hash_distro|default('') }}" - tags: - - skip_ansible_lint diff --git a/playbooks/tripleo-ci/run-v3.yaml b/playbooks/tripleo-ci/run-v3.yaml deleted file mode 100644 index a492a0fe0..000000000 --- a/playbooks/tripleo-ci/run-v3.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- hosts: - - primary - roles: - - role: ci-common-vars - - role: run-test diff --git a/playbooks/tripleo-ci/run.yaml b/playbooks/tripleo-ci/run.yaml deleted file mode 100644 index 72947dc98..000000000 --- a/playbooks/tripleo-ci/run.yaml +++ /dev/null @@ -1,70 +0,0 @@ ---- -- hosts: - - primary - - centos-7 - name: Autoconverted job from tripleo legacy jobs - tasks: - - - name: Ensure legacy workspace directory - file: - path: '{{ ansible_user_dir }}/workspace' - state: directory - - - name: zuul-cloner - shell: - cmd: | - set -e - set -x - cat > clonemap.yaml << EOF - clonemap: - - name: openstack-infra/devstack-gate - dest: devstack-gate - EOF - /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ - https://opendev.org \ - openstack/devstack-gate - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - changed_when: true - - - name: run safe-devstack-vm-gate-wrap.sh - shell: - cmd: | - set -e - set -x - export TOCI_JOBTYPE={{ toci_jobtype }} - export DISTRIBUTION={{ ansible_distribution }} - export DISTRIBUTION_MAJOR_VERSION={{ ansible_distribution_major_version }} - - # ZUUL does not set these for periodic jobs - export ZUUL_BRANCH=${ZUUL_BRANCH:-master} - export ZUUL_REF=${ZUUL_REF:-None} - - # Compatibility with zuul v3 variables - export JOB_NAME={{ zuul.job }} - export LOG_PATH={{ zuul.change[-2:] }}/{{ zuul.change }}/{{ zuul.patchset }}/{{ zuul.pipeline }}/{{ zuul.job }}/{{ zuul.build[:7] }} - - export BRANCH_OVERRIDE="{{ branch_override | default('default') }}" - if [ "$BRANCH_OVERRIDE" != "default" ] ; then - export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE - fi - - export PYTHONUNBUFFERED=true - export DEVSTACK_GATE_TEMPEST=0 - export DEVSTACK_GATE_HORIZON=1 - export PROJECTS="openstack/tripleo-quickstart $PROJECTS" - export PROJECTS="openstack/tripleo-quickstart-extras $PROJECTS" - export PROJECTS="openstack/tripleo-upgrade $PROJECTS" - - sudo chown -hR $(whoami) /opt/git - function gate_hook { - bash -xe /opt/stack/new/tripleo-ci/toci_gate_test.sh - } - export -f gate_hook - cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh - ./safe-devstack-vm-gate-wrap.sh - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - changed_when: true diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 0097e9f6e..000000000 --- a/pyproject.toml +++ /dev/null @@ -1,2 +0,0 @@ -[tool.black] -skip-string-normalization = true diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 5c70c5f25..000000000 --- a/pytest.ini +++ /dev/null @@ -1,4 +0,0 @@ -[pytest] -markers: - hookwrapper - optionalhook diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index b1b2522ee..000000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -pbr -# required to run scripts/tripleo-jobs.py -sqlalchemy -jenkinsapi -colorama diff --git a/requirements.yml b/requirements.yml deleted file mode 100644 index 4bd4ea05c..000000000 --- a/requirements.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -collections: - - name: community.general # molecule uses 'ini_file' - - name: ansible.posix diff --git a/roles/build-containers/defaults/main.yaml b/roles/build-containers/defaults/main.yaml deleted file mode 100644 index 0511d3fb8..000000000 --- a/roles/build-containers/defaults/main.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -push_registry_port: 8787 -push_registry: "127.0.0.1:{{ push_registry_port }}" -push_containers: "false" -kolla_base: "{{ ansible_distribution|lower }}" -kolla_base_image: "{{ kolla_base }}" -# DO NOT define a default for kolla_base_tag, -# this is here to notify of its availability as a parameter -# Kolla sets the default kolla tag on its own based on dstro -# and setting a different default breaks other distro dependent -# default (like the package manager) -# kolla_base_tag: latest -kolla_base_pull: true -use_buildah: false -buildcontainers_override_repos: "" -buildcontainers_rpm_setup_config: "http://{{ ansible_default_ipv4.address }}/delorean.repo,http://{{ ansible_default_ipv4.address }}/delorean-{{ ci_branch }}-testing.repo" -buildcontainers_venv: true -openstack_repo_name: delorean -container_cli_opt: "" -# component_ci_containers used by component-ci jobs to build e.g. nova only -# used together with component_ci_configs in vars/main -component_ci_containers: "" -openstack_git_root: "{{ ansible_user_dir }}/src/opendev.org/openstack" -# container prefix is generally centos for usptream and rhel for downstream -container_name_prefix: >- - {% if osp_branch is not defined and ci_branch in ['train'] -%} - {{ ansible_distribution|lower }}-binary - {%- else -%} - openstack - {%- endif -%} -# In order to use custom auth file for pushing containers to registry -# --authfile flag is used. The default auth file is -# /run/containers/0/auth.json, It will be auto -# generated on doing sudo buildah login -u -p -# --authfile registry url -# buildcontainers_authfile_path: '/run/containers/0/auth.json' -registry_namespace: >- - {% if osp_branch is defined -%} - tripleo{{ osp_branch }} - {%- else -%} - tripleo{{ ci_branch }} - {%- endif -%} -container_registry_image: quay.io/tripleoci/registry:2 -provider_registry_port: 5001 -container_exclude_distro: "{{ ansible_distribution|lower }}{{ ansible_distribution_major_version}}" -# Extra config needs to be passed to tcib tool -# https://docs.openstack.org/tripleo-ansible/latest/roles/role-tripleo_container_image_build.html#r-o-l-e-d-e-f-a-u-l-t-s -tcib_extra_config: - tcib_args: - TRIPLEO_ANSIBLE_REQ: /usr/share/openstack-tripleo-common-containers/container-images/kolla/tripleo-ansible-ee/requirements.yaml diff --git a/roles/build-containers/files/build-report.py b/roles/build-containers/files/build-report.py deleted file mode 100644 index ac114cf16..000000000 --- a/roles/build-containers/files/build-report.py +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2020 Red Hat 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 glob -import pytest -import subprocess - - -def _get_build_log(image): - """ - Retrieve the inidividual log filename for a given image - e.g. ./logs/container-builds/**/-build.log - """ - # compose the log filename - log = f"{ image }-build.log" - # glob search in ./logs/container-builds/**/-build.log - logfile = f"./{ pytest.logs_dir }/{ pytest.build_dir }/**/{ log }" - for f in glob.glob(logfile, recursive=True): - # return only first match - return f - # log not found, return glob string - return logfile - - -def test_container_is_built(image): - """ - Test if container image is built - """ - # image in skip list, skip the build check - if image in pytest.excluded_containers: - pytest.skip("container image excluded: {}".format(image)) - - # [TEST 1]: check if image exists - cmd = ['podman', 'images', image] - proc = subprocess.run( - cmd, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE - ) - # buildah images should return 0 and image should be in stdout - assert image in proc.stdout and proc.returncode == 0, proc.stderr - print(proc.stdout) - - # [TEST 2]: check if build log has errors - try: - # read log file - with open(_get_build_log(image), 'r') as build_log: - log = build_log.read() - # test if any error is found in the log - assert 'Error:' not in log, f"Image failed to build: { image }" - except IOError as err: - print(f"Warning: Build log not found: { err }") - - # [TEST N+1]: additional tests can be added here diff --git a/roles/build-containers/files/conftest.py b/roles/build-containers/files/conftest.py deleted file mode 100644 index e4ab5d6b1..000000000 --- a/roles/build-containers/files/conftest.py +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 2020 Red Hat 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 glob -import pytest -from py.xml import html - -BUILD_DIR = 'container-builds' -LOGS_DIR = 'logs' -EXCLUDE_CONTAINERS = 'containers-excluded.log' - - -def _get_build_link(funcargs): - """ - Retrieves the link of the build log for a given container - """ - # compose logfile to glob search - log = f"{ funcargs.get('image') }-build.log" - logfile = f"./{ LOGS_DIR }/{ BUILD_DIR }/**/{ log }" - for f in glob.glob(logfile, recursive=True): - # remove parent 'logs/' dir from the path - # link will be like ./container-builds/**/-build.log - link = "./" + "/".join(f.split("/")[2:]) - # return first log file as href link - return html.a(log, href=link) - # log file not found - return "" - - -def _get_excluded_containers_list(): - """ - Retrieves the list of excluded images to skip the build - """ - try: - with open(EXCLUDE_CONTAINERS) as f: - excluded_containers_list = [line.strip() for line in f] - except IOError: - excluded_containers_list = [] - return excluded_containers_list - - -def pytest_addoption(parser): - parser.addoption( - "--image", - action="append", - default=[], - help="list of container images to pass to test functions", - ) - - -def pytest_generate_tests(metafunc): - if "image" in metafunc.fixturenames: - metafunc.parametrize("image", metafunc.config.getoption("image")) - - -def pytest_configure(): - # these vars are visible from build-report.py functions - pytest.excluded_containers = _get_excluded_containers_list() - pytest.build_dir = BUILD_DIR - pytest.logs_dir = LOGS_DIR - - -@pytest.mark.optionalhook -def pytest_html_results_table_header(cells): - # this replaces the default 'Links' column in position #3 - cells.insert(3, html.th('Build Log')) - cells.pop() - - -@pytest.mark.optionalhook -def pytest_html_results_table_row(report, cells): - if hasattr(report, 'build_log'): - # report.logs has the link of each build log - cells.insert(3, html.td(report.build_log)) - - -@pytest.mark.hookwrapper -def pytest_runtest_makereport(item, call): - outcome = yield - report = outcome.get_result() - # get the link for a given image build log - report.build_log = _get_build_link(item.funcargs) diff --git a/roles/build-containers/tasks/build-report.yaml b/roles/build-containers/tasks/build-report.yaml deleted file mode 100644 index 4fa8c5e49..000000000 --- a/roles/build-containers/tasks/build-report.yaml +++ /dev/null @@ -1,100 +0,0 @@ ---- -- name: Container build report - block: - - - name: Move container-builds dir to workspace/logs - shell: "mv {{ ansible_user_dir }}/container-* ./logs/" - become: true - args: - chdir: "{{ workspace }}" - failed_when: false - - - name: Set ci_branch for building containers check jobs - include_tasks: set_ci_branch.yml - - - name: Set branch - set_fact: - branch: "{{ osp_branch | default(ci_branch) }}" - - - name: fetch tripleo_containers.yaml into ansible controller - fetch: - src: "{{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common/container-images/tripleo_containers.yaml" - dest: "{{ zuul.executor.work_root }}/" - flat: true - - - name: Load list of containers expected to build - include_vars: - file: "{{ zuul.executor.work_root }}/tripleo_containers.yaml" - - - name: build list of expected images w/ prefix - set_fact: - expected_images: "{{ expected_images|default([]) + [item['imagename'].split(':')[0].split('/')[2]] }}" - when: item['image_source'] == "tripleo" - with_items: "{{ container_images }}" - - - name: remove prefix from expected containers list - vars: - prefix: "{{ container_name_prefix }}-" - set_fact: - expected_containers: "{{ expected_containers|default([]) + [item | replace(prefix, '')] }}" - with_items: "{{ expected_images }}" - - - name: Get list of excluded containers - shell: | - set -eux - echo {{ item }} >> {{ workspace }}/containers-excluded.log - with_items: "{{ exclude_containers[branch][container_exclude_distro] }}" - when: exclude_containers is defined and branch in exclude_containers - - - name: Write containers-expected.log - lineinfile: - line: "{{ item }}" - path: "{{ workspace }}/containers-expected.log" - create: true - state: present - with_items: "{{ expected_containers }}" - - - name: Get actual built containers - shell: | - set -eux - {{ container_cli | default('buildah') }} images | grep {{ container_name_prefix }} \ - | tee {{ workspace }}/containers-built.log - become: true - - - name: Copy build-report files - copy: - src: "files/{{ item }}" - dest: "{{ workspace }}" - with_items: - - build-report.py - - conftest.py - - - name: construct images args - set_fact: - images_args: "{{ images_args | default('') + ' --image ' + item }}" - with_items: "{{ expected_containers }}" - - - name: Install pytest - pip: - name: "{{ item }}" - virtualenv: "{{ workspace }}/venv_build" - virtualenv_command: '{{ ensure_pip_virtualenv_command }}' - with_items: - - pytest - - pytest-html - - - name: install podman - become: true - package: - name: podman - state: present - - - name: Execute build-report - shell: | - source "venv_build/bin/activate" - pytest --html=logs/report.html --self-contained-html {{ images_args }} build-report.py - args: - chdir: "{{ workspace }}" - become: true - - ignore_errors: true diff --git a/roles/build-containers/tasks/main.yaml b/roles/build-containers/tasks/main.yaml deleted file mode 100644 index 60608bf41..000000000 --- a/roles/build-containers/tasks/main.yaml +++ /dev/null @@ -1,307 +0,0 @@ ---- -- name: Ensure logs directory exists - file: - path: '{{ workspace }}/logs' - state: directory - -- name: Set ci_branch for building containers check jobs - include_tasks: set_ci_branch.yml - -- name: Set facts for kolla-build.conf - set_fact: - push_registry: "{{ push_registry | default('127.0.0.1:8787') }}" - push_containers: "{{ push_containers | default(false) | bool }}" - container_config: "" - -- name: Set arch_tag fact - set_fact: - # NOTE(mjturek): Push old style tag for x86_64 first to maintain compatibility. - arch_tag: "{{ '_' + ansible_architecture if ansible_architecture != 'x86_64' else ''}}" - -- name: Check the contents of the openstack_repo_name repo - become: true - shell: > - set -o pipefail && - cat /etc/yum.repos.d/{{ openstack_repo_name }}.repo |grep -o 'baseurl=' |wc -l - register: number_baseurl_lines - when: buildcontainers_version_hash is not defined - -- name: Use baseurl if there is only one - when: - - buildcontainers_version_hash is not defined - - number_baseurl_lines.stdout|int == 1 - block: - - name: Get contents of openstack repo baseurl for the version hash - become: true - shell: > - set -o pipefail && - cat /etc/yum.repos.d/{{ openstack_repo_name }}.repo |awk -F= '/baseurl/ {print $2}' - register: baseurl - - - name: Set version_hash fact - set_fact: - version_hash: "{{ baseurl.stdout.split('/')[-1] }}" - -- name: Use the md5sum if there is more than one baseurl line - when: - - buildcontainers_version_hash is not defined - - number_baseurl_lines.stdout|int > 1 - block: - - name: Get contents of openstack repo baseurl for the version hash - become: true - shell: md5sum /etc/yum.repos.d/{{ openstack_repo_name }}.repo | awk '{print $1}' - register: md5sum_repo - - - name: Set version_hash fact - set_fact: - version_hash: "{{ md5sum_repo.stdout }}" - -- name: Set version_hash fact if buildcontainers_version_hash is defined - set_fact: - version_hash: "{{ buildcontainers_version_hash }}" - when: buildcontainers_version_hash is defined - -# collectd tries to disable epel and epel-modular repository, which doesn't -# exist, and so fail, this is just a dummy repository so the container won't -# fail. -- name: Add dummy epel and epel-module repository - become: true - when: - - ansible_pkg_mgr == "dnf" - - ansible_distribution|lower == "redhat" - yum_repository: - name: "{{ item }}" - description: Dummy epel repository - file: delorean_epel_dummy - baseurl: https://download.fedoraproject.org/pub/epel/$releasever/$basearch/ - enabled: false - with_items: - - epel - - epel-modular - -- name: grab kolla patch rhel8 - when: - - ansible_pkg_mgr == "dnf" - - ansible_distribution|lower == "redhat" - - zuul_internal is undefined - shell: | - set -euxo pipefail - git config --global user.email "zuul@openstack.org" - git config --global user.name "Zuul" - git remote add upstream https://review.opendev.org/openstack/kolla - git ls-remote https://review.opendev.org/openstack/kolla | \ - grep -E refs/changes/[[:digit:]]+/{{ kolla_rhel8_patch[branch_override|default('master')] }}/ | \ - awk '{print $2}' | \ - sort -t / -k 5 -g -r | \ - head -1 | \ - xargs -I{} git fetch https://review.opendev.org/openstack/kolla {} && \ - git checkout -b rhel8 FETCH_HEAD - # Look for Kolla changes running in check queue and if present then - # set the git_rebase branch as kolla change as are already clonned and - # can be grabbed from zuul.ref var otherwise use master. - git_rebase_branch={{ branch_override|default('master') }} - {% if zuul.ref is defined and zuul.ref and zuul.pipeline in ['check', 'openstack-check'] %} - found=$(git ls-remote https://review.opendev.org/openstack/kolla | grep {{ zuul.ref }} || true); - echo $found; - if [[ -n "$found" ]] ; then - git_rebase_branch={{ zuul.ref }} - fi - {% endif %} - git pull --rebase upstream $git_rebase_branch - - args: - chdir: "{{ openstack_git_root }}/kolla" - warn: false - register: result - changed_when: "'nothing to commit, working directory clean' not in result.stdout_lines" - - -- include_tasks: venv_setup.yml - when: buildcontainers_venv is defined and buildcontainers_venv - -- include_tasks: package_setup.yml - when: buildcontainers_venv is defined and not buildcontainers_venv - -# TODO(aschultz): make the kolla-build branch aware -- name: Generate kolla-build.conf - template: - src: templates/kolla-build.conf.j2 - dest: "{{ workspace }}/kolla-build.conf" - mode: 0644 - force: true - -- name: Set container cli - set_fact: - container_cli: "{% if use_buildah|bool %}buildah{% else %}docker{% endif %}" - cacheable: true - -- name: Set --config-file for component-ci if component_ci_containers is specified - set_fact: - container_config: "--config-file {{ component_ci_configs[component_ci_containers] }}" - when: component_ci_containers != "" - -- name: build base rhel container - block: - - name: create docker-build dir - file: - path: /tmp/base-build - state: directory - - - name: create docker-build repos dir - file: - path: /tmp/base-build/repos - state: directory - - - name: Move delorean repos to base build - become: true - shell: - cmd: | - {% if zuul_internal is defined %} - cp /etc/yum.repos.d/* /tmp/base-build/repos/ - {% else %} - cp /etc/yum.repos.d/delorean* /tmp/base-build/repos/ - {% endif %} - chown -R {{ ansible_user }}: /tmp/base-build/repos/* - - - name: render dockerfile zuul_internal - when: zuul_internal is defined - template: - src: templates/Dockerfile_redhat.j2 - dest: /tmp/base-build/Dockerfile - - - name: create base container with repos from rhel container - shell: - cmd: | - set -x - sudo buildah --debug bud -t {{ kolla_base_image }}:{{ kolla_base_tag }} . \ - 2>&1 {{ timestamper_cmd }} > {{ workspace }}/build-rhel-base.log - args: - chdir: /tmp/base-build - when: - - ansible_distribution|lower == "redhat" - - kolla_base_image is defined - - kolla_base_tag is defined - -- name: Make sure authfile exists - when: buildcontainers_authfile_path is defined - block: - - name: Check for authfile - stat: - path: '{{ buildcontainers_authfile_path }}' - register: authfile_exist - - - name: Make sure autfile exists - assert: - that: - - authfile_exist.stat.exists | bool - -- name: Generate tcib extra config file - copy: - dest: "{{ workspace }}/extra_config.yaml" - content: | - {{ tcib_extra_config | to_nice_yaml }} - -- name: Generate kolla building script - template: - src: templates/kolla-build.sh.j2 - dest: "{{ workspace }}/build_containers.sh" - mode: 0777 - force: true - when: use_kolla | default(true) - -- name: Generate tripleo building script - template: - src: templates/tripleo-build.sh.j2 - dest: "{{ workspace }}/build_containers.sh" - mode: 0777 - force: true - when: not use_kolla | default(true) - - -- name: "Run image build as ansible user > {{ workspace }}/logs/build.log" - args: - chdir: '{{ workspace }}' - shell: set -o pipefail && bash build_containers.sh 2>&1 {{ timestamper_cmd }} > {{ workspace }}/logs/build.log - when: - - ansible_distribution|lower != "redhat" - -- name: "Run image build as root > {{ workspace }}/logs/build.log" - args: - chdir: '{{ workspace }}' - shell: set -o pipefail && bash build_containers.sh 2>&1 {{ timestamper_cmd }} > {{ workspace }}/logs/build.log - when: - - ansible_distribution|lower == "redhat" - become: true - -# Workaround for https://bugs.launchpad.net/tripleo/+bug/1916742 as buildah is throwing warnings -- name: Check if "/usr/share/containers/libpod.conf" exists. - become: true - stat: path=/usr/share/containers/libpod.conf - register: libpod_conf_file_stat - -- name: "Move /usr/share/containers/libpod.conf to /usr/share/containers/libpod.conf_backup" - become: true - command: mv /usr/share/containers/libpod.conf /usr/share/containers/libpod.conf_backup - when: libpod_conf_file_stat.stat.exists - -- name: Retrieve built images # noqa risky-shell-pipe - shell: "{{ container_cli }} images | grep {{ container_name_prefix }} | awk '{ print $1 }'" - register: built_images - become: true - changed_when: false - -- name: Retag and push x86_64 images - when: - - ansible_architecture == "x86_64" - - push_containers | bool - - not push_containers_podman | default(false) | bool - block: - - name: Disable HTTPS and certificates to access registry (buildah) - set_fact: - container_cli_opt: '--tls-verify=false' - when: use_buildah | bool - - name: Tag images - vars: - image: "{{ item }}" - include_tasks: tag.yaml - loop: "{{ built_images.stdout_lines }}" - become: true - -- name: Run registry - when: - - job.provider_job|default(false)|bool - block: - - name: Run registry - shell: >- - $(command -v docker || command -v podman) run -d \ - -e REGISTRY_HTTP_ADDR=0.0.0.0:{{ provider_registry_port }} \ - -p {{ provider_registry_port }}:{{ provider_registry_port }} \ - --name registry {{ container_registry_image }} - changed_when: true - rescue: - - name: Run registry (rescue) - shell: >- - $(command -v docker || command -v podman) run -d \ - -e REGISTRY_HTTP_ADDR=0.0.0.0:{{ provider_registry_port }} \ - -p {{ provider_registry_port }}:{{ provider_registry_port }} \ - --name registry quay.rdoproject.org/ceph/registry:2 - changed_when: true - become: true - -- name: Populate provider registry - when: - - job.provider_job|default(false)|bool - block: - - name: Open ports - command: iptables -I INPUT -p tcp --dport 5001 -j ACCEPT - changed_when: true - - name: Disable HTTPS and certificates to access registry (buildah) - set_fact: - container_cli_opt: '--tls-verify=false' - when: use_buildah | bool - - name: Retag and push images to provider registry - vars: - image: "{{ item }}" - include_tasks: provider_push.yaml - loop: "{{ built_images.stdout_lines }}" - become: true diff --git a/roles/build-containers/tasks/package_setup.yml b/roles/build-containers/tasks/package_setup.yml deleted file mode 100644 index fde12c134..000000000 --- a/roles/build-containers/tasks/package_setup.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: Include OS distro version specific variables - include_vars: "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" - -- name: install tripleo dependencies from package - become: true - package: - name: "{{ tripleo_deps_from_package }}" - -- name: set template override - set_fact: - kolla_override_path: "/usr/share/openstack-tripleo-common-containers/container-images/tripleo_kolla_template_overrides.j2" diff --git a/roles/build-containers/tasks/post.yaml b/roles/build-containers/tasks/post.yaml deleted file mode 100644 index c6346a5c0..000000000 --- a/roles/build-containers/tasks/post.yaml +++ /dev/null @@ -1,57 +0,0 @@ ---- -- name: Build report - include: build-report.yaml - when: not use_kolla | default(true) - -- name: Grab job artifacts - become: true - args: - chdir: "{{ workspace }}" - shell: | - set -x - mkdir -p {{ workspace }}/conf/ - mkdir -p {{ workspace }}/logs/system - mkdir -p {{ workspace }}/logs/httpd_data - mkdir -p {{ workspace }}/etc/ansible - mkdir -p {{ workspace }}/etc/docker - mkdir -p {{ workspace }}/etc/httpd - - mv *.conf {{ workspace }}/conf/ - mv {{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common/container-images/*_containers.yaml {{ workspace }}/conf/ - mv *.log {{ workspace }}/logs/ - mv *.html {{ workspace }}/logs/ - mv *.sh {{ workspace }}/logs/ - mv /tmp/kolla-* {{ workspace }}/logs/ || true - rsync -var --no-links /var/log/ {{ workspace }}/logs/system/ || true - rsync -var --no-links /etc/ansible/ {{ workspace }}/etc/ansible/ || true - rsync -var --no-links /etc/docker/ {{ workspace }}/etc/docker/ || true - rsync -var --no-links /etc/httpd/ {{ workspace }}/etc/httpd/ || true - rsync -var --no-links /var/www/html/ {{ workspace }}/logs/httpd_data/ || true - rsync -var --no-links /etc/containers/ {{ workspace }}/etc/containers/ || true - rsync -var --no-links --include 'yum.repos.d/***' --include 'yum.conf' --include 'dnf/***' --exclude='*' /etc/ {{ workspace }}/etc/ || true - - # Collect installed packages - {{ ansible_pkg_mgr }} list installed &>{{ workspace }}/logs/system/installed_pkgs.txt - - # Save some statistics - df -h &>{{ workspace }}/logs/system/disk_usage.txt - - chmod -R a+r "{{ workspace }}" - chown -R {{ ansible_user }}: "{{ workspace }}" - changed_when: true - -- name: Copy files from {{ ansible_user_dir }}/workspace/ on node - no_log: true - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/etc/** - - --include=/conf/** - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff --git a/roles/build-containers/tasks/pre.yaml b/roles/build-containers/tasks/pre.yaml deleted file mode 100644 index 99a9f23bc..000000000 --- a/roles/build-containers/tasks/pre.yaml +++ /dev/null @@ -1,128 +0,0 @@ ---- -- name: Ensure legacy workspace directory - file: - path: '{{ workspace }}' - state: directory - -- name: Setup docker registry - when: - - ansible_distribution|lower != 'redhat' - - ansible_distribution_major_version is version('8', '<') - - buildcontainers_venv | default(true) | bool or setup_docker_registry | default(false) | bool - block: - - name: Set registry_deploy to true only when needed - set_fact: - registry_deploy: true - when: - - push_containers is defined and push_containers | bool - - "'127.0.0.1' in push_registry or push_registry.split(':')[0] in ansible_all_ipv4_addresses" - - - name: Configure docker registry - include_role: - name: ansible-role-container-registry - vars: - container_registry_docker_options: "--log-driver=journald --signature-verification=false --iptables=true --live-restore" - container_registry_port: "{{ push_registry_port | default('8787') }}" - container_registry_deploy_docker_distribution: "{{ registry_deploy | default(false) }}" - container_registry_deployment_user: "{{ ansible_user }}" - - - include_tasks: reset_connection.yaml - when: not use_buildah | default(false) | bool - -- name: Prepare Buildah - become: true - when: use_buildah | default(false) | bool - block: - - name: Install Buildah - package: - name: buildah - state: present - - - name: Configure insecure registry - ini_file: - path: /etc/containers/registries.conf - section: 'registries.insecure' - option: registries - value: - - "localhost:{{ push_registry_port | default('5001') }}" - when: ansible_distribution_major_version is version(8, '==') - - - name: Configure unqualified-search-registries - lineinfile: - path: /etc/containers/registries.conf - regexp: '^unqualified-search-registries' - line: "unqualified-search-registries = ['{{ push_registry }}', - 'registry.access.redhat.com', - 'registry.fedoraproject.org', - 'registry.centos.org', - 'docker.io']" - when: ansible_distribution_major_version is version(9, '==') - -- name: Setup repo web service - become: true - when: ansible_distribution|lower != 'redhat' - block: - - name: Install apache - package: - name: httpd - state: present - - - name: Start apache - service: - name: httpd - state: started - - - name: Check if gating repo was built - stat: - path: /etc/yum.repos.d/gating.repo - register: gating - - - name: Change gating repo for Kolla build - shell: | - cp /etc/yum.repos.d/gating.repo /var/www/html/ - cp -r /opt/gating_repo /var/www/html/ - sed -i "s@baseurl=.*@baseurl=http://{{ ansible_default_ipv4.address }}/gating_repo@g" /var/www/html/gating.repo - when: gating.stat.exists - - - name: Fetch delorean repos if present - shell: | - set -ex - find /etc/yum.repos.d/ -name delorean\* -o -name quickstart-centos\* | xargs -I {} cp {} /var/www/html/ - - # TODO(chandan): Fix No chain/target/match by that name issue for EL9 - - name: Add http iptables rules from containers - command: iptables -I openstack-INPUT 1 -p tcp --dport 80 -s 172.17.0.0/16 -j ACCEPT - become: true - when: ansible_distribution_major_version is version(9, '<') - -- name: Setup tripleo registry - when: - - ansible_distribution|lower != 'redhat' - - ansible_distribution_major_version is version('8', '>=') - - use_buildah | default(false) | bool - block: - - name: Enable ports for httpd - seport: - ports: - - '80' - - "{{ push_registry_port | string }}" - proto: tcp - setype: http_port_t - state: present - - name: Setup Listen on default port for serving repo files - copy: - dest: /etc/httpd/conf.d/repos.conf - content: "Listen 80" - - name: set tripleo image serve role name for train - set_fact: - tripleo_image_serve_role: tripleo-image-serve - when: - (release is defined and release == 'train') - or (branch_override is defined and branch_override == 'stable/train') - or (ci_branch is defined and ci_branch == 'train') - - name: Configure tripleo registry - include_role: - name: "{{ tripleo_image_serve_role | default('tripleo_image_serve') }}" - vars: - tripleo_container_registry_port: "{{ push_registry_port | default('8787') }}" - become: true diff --git a/roles/build-containers/tasks/provider_push.yaml b/roles/build-containers/tasks/provider_push.yaml deleted file mode 100644 index 6414cb979..000000000 --- a/roles/build-containers/tasks/provider_push.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# Tag and push in the same task for the sake of doing less tasks -- name: "Tag for provider registry and push image: {{ image }}" - command: > - {{ cmd }} - with_items: - - "{{ container_cli }} tag {{ image }}:{{ version_hash }} {{ image.replace(push_registry_port|string, '5001') }}:{{ version_hash }}" - - "{{ container_cli }} push {% if use_buildah|bool %}{{ container_cli_opt }}{% endif %} {{ image.replace(push_registry_port|string, '5001') }}:{{ version_hash }}" - loop_control: - loop_var: "cmd" - changed_when: true diff --git a/roles/build-containers/tasks/reset_connection.yaml b/roles/build-containers/tasks/reset_connection.yaml deleted file mode 100644 index 2ffff35e6..000000000 --- a/roles/build-containers/tasks/reset_connection.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- name: Reset connection because of group changes for current user - meta: reset_connection diff --git a/roles/build-containers/tasks/set_ci_branch.yml b/roles/build-containers/tasks/set_ci_branch.yml deleted file mode 100644 index ee40717c9..000000000 --- a/roles/build-containers/tasks/set_ci_branch.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -- name: Set ci_branch from regular Zuul branch - set_fact: - ci_branch: "{{ zuul.branch | regex_replace('(stable|cloudsig)/', '') }}" - when: zuul is defined - -- name: Set ci_branch from branch_override variable - set_fact: - ci_branch: "{{ branch_override | regex_replace('(stable|cloudsig)/', '') }}" - when: branch_override is defined - -- name: Set ci_branch from release variable (in periodic) - set_fact: - ci_branch: "{{ release }}" - when: release is defined - -- name: Set ci_branch for Downstream - set_fact: - ci_branch: "{{ osp_branch }}" - when: osp_branch is defined - -- name: Set override_repos for buildcontainers_override_repos - set_fact: - override_repos: "{{ buildcontainers_override_repos | default('') }}" - -- name: Fail if we did not set ci_branch fact - fail: - msg: >- - Failed to get ci_branch from zuul.branch or branch_override or release - when: ci_branch is not defined diff --git a/roles/build-containers/tasks/tag.yaml b/roles/build-containers/tasks/tag.yaml deleted file mode 100644 index d77fc201f..000000000 --- a/roles/build-containers/tasks/tag.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# Tag and push in the same task for the sake of doing less tasks -- name: "Tag w/ arch suffix and push image: {{ image }}" - command: > - {{ cmd }} - with_items: - - "{{ container_cli }} tag {{ image }}:{{ version_hash }} {{ image }}:{{ version_hash }}_{{ ansible_architecture }}" - - "{{ container_cli }} push {% if use_buildah|bool %}{{ container_cli_opt }}{% endif %} {{ image }}:{{ version_hash }}_{{ ansible_architecture }}" - loop_control: - loop_var: "cmd" - changed_when: true diff --git a/roles/build-containers/tasks/venv_setup.yml b/roles/build-containers/tasks/venv_setup.yml deleted file mode 100644 index dfb335a3d..000000000 --- a/roles/build-containers/tasks/venv_setup.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -- name: Make sure we have pip - include_role: - name: ensure-pip - -- name: Include OS distro version specific variables - include_vars: "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" - -- name: https://bugs.launchpad.net/tripleo/+bug/1862941 install six>=1.14.0 - pip: - name: - - six>=1.14.0 - extra_args: --user - -- name: Ensure a recent version of pip is installed - pip: - name: "pip>=19.1.1" - virtualenv: "{{ workspace }}/venv_build" - virtualenv_command: "{{ ensure_pip_virtualenv_command }}" - virtualenv_site_packages: true - -- name: Install deps from upper-constraints - when: zuul_internal is undefined - pip: - extra_args: "-c {{ openstack_git_root }}/requirements/upper-constraints.txt" - requirements: "{{ openstack_git_root }}/{{ item }}/requirements.txt" - virtualenv: "{{ workspace }}/venv_build" - virtualenv_command: "{{ ensure_pip_virtualenv_command }}" - virtualenv_site_packages: true - with_items: "{{ upper_constraints_items }}" - -- name: Install deps from requirements - when: zuul_internal is defined - pip: - requirements: "{{ openstack_git_root }}/{{ item }}/requirements.txt" - virtualenv: "{{ workspace }}/venv_build" - virtualenv_command: "{{ ensure_pip_virtualenv_command }}" - virtualenv_site_packages: true - with_items: "{{ requirements_items }}" - -- name: Installation from source - pip: - name: "{{ source_items }}" - virtualenv: "{{ workspace }}/venv_build" - virtualenv_command: "{{ ensure_pip_virtualenv_command }}" - virtualenv_site_packages: true - -- name: set template override - set_fact: - kolla_override_path: >- - {% if zuul_internal is defined -%} - "{{ openstack_git_root }}/openstack-tripleo-common/container-images/tripleo_kolla_template_overrides.j2" - {% else -%} - "{{ openstack_git_root }}/tripleo-common/container-images/tripleo_kolla_template_overrides.j2" - {% endif %} diff --git a/roles/build-containers/templates/Dockerfile_redhat.j2 b/roles/build-containers/templates/Dockerfile_redhat.j2 deleted file mode 100644 index 8ea04854a..000000000 --- a/roles/build-containers/templates/Dockerfile_redhat.j2 +++ /dev/null @@ -1,4 +0,0 @@ -FROM {{ base_ubi_image }}:{{ base_ubi_tag }} -RUN rm -f /etc/yum.repos.d/delorean* -COPY repos/* /etc/yum.repos.d/. -RUN dnf clean all diff --git a/roles/build-containers/templates/component_ci/compute_overcloud_containers.yaml b/roles/build-containers/templates/component_ci/compute_overcloud_containers.yaml deleted file mode 100644 index 07b84ba18..000000000 --- a/roles/build-containers/templates/component_ci/compute_overcloud_containers.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -container_images: - - imagename: docker.io/tripleomaster/centos-binary-nova-api:current-tripleo - image_source: kolla - - imagename: docker.io/tripleomaster/centos-binary-nova-compute-ironic:current-tripleo - image_source: kolla - - imagename: docker.io/tripleomaster/centos-binary-nova-compute:current-tripleo - image_source: kolla - - imagename: docker.io/tripleomaster/centos-binary-nova-conductor:current-tripleo - image_source: kolla - - imagename: docker.io/tripleomaster/centos-binary-nova-libvirt:current-tripleo - image_source: kolla - - imagename: docker.io/tripleomaster/centos-binary-nova-novncproxy:current-tripleo - image_source: kolla - - imagename: docker.io/tripleomaster/centos-binary-nova-scheduler:current-tripleo - image_source: kolla - - imagename: docker.io/tripleomaster/centos-binary-nova-serialproxy:current-tripleo - image_source: kolla - - imagename: docker.io/tripleomaster/centos-binary-novajoin-notifier:current-tripleo - image_source: kolla - - imagename: docker.io/tripleomaster/centos-binary-novajoin-server:current-tripleo - image_source: kolla diff --git a/roles/build-containers/templates/component_ci/keystone_overcloud_containers.yaml b/roles/build-containers/templates/component_ci/keystone_overcloud_containers.yaml deleted file mode 100644 index 406fe6e0c..000000000 --- a/roles/build-containers/templates/component_ci/keystone_overcloud_containers.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -container_images: - - imagename: docker.io/tripleomaster/centos-binary-keystone:current-tripleo - image_source: kolla diff --git a/roles/build-containers/templates/kolla-build.conf.j2 b/roles/build-containers/templates/kolla-build.conf.j2 deleted file mode 100644 index 98313ecfe..000000000 --- a/roles/build-containers/templates/kolla-build.conf.j2 +++ /dev/null @@ -1,16 +0,0 @@ -[DEFAULT] -base={{ kolla_base }} -base_image={{ kolla_base_image }} -{% if kolla_base_tag is defined %} -base_tag={{ kolla_base_tag }} -{% endif %} -type=binary -registry={{ push_registry }} -tag={{ version_hash }}{{ arch_tag }} -template_override={{ kolla_override_path }} -# we use the repos off the main host as they will already have the correct mirror info in them -rpm_setup_config="{{ buildcontainers_rpm_setup_config }}" -push={{ push_containers }} -pull={{ kolla_base_pull }} -namespace={{ registry_namespace }} -debug=True diff --git a/roles/build-containers/templates/kolla-build.sh.j2 b/roles/build-containers/templates/kolla-build.sh.j2 deleted file mode 100644 index d2b092db8..000000000 --- a/roles/build-containers/templates/kolla-build.sh.j2 +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -eux -{% if buildcontainers_venv is defined and buildcontainers_venv %} -source {{ workspace }}/venv_build/bin/activate -pip install -U decorator -TRIPLEO_COMMON_PATH="{{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common" -{% else %} -TRIPLEO_COMMON_PATH="/usr/share/openstack-tripleo-common" -{% endif %} -TRIPLEO_CI_PATH="{{ ansible_user_dir }}/src/opendev.org/openstack/tripleo-ci" - -### build -openstack overcloud container image build {{ container_config }}\ - {% if ci_branch in exclude_containers %} - {% for item in exclude_containers[ci_branch][container_exclude_distro] %} - --exclude {{ item }} \ - {% endfor %} - {% endif %} - {% if use_buildah is defined and use_buildah %} - --use-buildah \ - {% endif %} - --work-dir {{ ansible_user_dir }}/container-builds \ - {% if build_timeout is defined %} - --build-timeout {{ build_timeout }} \ - {% endif %} - --kolla-config-file {{ workspace }}/kolla-build.conf - -### grep errors in all build logs -sudo egrep "^Error:|No match" /tmp/kolla-*/docker -R > containers-build-errors.log 2>&1 || true -sudo egrep "^Error:|No match" /tmp/container-builds/*/docker -R >> containers-build-errors.log 2>&1 || true diff --git a/roles/build-containers/templates/tripleo-build.sh.j2 b/roles/build-containers/templates/tripleo-build.sh.j2 deleted file mode 100644 index ec32166ee..000000000 --- a/roles/build-containers/templates/tripleo-build.sh.j2 +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -eux - -{% if buildcontainers_venv is defined and buildcontainers_venv %} -source {{ workspace }}/venv_build/bin/activate -pip install -U decorator -TRIPLEO_COMMON_PATH="{{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common" -{% else %} -TRIPLEO_COMMON_PATH="/usr/share/openstack-tripleo-common" -{% endif %} -TRIPLEO_CI_PATH="{{ ansible_user_dir }}/src/opendev.org/openstack/tripleo-ci" - -export TRIPLEO_CI_USR_PATH="${VIRTUAL_ENV:-/usr}" -export TRIPLEO_ANSIBLE_WORKPATH="${TRIPLEO_CI_USR_PATH}/share/ansible" -export ANSIBLE_ACTION_PLUGINS="${TRIPLEO_ANSIBLE_WORKPATH}/plugins/action" -export ANSIBLE_CALLBACK_PLUGINS="${TRIPLEO_ANSIBLE_WORKPATH}/plugins/callback" -export ANSIBLE_FILTER_PLUGINS="${TRIPLEO_ANSIBLE_WORKPATH}/plugins/filter" -export ANSIBLE_LIBRARY="${TRIPLEO_ANSIBLE_WORKPATH}/plugins/modules" -export ANSIBLE_MODULE_UTILS="${TRIPLEO_ANSIBLE_WORKPATH}/plugins/module_utils" -export ANSIBLE_ROLES_PATH="${TRIPLEO_ANSIBLE_WORKPATH}/roles" -export ROLE_REPOS="tripleo-common ansible/roles" - -echo "print exported variables" -set | grep -i TRIPLEO -set | grep -i ANSIBLE - -echo "list files in ansible role path, ${TRIPLEO_ANSIBLE_WORKPATH}/roles" -ls -la "${TRIPLEO_ANSIBLE_WORKPATH}/roles" - -# Ensure that the roles from tripleo-common and tripleo-ansible installed -# from the venv are available in the roles path -# The tripleo-common role path can be found here: -# https://opendev.org/openstack/tripleo-common/src/branch/master/tripleo_common/actions/ansible.py -for ROLE_REPO in $ROLE_REPOS; do - if [[ "${TRIPLEO_CI_USR_PATH}" != '/usr' && -d "${TRIPLEO_CI_USR_PATH}/share/${ROLE_REPO}" ]]; then - # Check if the target directory exists and is not a symlink - if [[ -d "/usr/share/${ROLE_REPO}" && ! -L "/usr/share/${ROLE_REPO}" ]]; then - echo "Creating a backup of /usr/share/${ROLE_REPO}.bak" - sudo mv /usr/share/${ROLE_REPO} /usr/share/${ROLE_REPO}.bak - fi - # Link our venv'd ${ROLE_REPO} files into the root path. - echo -e "Linking ${TRIPLEO_CI_USR_PATH}/share/${ROLE_REPO} to /usr/share/${ROLE_REPO}" - sudo ln -sf ${TRIPLEO_CI_USR_PATH}/share/${ROLE_REPO} /usr/share/${ROLE_REPO} - fi -done - -### build -openstack tripleo container image build \ -{% if push_containers|bool %} - --push \ -{% endif %} -{% if buildcontainers_authfile_path is defined %} - --authfile {{ buildcontainers_authfile_path }} \ -{% endif %} -{% if distro is defined %} - --distro {{ distro }} \ -{% endif %} -{% if registry_namespace is defined %} - --namespace {{ registry_namespace }} \ -{% endif%} -{% if push_registry is defined %} - --registry {{ push_registry }} \ -{% endif %} -{% if rhel_modules is defined %} - --rhel-modules {{ rhel_modules | join(",") }} \ -{% endif %} -{% set branch = osp_branch|default(ci_branch) %} -{% if branch in exclude_containers %} -{% for item in exclude_containers[branch][container_exclude_distro] %} - --exclude {{ item }} \ -{% endfor %} -{% endif %} - --tag {{ version_hash }}{{ arch_tag | default('') }}\ - --base {{ containers_base_image | default('ubi8') }} \ - --prefix {{ container_name_prefix }} \ - --config-file {{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common/container-images/tripleo_containers.yaml \ - --config-path {{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common/container-images \ - --work-dir {{ ansible_user_dir }}/container-builds \ -{% if build_timeout is defined %} - --build-timeout {{ build_timeout }} \ -{% endif %} -{% if dockerfile_labels is defined %} -{% for item in dockerfile_labels %} - --label {{ item }} \ -{% endfor %} -{% endif %} -{% if volume_mounts is defined %} -{% for item in volume_mounts %} - --volume {{ item }} \ -{% endfor %} -{% endif %} -{% if release|default(branch) not in ["train"] %} - --tcib-extra tcib_release={{ ansible_distribution_major_version }} \ - --tcib-extra tcib_python_version={{ (ansible_distribution_major_version is version('9', '<')) | ternary ('3.6', '3.9') }} \ -{% endif %} -{% if (tcib_extra_config is defined) and (release|default(branch) not in ["train", "wallaby"]) %} - --extra-config {{ workspace }}/extra_config.yaml \ -{% endif %} -# TODO(tkajinam): With Ansible 2.14, the playbook triggered by the command -# gets stuck if -vvv is set. We temporarily remove --debug -# as a workaround until we find out the appropriate fix. -# https://github.com/ansible/ansible-runner/issues/1164 -# --debug diff --git a/roles/build-containers/vars/centos-7.yml b/roles/build-containers/vars/centos-7.yml deleted file mode 100644 index aea2e648d..000000000 --- a/roles/build-containers/vars/centos-7.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -tripleo_deps_from_package: - - "openstack-kolla" - - "python*-tripleoclient" - -upper_constraints_items: - - tripleo-common - - python-tripleoclient - - tripleo-ansible - - kolla - -requirements_items: - - openstack-tripleo-common - - python-tripleoclient - - tripleo-ansible - - kolla - -source_items: - - "file://{{ openstack_git_root }}/kolla" - - "file://{{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common" - - "file://{{ openstack_git_root }}/python-tripleoclient" - - "file://{{ openstack_git_root }}/tripleo-ansible" - - decorator diff --git a/roles/build-containers/vars/centos-8.yml b/roles/build-containers/vars/centos-8.yml deleted file mode 100644 index 330d1a89d..000000000 --- a/roles/build-containers/vars/centos-8.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -tripleo_deps_from_package: - - "python3-tripleoclient" - -upper_constraints_items: - - tripleo-common - - python-tripleoclient - - tripleo-ansible - -requirements_items: - - openstack-tripleo-common - - python-tripleoclient - - tripleo-ansible - -source_items: - - "file://{{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common" - - "file://{{ openstack_git_root }}/python-tripleoclient" - - "file://{{ openstack_git_root }}/tripleo-ansible" - - decorator - -volume_mounts: - - "/etc/yum.repos.d:/etc/distro.repos.d:z" - - "/etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z" - - "/etc/dnf/vars:/etc/dnf/vars:z" diff --git a/roles/build-containers/vars/centos-9.yml b/roles/build-containers/vars/centos-9.yml deleted file mode 100644 index c6876bca8..000000000 --- a/roles/build-containers/vars/centos-9.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -tripleo_deps_from_package: - - "python3-tripleoclient" - -upper_constraints_items: - - tripleo-common - - python-tripleoclient - - tripleo-ansible - -requirements_items: - - openstack-tripleo-common - - python-tripleoclient - - tripleo-ansible - -source_items: - - "file://{{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common" - - "file://{{ openstack_git_root }}/python-tripleoclient" - - "file://{{ openstack_git_root }}/tripleo-ansible" - - decorator - -volume_mounts: - - "/etc/yum.repos.d:/etc/distro.repos.d:z" - - "/etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z" - - "/etc/dnf/vars:/etc/dnf/vars:z" - -containers_base_image: registry.access.redhat.com/ubi9:latest diff --git a/roles/build-containers/vars/main.yaml b/roles/build-containers/vars/main.yaml deleted file mode 100644 index a6f1be1ea..000000000 --- a/roles/build-containers/vars/main.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -workspace: "{{ ansible_user_dir }}/workspace" - -# https://review.opendev.org/#/c/669471 - rhel8 kolla support -kolla_rhel8_patch: - master: 669471 - "stable/train": 693159 - -# Current implementation assumes that any branch name not mentioned here -# would default to the excludes defined on master branch. -exclude_ppc_containers: - master: - centos8: &exclude_ppc_master_containers - - ironic-pxe - - neutron-mlnx-agent -exclude_containers: - master: - centos8: &exclude_master_containers - - neutron-mlnx-agent - centos9: &exclude_cs9_master_containers - - neutron-mlnx-agent - zed: - centos9: *exclude_cs9_master_containers - wallaby: - centos8: *exclude_master_containers - centos9: *exclude_cs9_master_containers - train: - centos7: &exclude_containers_train - - opendaylight - - neutron-server-opendaylight - - neutron-mlnx-agent - - nova-serialproxy - - sahara-api - - sahara-engine - - sensu-client - centos8: - - fluentd - - opendaylight - - neutron-server-opendaylight - - neutron-mlnx-agent - - nova-serialproxy - - sahara-api - - sahara-engine - - sensu-client - rhos-18: - redhat9: *exclude_cs9_master_containers - rhos-17.1: - redhat8: *exclude_master_containers - redhat9: *exclude_cs9_master_containers - rhos-17: - redhat8: *exclude_master_containers - redhat9: *exclude_cs9_master_containers - rhos-16.2: - redhat8: - - neutron-mlnx-agent - -timestamper_cmd: >- - | awk '{ print strftime("%Y-%m-%d %H:%M:%S |"), $0; fflush(); }' - -# used with component_ci_service in defaults/main by component-ci jobs -component_ci_configs: - compute: "$TRIPLEO_CI_PATH/roles/build-containers/templates/component_ci/compute_overcloud_containers.yaml" - keystone: "$TRIPLEO_CI_PATH/roles/build-containers/templates/component_ci/keystone_overcloud_containers.yaml" diff --git a/roles/build-containers/vars/redhat-7.yml b/roles/build-containers/vars/redhat-7.yml deleted file mode 100644 index aea2e648d..000000000 --- a/roles/build-containers/vars/redhat-7.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -tripleo_deps_from_package: - - "openstack-kolla" - - "python*-tripleoclient" - -upper_constraints_items: - - tripleo-common - - python-tripleoclient - - tripleo-ansible - - kolla - -requirements_items: - - openstack-tripleo-common - - python-tripleoclient - - tripleo-ansible - - kolla - -source_items: - - "file://{{ openstack_git_root }}/kolla" - - "file://{{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common" - - "file://{{ openstack_git_root }}/python-tripleoclient" - - "file://{{ openstack_git_root }}/tripleo-ansible" - - decorator diff --git a/roles/build-containers/vars/redhat-8.yml b/roles/build-containers/vars/redhat-8.yml deleted file mode 100644 index e1b80b056..000000000 --- a/roles/build-containers/vars/redhat-8.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -tripleo_deps_from_package: - - "python3-tripleoclient" - -upper_constraints_items: - - tripleo-common - - python-tripleoclient - - tripleo-ansible - -requirements_items: - - openstack-tripleo-common - - python-tripleoclient - - tripleo-ansible - -source_items: - - "file://{{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common" - - "file://{{ openstack_git_root }}/python-tripleoclient" - - "file://{{ openstack_git_root }}/tripleo-ansible" - - decorator - -volume_mounts: - - "/etc/pki/ca-trust:/etc/pki/ca-trust:z" diff --git a/roles/build-containers/vars/redhat-9.yml b/roles/build-containers/vars/redhat-9.yml deleted file mode 100644 index e1b80b056..000000000 --- a/roles/build-containers/vars/redhat-9.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -tripleo_deps_from_package: - - "python3-tripleoclient" - -upper_constraints_items: - - tripleo-common - - python-tripleoclient - - tripleo-ansible - -requirements_items: - - openstack-tripleo-common - - python-tripleoclient - - tripleo-ansible - -source_items: - - "file://{{ openstack_git_root }}/{% if zuul_internal is defined %}openstack-{% endif %}tripleo-common" - - "file://{{ openstack_git_root }}/python-tripleoclient" - - "file://{{ openstack_git_root }}/tripleo-ansible" - - decorator - -volume_mounts: - - "/etc/pki/ca-trust:/etc/pki/ca-trust:z" diff --git a/roles/ceph-loop-device/README.rst b/roles/ceph-loop-device/README.rst deleted file mode 100644 index 2415cbdc3..000000000 --- a/roles/ceph-loop-device/README.rst +++ /dev/null @@ -1,47 +0,0 @@ -ceph-loop-device -================ - -This roles creates the /dev/loop3 and /dev/loop4 (default) loop -devices required when you have Ceph services in the deployment. -The first device is used for legacy jobs which use Ceph Filestore. -The second loop device has three logical volumes created on it for -use with Ceph Bluestore. - - -Role Variables --------------- - -ceph_loop_device: /dev/loop4 -ceph_loop_device_legacy: /dev/loop3 -ceph_loop_device_file: /var/lib/ceph-osd.img -ceph_loop_device_file_legacy: /var/lib/ceph-osd-legacy.img -ceph_logical_volume_group: ceph_vg -ceph_logical_volume_wal: ceph_lv_wal -ceph_logical_volume_db: ceph_lv_db -ceph_logical_volume_data: ceph_lv_data - - -Requirements ------------- - - - ansible >= 2.4 - - python >= 2.6 - -Dependencies ------------- - -None - -Example Playbooks ------------------ - -.. code-block:: - - - hosts: localhost - roles: - - ceph-loop-device - -License -------- - -Apache 2.0 diff --git a/roles/ceph-loop-device/defaults/main.yml b/roles/ceph-loop-device/defaults/main.yml deleted file mode 100644 index dea64d3a8..000000000 --- a/roles/ceph-loop-device/defaults/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -ceph_loop_device: /dev/loop4 -ceph_loop_device_legacy: /dev/loop3 -ceph_loop_device_file: /var/lib/ceph-osd.img -ceph_loop_device_file_legacy: /var/lib/ceph-osd-legacy.img -ceph_logical_volume_group: ceph_vg -ceph_logical_volume_data: ceph_lv_data diff --git a/roles/ceph-loop-device/tasks/main.yml b/roles/ceph-loop-device/tasks/main.yml deleted file mode 100644 index daea312d1..000000000 --- a/roles/ceph-loop-device/tasks/main.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -- name: stat ceph_loop_device see if it already exists - stat: - path: "{{ ceph_loop_device }}" - register: dev_loop3_res - -- name: log to syslog if ceph_loop_device exists - syslogger: - msg: "boostrap-subnodes - warning {{ ceph_loop_device }} already exists" - when: dev_loop3_res.stat.exists - -- name: Make sure we have losetup installed/latest # noqa: package-latest - become: true - package: - name: - - util-linux - - lvm2 - state: latest - -- name: Use dd and losetup to create the loop devices - become: true - shell: | - dd if=/dev/zero of={{ item.0 }} bs=1 count=0 seek=14G - losetup {{ item.1 }} {{ item.0 }} - lsblk - changed_when: true - with_together: - - ["{{ ceph_loop_device_file }}", "{{ ceph_loop_device_file_legacy }}"] - - ["{{ ceph_loop_device }}", "{{ ceph_loop_device_legacy }}"] - -- name: Use {pv,vg,lv}create to create logical volume on one loop device - become: true - shell: | - pvcreate {{ ceph_loop_device }} - vgcreate {{ ceph_logical_volume_group }} {{ ceph_loop_device }} - lvcreate -n {{ ceph_logical_volume_data }} -l +100%FREE {{ ceph_logical_volume_group }} - lvs - changed_when: true diff --git a/roles/ci-common-vars/tasks/main.yml b/roles/ci-common-vars/tasks/main.yml deleted file mode 100644 index 5cd6eda23..000000000 --- a/roles/ci-common-vars/tasks/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# In ansible 2.7 should be enough to add the option public: true to the calling include_role -# for this role. This is the best workaround -- name: Include the vars to be available for the playbook - include_vars: - dir: vars diff --git a/roles/ci-common-vars/vars/main.yaml b/roles/ci-common-vars/vars/main.yaml deleted file mode 100644 index 30266ef8a..000000000 --- a/roles/ci-common-vars/vars/main.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -workspace: "{{ ansible_user_dir }}/workspace" -tripleo_root: "{{ ansible_user_dir }}/src/opendev.org/openstack" -tripleo_ci_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-ci'].src_dir }}" -tripleo_quickstart_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-quickstart'].src_dir }}" -vxlan_vars: "-e toci_vxlan_networking='false' -e vxlan_networking='false'" -extra_vars: "" -role_vars: "" -job_featureset_file: >- - {% if featureset is defined -%} - {{ tripleo_quickstart_dir }}/config/general_config/featureset{{ featureset }}.yml{% endif -%} -skip_tags_list: >- - {% if environment_type == 'baremetal' -%} - tripleo-validations - {%- else -%} - tripleo-validations,teardown-all - {%- endif -%} - -featureset_conf: >- - {% if common_featureset is defined and common_featureset -%} - --extra-vars @{{ tripleo_quickstart_dir }}/config/general_config/{{ common_featureset }} {% endif -%} - {% if job_featureset_file != '' -%}--extra-vars @{{ job_featureset_file }}{% endif -%} - -# "force_non_periodic" - will force job to run as check job, no matter which pipeline it runs -# "force_periodic" - will force job to run as periodic (in terms of TripleO CI), no matter which pipeline it runs -periodic: >- - {% if ('periodic' in zuul.pipeline and not force_non_periodic|default(false)|bool) or (force_periodic|default(false)|bool) -%} - true - {%- else -%} - false - {%- endif %} - -nodepool_provider: "{{ hostvars[inventory_hostname].nodepool.provider }}" - -rhcloud: >- - {%- if 'rdo-cloud' in nodepool_provider -%} - rdocloud - {%- elif 'vexxhost-nodepool-tripleo' in nodepool_provider -%} - vexxhost - {%- elif 'psi-public-nodepool-tripleo' in nodepool_provider -%} - psi - {%- elif 'ibm-bm3-nodepool' in nodepool_provider -%} - ibm - {%- elif nodepool_provider == 'tripleo-ci' and environment_type == 'ovb' -%} - internal - {%- endif -%} - -nodes_file: >- - {% if nodes is defined -%} - {{ tripleo_quickstart_dir }}/config/nodes/{{ nodes }}.yml - {%- endif %} - -nodes_args: >- - {% if nodes is defined -%} - --extra-vars @{{ nodes_file }} - {%- endif %} - -rdo_env_vars: >- - {% if rhcloud -%} - --extra-vars @{{ tripleo_ci_dir }}/toci-quickstart/config/testenv/{{ environment_type }}-{{ rhcloud }}.yml - {%- endif %} - -env_vars: "--extra-vars @{{ tripleo_ci_dir }}/toci-quickstart/config/testenv/{{ environment_type }}.yml {{ rdo_env_vars }}" diff --git a/roles/oooci-build-images/defaults/main.yaml b/roles/oooci-build-images/defaults/main.yaml deleted file mode 100644 index e72e3b7a7..000000000 --- a/roles/oooci-build-images/defaults/main.yaml +++ /dev/null @@ -1,76 +0,0 @@ ---- -oooci_image_build_archive_dest: "{{ ansible_user_dir }}" -tripleo_image_source: https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-latest.x86_64.qcow2 -workspace: "{{ ansible_user_dir }}/workspace" -openstack_git_root: "{{ ansible_user_dir }}/src/opendev.org/openstack" -dib_pin: "" -python_v: py3 -base_image_config: - py2: overcloud-images.yaml - py3: overcloud-images-python3.yaml -hardened_image_config: - py2: overcloud-hardened-images.yaml - py3: overcloud-hardened-images-python3.yaml -tripleo_pip_projects: - - "git+file://{{ openstack_git_root }}/diskimage-builder{{ dib_pin }}" - - "file://{{ openstack_git_root }}/tripleo-ansible" - - "file://{{ openstack_git_root }}/tripleo-common" - - "file://{{ openstack_git_root }}/python-tripleoclient" -tripleo_common_path: "{{ openstack_git_root }}/tripleo-common" -tripleo_elements_path: - - "{{ openstack_git_root }}/tripleo-puppet-elements/elements" - - "{{ openstack_git_root }}/tripleo-image-elements/elements" - - "{{ openstack_git_root }}/heat-agents" - - "{{ openstack_git_root }}/ironic-python-agent-builder/dib/" -tripleo_shebang_path: - - "{{ openstack_git_root }}/tripleo-image-elements/elements/os-svc-install/bin/map-services-tripleo" - - "{{ openstack_git_root }}/diskimage-builder/diskimage_builder/lib/outfilter.py" - - "{{ openstack_git_root }}/diskimage-builder/diskimage_builder/elements/package-installs/bin/package-installs-squash" - - "{{ openstack_git_root }}/diskimage-builder/diskimage_builder/elements/svc-map/extra-data.d/10-merge-svc-map-files" - - "{{ openstack_git_root }}/diskimage-builder/diskimage_builder/elements/pypi/pre-install.d/04-configure-pypi-mirror" - - "{{ openstack_git_root }}/diskimage-builder/diskimage_builder/elements/deploy-targetcli/extra-data.d/module/targetcli-wrapper" -dib_yum_repo_conf: >- - {% if ansible_distribution == 'RedHat' and ansible_distribution_major_version is version(8, '>=') -%} - {{ dib_yum_repo_conf_rhel }} - {%- else -%} - {{ dib_yum_repo_conf_centos }} - {%- endif %} -centos_compose_dib_yum_repos: >- - {% if job is defined and - job.dependency is defined and - job.dependency == "centos-compose" or - dependency|default("") == "centos-compose" -%} - {{ true|bool }} - {%- else -%} - {{ false|bool }} - {%- endif -%} -dib_yum_repo_conf_centos: - - /etc/yum.repos.d/quickstart-centos* - - /etc/yum.repos.d/delorean* - - "{{ centos_compose_dib_yum_repos | ternary('/etc/yum.repos.d/CentOS-Stream-*','') }}" -dib_yum_repo_conf_rhel: - - /etc/yum.repos.d/rh-cloud.repo - - /etc/yum.repos.d/delorean* -dib_release: "8" -tripleo_image_os: centos8 -build_all_images: false -# Vars for enabling specific streams -dib_dnf_module_streams: "container-tools:3.0" -# Vars for running Image sanity -# image_sanity_command var should in following format: /tmp/output_file name> -# We need to dump the command output in /var/tmp directory. -image_sanity: true -image_sanity_command: "rpm -qa > /var/tmp/rpm_qa.txt; rpm -Va | grep missing > /var/tmp/rpm_va.txt" -image_sanity_files: - - /var/tmp/rpm_qa.txt - - /var/tmp/rpm_va.txt -# Referenced bugs linked to missing dirs -# - https://bugs.launchpad.net/tripleo/+bug/1879766 -missing_dirs: - - /var/lib/pcs - - /etc/pki/tls/private - -# discover-latest-images related params -tripleo_ci_discover_latest: false -tripleo_ci_discover_base_url: '' -tripleo_ci_discover_qcow_prefix: '' diff --git a/roles/oooci-build-images/tasks/add_cert.yaml b/roles/oooci-build-images/tasks/add_cert.yaml deleted file mode 100644 index 0d9173d0d..000000000 --- a/roles/oooci-build-images/tasks/add_cert.yaml +++ /dev/null @@ -1,69 +0,0 @@ ---- -- name: Check if cert exits - stat: - path: /etc/pki/ca-trust/source/anchors/rh.crt - register: cert_path - -- name: Install neccessary rpm and customize image to push correct certs in Image. - when: cert_path.stat.exists|bool - block: - - name: Install libguestfs packages - include_tasks: guestfs.yaml - - - name: Add cert if it exists - shell: > - virt-customize -a {{ tripleo_image_source | urlsplit('path') | basename }} - --upload /etc/pki/ca-trust/source/anchors/rh.crt:/etc/pki/ca-trust/source/anchors/rh.crt - --run-command 'update-ca-trust' - args: - chdir: "{{ workspace }}" - environment: - LIBGUESTFS_BACKEND_SETTINGS: force_tcg - LIBGUESTFS_BACKEND: direct - -- name: Install downstream cert rpm - when: - - not cert_path.stat.exists|bool - - downstream_cert_install_command is defined - block: - - name: Install libguestfs packages - include_tasks: guestfs.yaml - - - name: find the needed repos to pull deps - find: - paths: /etc/yum.repos.d - patterns: "rhos*.repo" - file_type: file - register: found_repos - - - name: Upload repos to image - shell: > - virt-customize -a {{ tripleo_image_source | urlsplit('path') | basename }} - --upload {{ item.path }}:{{ item.path }} - args: - chdir: "{{ workspace }}" - environment: - LIBGUESTFS_BACKEND_SETTINGS: force_tcg - LIBGUESTFS_BACKEND: direct - with_items: "{{ found_repos.files }}" - - - name: Install cert rpm - shell: > - virt-customize -a {{ tripleo_image_source | urlsplit('path') | basename }} - --run-command '{{ downstream_cert_install_command }}' - args: - chdir: "{{ workspace }}" - environment: - LIBGUESTFS_BACKEND_SETTINGS: force_tcg - LIBGUESTFS_BACKEND: direct - - - name: Remove repos which we installed earlier - shell: > - virt-customize -a {{ tripleo_image_source | urlsplit('path') | basename }} - --run-command 'rm {{ item.path }}' - args: - chdir: "{{ workspace }}" - environment: - LIBGUESTFS_BACKEND_SETTINGS: force_tcg - LIBGUESTFS_BACKEND: direct - with_items: "{{ found_repos.files }}" diff --git a/roles/oooci-build-images/tasks/check_set_py3.yaml b/roles/oooci-build-images/tasks/check_set_py3.yaml deleted file mode 100644 index d14417bfb..000000000 --- a/roles/oooci-build-images/tasks/check_set_py3.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Set python_v fact to py2 or py3 for use with base_image_config - set_fact: - python_v: "{{ ansible_facts['distribution_major_version'] is version('8', '>=') | ternary('py3', 'py2') }}" - cacheable: true - -- name: distribution_major_version - debug: - msg: "{{ ansible_facts['distribution_major_version'] }}" - -- name: python_v - debug: - msg: "{{ python_v }}" diff --git a/roles/oooci-build-images/tasks/guestfs.yaml b/roles/oooci-build-images/tasks/guestfs.yaml deleted file mode 100644 index 857ff7f5d..000000000 --- a/roles/oooci-build-images/tasks/guestfs.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Install libguestfs packages - package: - name: - - libguestfs - - libguestfs-tools - - libguestfs-tools-c - state: present diff --git a/roles/oooci-build-images/tasks/image_sanity.yaml b/roles/oooci-build-images/tasks/image_sanity.yaml deleted file mode 100644 index 5c51e021c..000000000 --- a/roles/oooci-build-images/tasks/image_sanity.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- name: Install guestfs - include_tasks: guestfs.yaml - -- name: Run sanity command on overcloud images - shell: | - virt-customize -vx --smp 2 -m 2048 -a overcloud-full.qcow2 --selinux-relabel \ - --run-command '{{ image_sanity_command }}' > {{ ansible_user_dir }}/virt_customize.log - virt-copy-out -a overcloud-full.qcow2 {{ image_sanity_files | join(' ') }} {{ workspace }} - args: - chdir: "{{ workspace }}" - environment: - LIBGUESTFS_BACKEND_SETTINGS: force_tcg - LIBGUESTFS_BACKEND: direct - changed_when: true - -- name: Look for missing directories - shell: | - ! grep {{ item }} rpm_va.txt - args: - chdir: "{{ workspace }}" - register: files_missing - changed_when: false - ignore_errors: true - loop: "{{ missing_dirs }}" - -- name: Show warning if missing files - debug: - msg: "WARNING: File(s) are missing on the overcloud image." - when: "item['rc'] == 1" - loop: "{{ files_missing.results }}" - -- name: Fail if missing files (periodic only) - block: - - name: Ensure no missing files - assert: - that: - - "item['rc'] == 0" - loop: "{{ files_missing.results }}" - when: > - ('periodic' in zuul.pipeline and not force_non_periodic|default(false)|bool) or - force_periodic|default(false)|bool diff --git a/roles/oooci-build-images/tasks/main.yaml b/roles/oooci-build-images/tasks/main.yaml deleted file mode 100644 index cf88b8464..000000000 --- a/roles/oooci-build-images/tasks/main.yaml +++ /dev/null @@ -1,174 +0,0 @@ ---- -- name: Get python_v fact for py2 or py3 common vars - include_tasks: check_set_py3.yaml - -- name: Include OS specific variables for C7 or C9 - include_vars: "centos-{{ ansible_distribution_major_version }}.yaml" - when: - - ansible_distribution == "CentOS" - - ansible_distribution_major_version is version('7', '==') or - ansible_distribution_major_version is version('9', '==') - -- name: Make sure logs directory exists - file: - path: '{{ workspace }}/logs' - state: directory - -- name: Get the latest image on demand - when: - - tripleo_ci_discover_latest | bool - block: - - name: Find latest image name - vars: - base_url: "{{ tripleo_ci_discover_base_url }}" - qcow_prefix: "{{ tripleo_ci_discover_qcow_prefix }}" - import_role: - name: discover-latest-image - - - name: Set needed facts - set_fact: - cacheable: true - tripleo_image_source: "{{ discovered_image_url }}" - baseos_undercloud_image_url: "{{ discovered_image_url }}" - baseos_image: "{{ ansible_distribution | lower }}" - baseos_image_type: qcow2 - baseos_md5sum: "{{ discovered_md5sum }} {{ discovered_image_name }}" - -- name: Set dib related facts used by tripleo-ci build-image role build template - set_fact: - dib_local_image: "{{ workspace }}/{{ tripleo_image_source | urlsplit('path') | basename }}" - dib_node_dist: "{{ (ansible_distribution == 'RedHat') | ternary('rhel', 'centos') }}" - cacheable: true - when: tripleo_image_source is defined - -- name: Install libselinux-python3 - package: - name: libselinux-python3 - state: present - become: true - -- name: Download TripleO source image - get_url: - url: "{{ tripleo_image_source }}" - dest: "{{ dib_local_image }}" - timeout: 20 - register: result - until: result is success - retries: 60 - delay: 10 - vars: - ansible_python_interpreter: /usr/bin/python3 - -- name: Install qemu-img for image build - package: - name: qemu-img - state: present - become: true - -- name: virt-customize to add cert - include_tasks: add_cert.yaml - args: - apply: - become: true - when: ansible_distribution|lower == "redhat" - -- name: Install python3-devel - package: - name: python3-devel # required for python-tripleoclient pip install - state: present - become: true - -- name: Install python-tripleoclient for Image build - package: - name: "python*-tripleoclient" - state: present - become: true - -- name: Generate build-images.sh script - template: - src: templates/build-images.sh.j2 - dest: "{{ workspace }}/build_images.sh" - mode: 0777 - force: true - -- name: Run build-images.sh - args: - chdir: '{{ workspace }}' - shell: bash build_images.sh > {{ workspace }}/logs/script_build.log 2> {{ workspace }}/logs/script_build-err.log - changed_when: true - -- when: tripleo_image_source is defined - block: - - name: check if overcloud images were built - stat: - path: "{{ workspace }}/overcloud-full.qcow2" - register: overcloud_stat_result - - - name: check if overcloud-hardened-uefi-full images were built - stat: - path: "{{ workspace }}/overcloud-hardened-uefi-full.qcow2" - register: overcloud_hardened_uefi_stat_result - - - name: check if ipa images were built - stat: - path: "{{ workspace }}/ironic-python-agent.kernel" - register: ipa_stat_result - - - when: ipa_stat_result.stat.exists|bool - block: - - - name: ironic-python-agent - archive: - path: - - "{{ workspace }}/ironic-python-agent.initramfs" - - "{{ workspace }}/ironic-python-agent.kernel" - dest: "{{ oooci_image_build_archive_dest }}/ironic-python-agent.tar" - format: tar - - - name: Create md5sums - shell: - cmd: | - md5sum ironic-python-agent.tar > ironic-python-agent.tar.md5 - args: - chdir: "{{ oooci_image_build_archive_dest }}" - - - when: overcloud_stat_result.stat.exists|bool - block: - - - name: overcloud-full - archive: - path: - - "{{ workspace }}/overcloud-full.qcow2" - - "{{ workspace }}/overcloud-full.initrd" - - "{{ workspace }}/overcloud-full.vmlinuz" - dest: "{{ oooci_image_build_archive_dest }}/overcloud-full.tar" - format: tar - - - name: Create md5sums - shell: - cmd: | - md5sum overcloud-full.tar > overcloud-full.tar.md5 - args: - chdir: "{{ oooci_image_build_archive_dest }}" - - - when: overcloud_hardened_uefi_stat_result.stat.exists|bool - block: - - name: "Move image to {{ oooci_image_build_archive_dest }}" - command: "mv {{ workspace }}/overcloud-hardened-uefi-full.qcow2 {{ oooci_image_build_archive_dest }}" - when: workspace != oooci_image_build_archive_dest - - - name: Create md5sums - shell: - cmd: | - md5sum overcloud-hardened-uefi-full.qcow2 > overcloud-hardened-uefi-full.qcow2.md5 - args: - chdir: "{{ oooci_image_build_archive_dest }}" - -- block: - - name: Run Image sanity on overcloud image - include_tasks: image_sanity.yaml - become: true - when: - - tripleo_image_type is search("overcloud-full") - - image_sanity | bool - - overcloud_stat_result.stat.exists|bool diff --git a/roles/oooci-build-images/tasks/post.yaml b/roles/oooci-build-images/tasks/post.yaml deleted file mode 100644 index 447cfcb59..000000000 --- a/roles/oooci-build-images/tasks/post.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -- name: Copy files from {{ workspace }}/ on node - no_log: true - synchronize: - src: '{{ workspace }}/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/*.log - - --include=/*.sh - - --include=/*.txt - - --include=*/ - - --exclude=* - - --prune-empty-dirs - -- name: Copy files from /etc/yum.repos.d/ on node - synchronize: - src: '/etc/yum.repos.d' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/** - - --exclude=* - -- name: Copy files from {{ workspace }}/ on node - no_log: true - synchronize: - src: '{{ workspace }}/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff --git a/roles/oooci-build-images/tasks/pre.yaml b/roles/oooci-build-images/tasks/pre.yaml deleted file mode 100644 index 34ad65ac0..000000000 --- a/roles/oooci-build-images/tasks/pre.yaml +++ /dev/null @@ -1,85 +0,0 @@ ---- -- name: Get python_v fact for py2 or py3 common vars - include_tasks: check_set_py3.yaml - -- name: Make sure workspace exists - file: - path: '{{ workspace }}' - state: directory - -- name: Install pip with ensure-pip role - include_role: - name: ensure-pip - -- name: Install pyyaml from epel - yum: - name: "python36-PyYAML" - enablerepo: epel - state: present - become: true - when: ansible_distribution_major_version|int == 7 - -- name: Install PyYAML - package: - name: "python3-pyyaml" - state: present - become: true - when: ansible_distribution_major_version|int >= 8 - -- name: Install python3-devel with provides pathfix.py - package: - name: python3-devel - state: present - become: true - -- name: Create a script that fixes shebang for python3 - template: - src: pathfix_repos.sh.j2 - dest: "{{ workspace }}/pathfix_repos.sh" - mode: u=rwx - -- name: Fix shebang path for python3 - command: bash {{ workspace }}/pathfix_repos.sh - changed_when: true - -- name: Install python3-setuptools - package: - name: "python3-setuptools" - state: present - become: true - when: python_v == "py3" - -- name: Install python-setuptools - package: - name: "python-setuptools" - state: present - become: true - when: python_v == "py2" - -- name: Ensure a recent version of pip is installed - pip: - extra_args: '--upgrade' - name: "pip>=19.1.1" - virtualenv: "{{ workspace }}/venv" - virtualenv_command: "{{ ensure_pip_virtualenv_command }}" - -- name: Install deps from upper-constraints - when: ansible_distribution == 'CentOS' - pip: - extra_args: "--upgrade -c {{ openstack_git_root }}/requirements/upper-constraints.txt" - requirements: "{{ openstack_git_root }}/{{ item }}/requirements.txt" - virtualenv: "{{ workspace }}/venv" - virtualenv_command: "{{ ensure_pip_virtualenv_command }}" - with_items: - - diskimage-builder - - tripleo-common - - tripleo-ansible - - python-tripleoclient - -- name: pip install tripleo items - pip: - name: "{{ tripleo_pip_projects }}" - extra_args: "--upgrade" - state: present - virtualenv: "{{ workspace }}/venv" - virtualenv_command: "{{ ensure_pip_virtualenv_command }}" diff --git a/roles/oooci-build-images/templates/build-images.sh.j2 b/roles/oooci-build-images/templates/build-images.sh.j2 deleted file mode 100644 index 58384fac0..000000000 --- a/roles/oooci-build-images/templates/build-images.sh.j2 +++ /dev/null @@ -1,80 +0,0 @@ -set -ex - -# Activate virtualenv only if exists -{% if osp_release is not defined %} -if [ -d "{{ workspace }}/venv" ]; then - source {{ workspace }}/venv/bin/activate -fi -{% endif %} - -# When python-tripleoclient is installed via packages -# elements_path are automatically setted. - -{% if to_build is not defined %} -ELEMENTS="{{ tripleo_elements_path | join(':') }}" - -if [ -d "{{ openstack_git_root }}/instack-undercloud/elements" ]; then - ELEMENTS="{{ openstack_git_root }}/instack-undercloud/elements:${ELEMENTS}" -fi - -export ELEMENTS_PATH=$ELEMENTS - -{% endif %} - -# the tripleo_image_type is set and passed from the ci job definition -{% if tripleo_image_type == "overcloud-hardened-uefi-full" %} -CONFIG_FILES="--config-file \ - {{ tripleo_common_path }}/image-yaml/overcloud-hardened-images-uefi-python3.yaml \ - --config-file {{ tripleo_common_path }}/image-yaml/overcloud-hardened-images-uefi-{{ tripleo_image_os }}.yaml" -{% elif tripleo_image_type == "overcloud-hardened-full" %} -CONFIG_FILES="--config-file \ - {{ tripleo_common_path }}/image-yaml/{{ hardened_image_config[python_v] }} \ - --config-file {{ tripleo_common_path }}/image-yaml/overcloud-hardened-images-{{ tripleo_image_os }}.yaml" -{% else %} -CONFIG_FILES="--config-file \ - {{ tripleo_common_path }}/image-yaml/{{ base_image_config[python_v] }} \ - --config-file {{ tripleo_common_path }}/image-yaml/overcloud-images-{{ tripleo_image_os }}.yaml" -{% endif %} - -{% if dib_local_image is defined %} - -# this is only set in rhel/centos-8 jobs dib_rhel_image -> DIB_LOCAL_IMAGE -export DIB_LOCAL_IMAGE={{ dib_local_image }} - -{% endif %} - -{% if dib_node_dist is defined %} - -export NODE_DIST={{ dib_node_dist }} -export DISTRO_NAME={{ dib_node_dist }} -{% endif %} - -{% if dib_release is defined %} - -export DIB_RELEASE={{ dib_release }} - -{% endif %} - -{% if dib_yum_repo_conf is defined %} - -export DIB_YUM_REPO_CONF='{{ dib_yum_repo_conf | join(" ") }}' - -{% else %} - -export DIB_YUM_REPO_CONF="/etc/yum.repos.d/delorean*" - -{% endif %} - -{% if dib_dnf_module_streams is defined and dib_dnf_module_streams|length > 0 %} - -export DIB_DNF_MODULE_STREAMS='{{ dib_dnf_module_streams }}' - -{% endif %} - -export DIB_DEBUG_TRACE=1 - -openstack --debug overcloud image build {% if not build_all_images|bool %}--image-name {{ tripleo_image_type }}{% endif %} \ - $CONFIG_FILES > {{ workspace }}/build.log 2> {{ workspace }}/build-err.log -RESULT=$? - -exit $RESULT diff --git a/roles/oooci-build-images/templates/pathfix_repos.sh.j2 b/roles/oooci-build-images/templates/pathfix_repos.sh.j2 deleted file mode 100644 index 86c88f000..000000000 --- a/roles/oooci-build-images/templates/pathfix_repos.sh.j2 +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/bash -# In some of scripts we still have python shebang "#!/usr/bin/env python" -# which fails in python3 hosts. -# In packages it's fixed by adding pathfix.py tasks to spec files. -# Add the same behavior here as we build from source, not packages. -for python_file in "{{ tripleo_shebang_path | join(' ')}}" -do - /usr/bin/pathfix.py -pni /usr/bin/python3 $python_file -done diff --git a/roles/oooci-build-images/vars/centos-7.yaml b/roles/oooci-build-images/vars/centos-7.yaml deleted file mode 100644 index f5011ef87..000000000 --- a/roles/oooci-build-images/vars/centos-7.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -tripleo_image_source: https://images.rdoproject.org/CentOS-7-x86_64-GenericCloud.qcow2 -dib_yum_repo_conf: - - /etc/yum.repos.d/CentOS* - - /etc/yum.repos.d/delorean* -dib_release: "7" -dib_dnf_module_streams: "" -tripleo_image_os: centos7 diff --git a/roles/oooci-build-images/vars/centos-9.yaml b/roles/oooci-build-images/vars/centos-9.yaml deleted file mode 100644 index e48e07dfc..000000000 --- a/roles/oooci-build-images/vars/centos-9.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -tripleo_image_source: http://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-latest.x86_64.qcow2 -dib_yum_repo_conf: - - /etc/yum.repos.d/quickstart-centos* - - /etc/yum.repos.d/delorean* - - /etc/yum.repos.d/centos.repo - - "{{ centos_compose_dib_yum_repos | ternary('/etc/yum.repos.d/CentOS-Stream-9*','') }}" -dib_release: "9-stream" -dib_dnf_module_streams: "" -tripleo_image_os: centos9 diff --git a/roles/prepare-node/tasks/main.yaml b/roles/prepare-node/tasks/main.yaml deleted file mode 100644 index 2da66bb00..000000000 --- a/roles/prepare-node/tasks/main.yaml +++ /dev/null @@ -1,76 +0,0 @@ ---- -- name: Swap is essential as we are not meeting memory requirements - vars: - configure_swap_size: 8192 - include_role: - name: configure-swap - -- name: Set legacy log path - include_role: - name: set-zuul-log-path-fact - -- name: Ensure legacy workspace directory - file: - path: '{{ workspace }}' - state: directory - -- name: Ensure legacy logs directory - file: - path: '{{ workspace }}/logs' - state: directory - -- name: Assure src folder has safe permissions - # Workaround for https://bugs.launchpad.net/tripleo/+bug/1807703 - file: - path: "{{ ansible_user_dir }}/src/" - state: directory - mode: u=rwX,g=rX,o=rX - recurse: true - -- name: "set zuul_dump" - set_fact: - zuul_dump: "{{ {'zuul': zuul} }}" - -- name: Dump zuul variables on the host to pass it to inner ansible - copy: - content: "{{ zuul_dump|to_nice_yaml }}" - dest: "{{ workspace }}/logs/zuul-variables.yaml" - -- name: Dump hostvars with job variables - set_fact: - local_hostvars: "{{ {'job': hostvars[inventory_hostname]} }}" - -- name: Dump hostvars on the host to pass it to inner ansible - copy: - content: "{{ local_hostvars|to_nice_yaml }}" - dest: "{{ workspace }}/logs/hostvars-variables.yaml" - -- name: Remove package exclusions from package manager - become: true - ini_file: - path: "{{ item }}" - section: main - option: exclude - state: absent - failed_when: false - with_items: - - /etc/yum.conf - - /etc/dnf/dnf.conf - -- name: Workaround for LP1955792/RHBZ2030107 - become: true - block: - - name: Set net.ipv4.ping_group_range - sysctl: - name: net.ipv4.ping_group_range - value: '0 2147483647' - state: present - sysctl_file: /etc/sysctl.d/99-workarounds.conf - -# Reference: https://bugs.launchpad.net/tripleo/+bug/1998954 -- name: Ensure CentOS runs with selinux permissive - become: true - selinux: - policy: targeted - state: permissive - when: ansible_distribution == 'CentOS' diff --git a/roles/run-test/tasks/main.yaml b/roles/run-test/tasks/main.yaml deleted file mode 100644 index 1adf1a21d..000000000 --- a/roles/run-test/tasks/main.yaml +++ /dev/null @@ -1,165 +0,0 @@ ---- -- name: Set legacy log path - include_role: - name: set-zuul-log-path-fact - -- when: featureset_override is defined and featureset_override - block: - - name: Check overridable settings - vars: - allowed_overrides: - - 'artg_repos_dir' - - 'baremetal_provision' - - 'cirros_image' - - 'dlrn_hash_tag' - - 'dlrn_hash_tag_newest' - - 'extra_args' - - 'enable_fips' - - 'promote_source' - - 'run_tempest' - - 'standalone_container_cli' - - 'standalone_environment_files' - - 'standalone_upgrade' - - 'standalone_virt_type' - - 'tempest_allowed_group' - - 'tempest_cloud_name' - - 'tempest_extra_config' - - 'tempest_format' - - 'tempest_plugins' - - 'tempest_private_net_provider_type' - - 'tempest_run_concurrency' - - 'tempest_run_skipped' - - 'tempest_services' - - 'tempest_tempest_conf_overrides' - - 'tempest_test_image_path' - - 'tempest_test_includelist' - - 'tempest_test_whitelist' - - 'tempest_use_skiplist' - - 'tempest_whitelist' - - 'tempest_workers' - - 'test_black_regex' - - 'test_white_regex' - - 'to_build' - - 'undercloud_enable_paunch' - - 'use_os_tempest' - - 'validate_ha_overcloud' - - 'validate_services' - - 'tempest_tempestconf_profile_overrides' - - 'composable_roles' - - 'overcloud_roles' - fail: - msg: "ERROR: {{ item }} is not overridable." - when: item not in allowed_overrides - with_items: "{{ featureset_override }}" - - name: Generate standalone_custom_env_files from standalone_environment_files - set_fact: - featureset_override: "{{ featureset_override | combine(custom_env, recursive=true) }}" - vars: - tht_dir: /usr/share/openstack-tripleo-heat-templates/ - custom_env: - standalone_custom_env_files: | - {{ featureset_override.standalone_environment_files | - default([]) | - map('regex_replace', '^', tht_dir ) | list }} - when: featureset_override['standalone_environment_files'] is defined - - name: include role ceph-loop-device - include_role: - name: ceph-loop-device - when: standalone_ceph is defined and standalone_ceph - - name: Generate featureset overriding file - template: - src: templates/featureset-override.j2 - dest: "{{ tripleo_root }}/tripleo-ci/featureset-override.yaml" - mode: 0755 - force: true - - name: Include some extra for generating toci scripts - set_fact: - extra_vars: "--extra-vars @{{ tripleo_root }}/tripleo-ci/featureset-override.yaml" - -- name: Generate role variable file - template: - src: templates/role-vars.j2 - dest: "{{ workspace }}/logs/role-vars.yaml" - mode: 0755 - force: true -- name: Include role variables to be passed to quickstart - set_fact: - role_vars: "--extra-vars @{{ workspace }}/logs/role-vars.yaml" - -- name: render toci_gate_test script - template: - src: templates/toci_gate_test.sh.j2 - dest: "{{ tripleo_root }}/tripleo-ci/toci_gate_test.sh" - mode: 0755 - force: true - -- name: render toci_quickstart script - template: - src: templates/toci_quickstart.sh.j2 - dest: "{{ tripleo_root }}/tripleo-ci/toci_quickstart.sh" - mode: 0755 - force: true - -- name: render common_vars script - template: - src: templates/common_vars.bash.j2 - dest: "{{ tripleo_root }}/tripleo-ci/scripts/common_vars.bash" - force: true - -- name: render oooq_common_functions script - template: - src: templates/oooq_common_functions.sh.j2 - dest: "{{ tripleo_root }}/tripleo-ci/scripts/oooq_common_functions.sh" - force: true - -- name: render ready releases.sh file - copy: - content: "{{ ready_releases_file }}" - dest: "{{ workspace }}/logs/releases.sh" - mode: 0644 - force: true - when: ready_releases_file is defined - -- name: run toci_gate_test.sh - shell: - cmd: | - set -e - set -x - {% if nodes is defined %} - export TOCI_JOBTYPE={{ environment_type }}-{{ nodes }}-featureset{{ featureset }} - {% else %} - export TOCI_JOBTYPE={{ environment_type }}-featureset{{ featureset }} - {% endif %} - export DISTRIBUTION={{ ansible_distribution }} - export DISTRIBUTION_MAJOR_VERSION={{ ansible_distribution_major_version }} - - {% if nodes is defined %} - export NODES_FILE={{ nodes_file }} - {% endif %} - - # ZUUL does not set these for periodic jobs - export ZUUL_BRANCH=${ZUUL_BRANCH:-master} - export ZUUL_REF=${ZUUL_REF:-None} - - # Compatibility with zuul v3 variables - export JOB_NAME={{ zuul.job }} - export LOG_PATH={{ zuul_log_path }} - - export BRANCH_OVERRIDE="{{ branch_override | default('default') }}" - if [ "$BRANCH_OVERRIDE" != "default" ] ; then - export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE - if [[ $BRANCH_OVERRIDE =~ ^stable/ ]] ; then - export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/${BRANCH_OVERRIDE#stable/} - export PIP_CONSTRAINT=https://releases.openstack.org/constraints/upper/${BRANCH_OVERRIDE#stable/} - fi - fi - - export PYTHONUNBUFFERED=true - export TRIPLEO_ROOT={{ tripleo_root }} - # NOTE(trown) We can move this into the multinode environment file once we - # migrate the 2-node jobs over to zuulv3 - bash -xe $TRIPLEO_ROOT/tripleo-ci/toci_gate_test.sh - executable: /bin/bash - chdir: '{{ tripleo_root }}' - environment: '{{ zuul | zuul_legacy_vars }}' - changed_when: true diff --git a/roles/run-test/templates/common_vars.bash.j2 b/roles/run-test/templates/common_vars.bash.j2 deleted file mode 100644 index 70e046ee4..000000000 --- a/roles/run-test/templates/common_vars.bash.j2 +++ /dev/null @@ -1,85 +0,0 @@ -# Periodic stable jobs set OVERRIDE_ZUUL_BRANCH, gate stable jobs -# just have the branch they're proposed to, e.g ZUUL_BRANCH, in both -# cases we need to set STABLE_RELEASE to match for tripleo.sh -export ZUUL_BRANCH=${ZUUL_BRANCH:-""} - -# For OVB repo "stable/1.0" is feature branch -if [ "$ZUUL_BRANCH" = "stable/1.0" -o "$ZUUL_BRANCH" = "stable/2.0" -a "$ZUUL_PROJECT" = "openstack/openstack-virtual-baremetal" ]; then - export ZUUL_BRANCH="master" -fi -# Match puppet-pacemaker branches to respective releases -if [ "$ZUUL_BRANCH" = "stable/1.1.x" -a "$ZUUL_PROJECT" = "openstack/puppet-pacemaker" ]; then - export ZUUL_BRANCH="stable/wallaby" - export STABLE_RELEASE="wallaby" -fi -if [ "$ZUUL_BRANCH" = "stable/1.5.x" -a "$ZUUL_PROJECT" = "openstack/puppet-pacemaker" ]; then - export ZUUL_BRANCH="stable/zed" - export STABLE_RELEASE="zed" -fi - -# For Ansible collection repo "stable/1.0.0" is a feature branch -if [ "$ZUUL_BRANCH" = "stable/1.0.0" -a "$ZUUL_PROJECT" = "openstack/ansible-collections-openstack" ]; then - export ZUUL_BRANCH="master" -fi -# For validations-libs repo "stable/1.6" is a support branch -if [ "$ZUUL_BRANCH" = "stable/1.6" -a "$ZUUL_PROJECT" = "openstack/validations-libs" ]; then - export ZUUL_BRANCH="stable/train" - export STABLE_RELEASE="train" -fi -# For validations-common repo "stable/1.6" is a support branch -if [ "$ZUUL_BRANCH" = "stable/1.6" -a "$ZUUL_PROJECT" = "openstack/validations-common" ]; then - export ZUUL_BRANCH="stable/train" - export STABLE_RELEASE="train" -fi - -export OVERRIDE_ZUUL_BRANCH=${OVERRIDE_ZUUL_BRANCH:-""} -export STABLE_RELEASE=${STABLE_RELEASE:-""} -export FEATURE_BRANCH=${FEATURE_BRANCH:-""} -# In upgrade jobs STABLE_RELEASE is changed to point to the initial -# deployment branch but we need to keep the actual release for the review -# to be used in delorean-build phase. -export REVIEW_RELEASE=${REVIEW_RELEASE:-""} -if [[ -z $STABLE_RELEASE ]]; then - if [[ $ZUUL_BRANCH =~ ^stable/ ]]; then - export STABLE_RELEASE=${ZUUL_BRANCH#stable/} - export REVIEW_RELEASE=${ZUUL_BRANCH#stable/} - export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE} - export PIP_CONSTRAINT=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE} - fi - if [[ $OVERRIDE_ZUUL_BRANCH =~ ^stable/ ]]; then - export STABLE_RELEASE=${OVERRIDE_ZUUL_BRANCH#stable/} - export REVIEW_RELEASE=${OVERRIDE_ZUUL_BRANCH#stable/} - export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE} - export PIP_CONSTRAINT=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE} - fi - if [[ $OVERRIDE_ZUUL_BRANCH == stable/rhos* ]]; then - export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/{{ release|default("master") }} - export PIP_CONSTRAINT=https://releases.openstack.org/constraints/upper/{{ release|default("master") }} - fi - if [[ $OVERRIDE_ZUUL_BRANCH =~ ^cloudsig/ ]]; then - export STABLE_RELEASE=${OVERRIDE_ZUUL_BRANCH} - export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE#cloudsig/} - export PIP_CONSTRAINT=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE#cloudsig/} - fi -fi - -# if we still don't have an stable branch, check if that -# is a feature branch -if [ -z "$STABLE_RELEASE" ] && [ "$ZUUL_BRANCH" != "master" ]; then - export FEATURE_BRANCH=$ZUUL_BRANCH -fi - -export TRIPLEO_ROOT=${TRIPLEO_ROOT:-"/opt/stack/new"} -export WORKSPACE=${WORKSPACE:-"$TRIPLEO_ROOT/workspace"} -export PATH=/sbin:/usr/sbin:$PATH - -export UNDERCLOUD_VM_NAME=instack - -export NODEPOOL_DOCKER_REGISTRY_V2_PROXY=${NODEPOOL_DOCKER_REGISTRY_V2_PROXY:-""} - -# post ci chores to run at the end of ci -SSH_OPTIONS='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=Verbose -o PasswordAuthentication=no -o ConnectionAttempts=32' - -# NOTE(pabelanger): this logic should be inverted to only include what developers need, not exclude things on the filesystem. -TARCMD="sudo XZ_OPT=-3 tar -cJf - --exclude=var/log/journal --exclude=udev/hwdb.bin --exclude=etc/puppet/modules --exclude=etc/project-config --exclude=etc/services --exclude=selinux/targeted --exclude=etc/services --exclude=etc/pki /var/log /etc" -JLOGCMD="sudo journalctl --output short-precise | sudo dd of=/var/log/journal-text.txt" diff --git a/roles/run-test/templates/featureset-override.j2 b/roles/run-test/templates/featureset-override.j2 deleted file mode 100644 index 464921f72..000000000 --- a/roles/run-test/templates/featureset-override.j2 +++ /dev/null @@ -1 +0,0 @@ -{{ featureset_override | to_nice_yaml( width=50) }} diff --git a/roles/run-test/templates/oooq_common_functions.sh.j2 b/roles/run-test/templates/oooq_common_functions.sh.j2 deleted file mode 100644 index 048f93bec..000000000 --- a/roles/run-test/templates/oooq_common_functions.sh.j2 +++ /dev/null @@ -1,229 +0,0 @@ -function previous_release_from { - local release="${1:-master}" - local type="${2:-mixed_upgrade}" - local previous_version="" - case "${type}" in - 'mixed_upgrade') - previous_version=$(previous_release_mixed_upgrade_case "${release}");; - 'ffu_upgrade'|'ffu_undercloud_upgrade'|'ffu_standalone_upgrade') - previous_version=$(previous_release_ffu_upgrade_case "${release}");; - *) - echo "UNKNOWN_TYPE" - return 1 - ;; - esac - echo "${previous_version}" -} - -function previous_release_mixed_upgrade_case { - local release="${1:-master}" - case "${release}" in - ''|master|promotion-testing-hash-master) - echo "zed" - ;; - zed|promotion-testing-hash-zed) - echo "wallaby" - ;; - wallaby|promotion-testing-hash-wallaby) - echo "victoria" - ;; - victoria|promotion-testing-hash-victoria) - echo "ussuri" - ;; - ussuri|promotion-testing-hash-ussuri) - echo "train" - ;; - *) - echo "UNKNOWN_RELEASE" - return 1 - ;; - esac -} - -function previous_release_ffu_upgrade_case { - local release="${1:-master}" - - case "${release}" in - ''|master) - echo "wallaby" - ;; - wallaby) - echo "train" - ;; - *) - echo "INVALID_RELEASE_FOR_FFU" - return 1 - ;; - esac -} - -function is_featureset { - local type="${1}" - local featureset_file="${2}" - - [ $(shyaml get-value "${type}" "False"< "${featureset_file}") = "True" ] -} - -function create_collect_logs_script { - cat > $LOGS_DIR/collect_logs.sh < $LOGS_DIR/dns_cache.txt - -mkdir -p $LOGS_DIR/quickstart_files -find $LOCAL_WORKING_DIR -maxdepth 1 -type f -not -name "*sqlite" | while read i; do cp -l \$i $LOGS_DIR/quickstart_files/\$(basename \$i); done - -$QUICKSTART_COLLECTLOGS_CMD > $LOGS_DIR/quickstart_collect_logs.log || \ - echo "WARNING: quickstart collect-logs failed, check quickstart_collectlogs.log for details" - -cp $LOGS_DIR/undercloud/var/log/postci.txt.gz $LOGS_DIR/ || true - -if [[ -e $LOGS_DIR/undercloud/home/$USER/tempest/testrepository.subunit.gz ]]; then - cp $LOGS_DIR/undercloud/home/$USER/tempest/testrepository.subunit.gz ${LOGS_DIR}/testrepository.subunit.gz -fi - -# Copy tempest.html to root dir -if [ -f $LOGS_DIR/undercloud/home/$USER/tempest/tempest.html.gz ]; then - cp $LOGS_DIR/undercloud/home/$USER/tempest/tempest.html.gz ${LOGS_DIR} -fi - -# Copy tempest and .testrepository directory to /opt/stack/new/tempest and -# unzip -sudo -s -- < $LOGS_DIR/quickstart_files/log-size.txt || true -END - -} - -get_extra_vars_from_release() -{ - local release_name=$1 - local release_hash=$2 - local newest_release_hash=${3:-""} - local release_file=$LOCAL_WORKING_DIR/config/release/tripleo-ci/${DISTRIBUTION:-CentOS}-${DISTRIBUTION_MAJOR_VERSION:-7}/$release_name.yml - echo "--extra-vars @$release_file -e dlrn_hash=$release_hash -e get_build_command=$release_hash ${newest_release_hash:+-e dlrn_hash_newest=$newest_release_hash}" -} - -# Enclose IPv6 addresses in brackets. -# This is needed for scp command where the first column of IPv6 address gets -# interpreted as the separator between address and path otherwise. -# $1 : IP address to sanitize -function sanitize_ip_address { - ip=$1 - if [[ $ip =~ .*:.* ]]; then - echo \[$ip\] - else - echo $ip - fi -} - -function python_cmd() { - distribution=unknown - distribution_major_version=unknown - # we prefer python2 because on few systems python->python3 - python_cmd=python3 - - if [ -f /etc/os-release ]; then - . /etc/os-release - distribution_major_version=${VERSION_ID%.*} - case $NAME in - "Red Hat"*) distribution="RedHat" - if [ "$distribution_major_version" -ge "8" ]; then - python_cmd=python3 - fi - ;; - "CentOS"*) - distribution="CentOS" - if [ "$distribution_major_version" -ge "8" ]; then - python_cmd=python3 - fi - ;; - "Fedora"*) - distribution="Fedora" - if [ "$distribution_major_version" -ge "28" ]; then - python_cmd=python3 - fi - ;; - "Ubuntu"*) - distribution="Ubuntu" - ;; - "Debian"*) - distribution="Debian" - ;; - esac - elif [ -f /etc/lsb-release ]; then - . /etc/lsb-release - distribution=${DISTRIB_ID}xx - distribution_major_version=${DISTRIB_RELEASE%.*} - elif [ -f /etc/debian_version ]; then - distribution="Debian" - distribution_major_version=$(cat /etc/debian_version | cut -d. -f1) - else - # Covers for FreeBSD and many others - distribution=$(uname -s) - if [ $distribution = Darwin ]; then - distribution="MacOSX" - distribution_major_version=$(sw_vers -productVersion | cut -d. -f1) - fi - which $python_cmd 2>&1 >/dev/null || { - python_cmd=/usr/local/bin/python2.7 - } - fi - echo $python_cmd -} - -function package_manager() { - PKG="$(command -v dnf || command -v yum)" - if [ "$(python_cmd)" == "python3" ]; then - echo "${PKG} -y --exclude=python2* $*" - else - echo "${PKG} -y --exclude=python3* $*" - fi -} diff --git a/roles/run-test/templates/role-vars.j2 b/roles/run-test/templates/role-vars.j2 deleted file mode 100644 index 9526f4778..000000000 --- a/roles/run-test/templates/role-vars.j2 +++ /dev/null @@ -1 +0,0 @@ -{{ run_test_role_vars | default({}) | to_nice_yaml( width=50) }} diff --git a/roles/run-test/templates/toci_gate_test.sh.j2 b/roles/run-test/templates/toci_gate_test.sh.j2 deleted file mode 100755 index f212e105f..000000000 --- a/roles/run-test/templates/toci_gate_test.sh.j2 +++ /dev/null @@ -1,219 +0,0 @@ -#!/usr/bin/env bash - -source $(dirname $0)/scripts/common_vars.bash - -set -eux -export START_JOB_TIME=$(date +%s) -export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' - -source $TRIPLEO_ROOT/tripleo-ci/scripts/oooq_common_functions.sh - -if [ -f /etc/nodepool/provider ] ; then - # this sets - # NODEPOOL_PROVIDER (e.g tripleo-test-cloud-rh1) - # NODEPOOL_CLOUD (e.g.tripleo-test-cloud-rh1) - # NODEPOOL_REGION (e.g. regionOne) - # NODEPOOL_AZ - source /etc/nodepool/provider - - # source variables common across all the scripts. - if [ -e /etc/ci/mirror_info.sh ]; then - source /etc/ci/mirror_info.sh - fi - - {% if rhcloud -%} - # In order to save space remove the cached git repositories, at this point in - # CI the ones we are interested in have been cloned to /opt/stack/new. We - # can also remove some distro images cached on the images. - sudo find /opt/git -delete || true - {% endif %} -fi - -# default $NODEPOOL_PROVIDER if not already set as it's used later -export NODEPOOL_PROVIDER=${NODEPOOL_PROVIDER:-""} - - -# create logs dir (check if collect-logs doesn't already do this) -mkdir -p $WORKSPACE/logs - -# Since python3 became default on some distros without even having a python/pip -# command installed due to PEP-0394, we can no longer rely on having -# unversioned commands available like python(2|3) or pip(2|3). We should only -# call pip using module approach which ensures we use the right version. -$(python_cmd) -m pip --version || \ - (curl -s "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"; sudo $(python_cmd) get-pip.py) - -if [ "$(python_cmd)" == "python3" ]; then - if [[ "$(package_manager)" == *"/usr/bin/yum"* ]]; then - sudo $(python_cmd) -m pip install requests - fi - sudo $(package_manager) install python3-setuptools python3-requests python3-urllib3 python3-PyYAML -else - sudo $(package_manager) install python2-setuptools python2-requests python-requests python-urllib3 PyYAML -fi - -sudo $(python_cmd) -m pip install shyaml - -# Sets whether or not this job will upload images. -export PERIODIC=0 -# Sets which repositories to use in the job -export QUICKSTART_RELEASE="${STABLE_RELEASE:-master}" -# Stores OVB undercloud instance id -export UCINSTANCEID="null" -# Set the overcloud hosts for multinode -export OVERCLOUD_HOSTS= -export CONTROLLER_HOSTS= -export SUBNODES_SSH_KEY= -export EXTRA_VARS=${EXTRA_VARS:-""} -export VXLAN_VARS=${VXLAN_VARS:-""} -export EXTRANODE="" -export EMIT_RELEASES_EXTRA_ARGS="" -LOCAL_WORKING_DIR="$WORKSPACE/.quickstart" -LWD=$LOCAL_WORKING_DIR - -export RELEASES_FILE_OUTPUT=$WORKSPACE/logs/releases.sh -export RELEASES_SCRIPT=$TRIPLEO_ROOT/tripleo-ci/scripts/emit_releases_file/emit_releases_file.py -export RELEASES_SCRIPT_LOGFILE=$WORKSPACE/logs/emit_releases_file.log - -case {{ environment_type | default('standalone') }} in - ovb) - OVB=1 - ;; - multinode) - SUBNODES_SSH_KEY=/etc/nodepool/id_rsa - CONTROLLER_HOSTS=$(sed -n 1,1p /etc/nodepool/sub_nodes_private) - OVERCLOUD_HOSTS=$(cat /etc/nodepool/sub_nodes_private) - ;; -esac - -MIXED_UPGRADE_TYPE='' - -# Order matters. ffu featureset has both mixed version and ffu_overcloud_upgrade. -if is_featureset ffu_overcloud_upgrade "{{ job_featureset_file }}"; then - MIXED_UPGRADE_TYPE='ffu_upgrade' -elif is_featureset ffu_undercloud_upgrade "{{ job_featureset_file }}" || is_featureset ffu_standalone_upgrade "{{ job_featureset_file }}" ; then - export UPGRADE_RELEASE=$QUICKSTART_RELEASE - export QUICKSTART_RELEASE=$(previous_release_from "${STABLE_RELEASE}" 'ffu_undercloud_upgrade') - {% if provider_dlrn_hash_tag_branch is defined %} - EMIT_RELEASES_EXTRA_ARGS="$EMIT_RELEASES_EXTRA_ARGS --content-provider-hashes={{ provider_dlrn_hash_tag_branch.keys()|zip(provider_dlrn_hash_tag_branch.values())|map('join',':')|join(';') }} --target-branch-override=$UPGRADE_RELEASE --install-branch-override=$QUICKSTART_RELEASE" - {% endif %} -elif is_featureset mixed_upgrade "{{ job_featureset_file }}"; then - MIXED_UPGRADE_TYPE='mixed_upgrade' -elif is_featureset undercloud_upgrade "{{ job_featureset_file }}"; then - export UPGRADE_RELEASE=$QUICKSTART_RELEASE - export QUICKSTART_RELEASE=$(previous_release_mixed_upgrade_case "${UPGRADE_RELEASE}") - {% if provider_dlrn_hash_tag_branch is defined %} - EMIT_RELEASES_EXTRA_ARGS="$EMIT_RELEASES_EXTRA_ARGS --content-provider-hashes={{ provider_dlrn_hash_tag_branch.keys()|zip(provider_dlrn_hash_tag_branch.values())|map('join',':')|join(';') }} --target-branch-override=$UPGRADE_RELEASE --install-branch-override=$QUICKSTART_RELEASE" - {% endif %} -# For minor_update we stay on the same branch, but we need to pass zuul information of 'current' content provider job in target-branch-override. -elif is_featureset minor_update "{{ job_featureset_file }}"; then - echo "minor update centos9/wallaby" - {% if provider_dlrn_hash_tag_branch is defined %} - EMIT_RELEASES_EXTRA_ARGS="$EMIT_RELEASES_EXTRA_ARGS --content-provider-hashes={{ provider_dlrn_hash_tag_branch.keys()|zip(provider_dlrn_hash_tag_branch.values())|map('join',':')|join(';') }} --target-branch-override=${QUICKSTART_RELEASE}-current --install-branch-override=$QUICKSTART_RELEASE" - {% endif %} -# This is a case for train branch, which uses featureset038. In featureset038 we test update workflow itself, no containers or rpms update happens. -# Target branch is overridden to be exactly the same as for deployment, because only containers used during deployment are in local container registry. -elif is_featureset overcloud_update "{{ job_featureset_file }}"; then - echo "minor update centos8/train" - {% if provider_dlrn_hash_tag_branch is defined %} - EMIT_RELEASES_EXTRA_ARGS="$EMIT_RELEASES_EXTRA_ARGS --content-provider-hashes={{ provider_dlrn_hash_tag_branch.keys()|zip(provider_dlrn_hash_tag_branch.values())|map('join',':')|join(';') }} --target-branch-override=$QUICKSTART_RELEASE" - {% endif %} -fi - -# Set UPGRADE_RELEASE if applicable -if [ -n "${MIXED_UPGRADE_TYPE}" ]; then - export UPGRADE_RELEASE=$(previous_release_from "${STABLE_RELEASE}" "${MIXED_UPGRADE_TYPE}") - QUICKSTART_RELEASE="$QUICKSTART_RELEASE-undercloud-$UPGRADE_RELEASE-overcloud" -fi - -{% if periodic|bool %} -PERIODIC=1 -QUICKSTART_RELEASE="promotion-testing-hash-${QUICKSTART_RELEASE}" -EMIT_RELEASES_EXTRA_ARGS="$EMIT_RELEASES_EXTRA_ARGS --is-periodic" -{% if osp_release is defined %} -if is_featureset minor_update "{{ job_featureset_file }}"; then -# In downstream minor update job we use special, seperate promotion file -QUICKSTART_RELEASE="update-promotion-testing-hash-${STABLE_RELEASE:-master}" -fi -{% endif %} -{% endif %} - -{% if osp_release is not defined %} -if [[ -f "$RELEASES_SCRIPT" ]] && [[ {{ featureset }} =~ 037|047|050|056|065|067|068 ]]; then - - if [[ -f "$RELEASES_FILE_OUTPUT" ]]; then - echo "Importing ready releases.sh file - skipping releases.sh file generation." - else - $(python_cmd) $RELEASES_SCRIPT \ - --stable-release ${STABLE_RELEASE:-"master"} \ - --featureset-file $TRIPLEO_ROOT/tripleo-quickstart/config/general_config/$(basename {{ job_featureset_file }}) \ - --output-file $RELEASES_FILE_OUTPUT \ - --log-file $RELEASES_SCRIPT_LOGFILE \ - --distro-name {{ ansible_distribution | lower }} \ - --distro-version {{ ansible_distribution_major_version }} \ - $EMIT_RELEASES_EXTRA_ARGS - fi -fi -{% endif %} - -# Import gated tripleo-upgrade in oooq for upgrades/updates jobs -if [[ -d $TRIPLEO_ROOT/tripleo-upgrade ]]; then - echo "file://${TRIPLEO_ROOT}/tripleo-upgrade/#egg=tripleo-upgrade" >> ${TRIPLEO_ROOT}/tripleo-quickstart/quickstart-extras-requirements.txt -else - # Otherwise, if not importing it, oooq will fail when loading - # tripleo-upgrade role in the playbook. - echo "git+https://opendev.org/openstack/tripleo-upgrade.git@${ZUUL_BRANCH}#egg=tripleo-upgrade" >> ${TRIPLEO_ROOT}/tripleo-quickstart/quickstart-extras-requirements.txt -fi - -# Import gated external repo in oooq - starting with browbeat, tripleo-ha-utils, openstack-ansible-os_tempest, -# ansible-config_template, ansible-role-python_venv_build, ansible-role-collect-logs -EXTERNAL_REPOS="x/browbeat openstack/tripleo-ha-utils openstack/tripleo-ci openstack/tripleo-quickstart-extras openstack/openstack-ansible-os_tempest \ -openstack/ansible-config_template openstack/ansible-role-python_venv_build openstack/ansible-role-collect-logs \ -openstack/tripleo-operator-ansible openstack/ansible-collections-openstack openstack/tripleo-ansible x/tripleo-ipa \ -openstack/openstack-tempest-skiplist" -for EXTERNAL_REPO in $EXTERNAL_REPOS; do - if [[ -d ${TRIPLEO_ROOT%openstack}/$EXTERNAL_REPO ]]; then - sed -i "s#git+https://opendev.org/$EXTERNAL_REPO#file://${TRIPLEO_ROOT%openstack}/$EXTERNAL_REPO#1" ${TRIPLEO_ROOT}/tripleo-quickstart/quickstart-extras-requirements.txt - fi -done - - -# Start time tracking -export STATS_TESTENV=$(date +%s) -pushd $TRIPLEO_ROOT/tripleo-ci -if [ -e $WORKSPACE/instackenv.json -a "{{ environment_infra }}" = "ovb" ] ; then - echo "Running without te-broker" - export TE_DATAFILE=$WORKSPACE/instackenv.json - ./toci_quickstart.sh -elif [ "{{ environment_infra }}" = "ovb" ] ; then - # We only support multi-nic at the moment - NETISO_ENV="multi-nic" - ./toci_quickstart.sh -else - - # Copy nodepool keys to current user - sudo cp /etc/nodepool/id_rsa* $HOME/.ssh/ - sudo chown $USER:$USER $HOME/.ssh/id_rsa* - chmod 0600 $HOME/.ssh/id_rsa* - cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys - # pre-ansible requirement - sudo mkdir -p /root/.ssh/ - # everything below here *MUST* be translated to a role ASAP - # empty image to fool overcloud deployment - # set no_proxy variable - export IP_DEVICE=${IP_DEVICE:-"eth0"} - MY_IP=$(ip addr show dev $IP_DEVICE | awk '/inet / {gsub("/.*", "") ; print $2}') - MY_IP_eth1=$(ip addr show dev eth1 | awk '/inet / {gsub("/.*", "") ; print $2}') || MY_IP_eth1="" - - export http_proxy="" - undercloud_net_range="192.168.24." - undercloud_services_ip=$undercloud_net_range"1" - undercloud_haproxy_public_ip=$undercloud_net_range"2" - undercloud_haproxy_admin_ip=$undercloud_net_range"3" - export no_proxy=$undercloud_services_ip,$undercloud_haproxy_public_ip,$undercloud_haproxy_admin_ip,$MY_IP,$MY_IP_eth1 - - # finally, run quickstart - ./toci_quickstart.sh -fi - -echo "Run completed" diff --git a/roles/run-test/templates/toci_quickstart.sh.j2 b/roles/run-test/templates/toci_quickstart.sh.j2 deleted file mode 100755 index db05287a1..000000000 --- a/roles/run-test/templates/toci_quickstart.sh.j2 +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/bin/env bash -set -eux -set -o pipefail -export ANSIBLE_NOCOLOR=1 - -LOCAL_WORKING_DIR="{{ workspace }}/.quickstart" -WORKING_DIR="$HOME" -LOGS_DIR={{ workspace }}/logs - -source {{ tripleo_root }}/tripleo-ci/scripts/oooq_common_functions.sh - -## Signal to toci_gate_test.sh we've started by -touch /tmp/toci.started - -export DEFAULT_ARGS="--extra-vars local_working_dir=$LOCAL_WORKING_DIR \ - --extra-vars virthost={{ undercloud }} \ - --inventory $LOCAL_WORKING_DIR/hosts \ - --extra-vars tripleo_root={{ tripleo_root }} \ - --extra-vars working_dir=$WORKING_DIR \ - --extra-vars tripleo_generate_scripts=true \ - --skip-tags "{{ ','.join(skip_tags_list.split(',') + remove_tags|default([])) }}" \ -" - -# --install-deps arguments installs deps and then quits, no other arguments are -# processed. -QUICKSTART_PREPARE_CMD=" - ./quickstart.sh - --install-deps -" - -QUICKSTART_VENV_CMD=" - ./quickstart.sh -{% if teardown|default(true)|bool %} - --bootstrap -{% endif %} - --no-clone -{% if environment_type == 'baremetal' -%} -{# It needs to be installed on zuul node to drive deployment #} - --url-requirements git+https://opendev.org/openstack/tripleo-operator-ansible/#egg=tripleo-operator-ansible -{% endif %} - --working-dir $LOCAL_WORKING_DIR - --playbook noop.yml - --retain-inventory - {{ undercloud }} -" - -QUICKSTART_INSTALL_CMD=" - $LOCAL_WORKING_DIR/bin/ansible-playbook - --tags {{ ','.join(tags + (extra_tags|default([]))) }} -" - -export QUICKSTART_DEFAULT_RELEASE_ARG="--extra-vars @$LOCAL_WORKING_DIR/config/release/tripleo-ci/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}/$QUICKSTART_RELEASE.yml" - -QUICKSTART_COLLECTLOGS_CMD="$LOCAL_WORKING_DIR/bin/ansible-playbook \ - $LOCAL_WORKING_DIR/playbooks/collect-logs.yml \ - -vvvv \ - $QUICKSTART_DEFAULT_RELEASE_ARG \ - {{ featureset_conf }} \ - {{ env_vars }} \ - {{ role_vars }} \ - {{ extra_vars }} \ - $DEFAULT_ARGS \ - --extra-vars @{{ tripleo_root }}/tripleo-ci/toci-quickstart/config/collect-logs.yml \ - --extra-vars artcl_collect_dir=$LOGS_DIR \ - --extra-vars @{{ workspace }}/logs/zuul-variables.yaml \ - --extra-vars @{{ workspace }}/logs/hostvars-variables.yaml \ - --tags all \ -" - -declare -A RELEASE_ARGS=() - -if [[ -f "$RELEASES_FILE_OUTPUT" ]]; then - - source $RELEASES_FILE_OUTPUT - - declare -A RELEASE_ARGS=( - ["multinode-undercloud.yml"]=$(get_extra_vars_from_release \ - $UNDERCLOUD_INSTALL_RELEASE $UNDERCLOUD_INSTALL_HASH) - ["multinode-undercloud-upgrade.yml"]=$(get_extra_vars_from_release \ - $UNDERCLOUD_TARGET_RELEASE $UNDERCLOUD_TARGET_HASH) - ["multinode-overcloud-prep.yml"]=$(get_extra_vars_from_release \ - $OVERCLOUD_DEPLOY_RELEASE $OVERCLOUD_DEPLOY_HASH) - ["multinode-overcloud.yml"]=$(get_extra_vars_from_release \ - $OVERCLOUD_DEPLOY_RELEASE $OVERCLOUD_DEPLOY_HASH) - ["multinode-overcloud-update.yml"]=$(get_extra_vars_from_release \ - $OVERCLOUD_TARGET_RELEASE $OVERCLOUD_TARGET_HASH) - ["multinode-overcloud-upgrade.yml"]=$(get_extra_vars_from_release \ - $OVERCLOUD_TARGET_RELEASE $OVERCLOUD_TARGET_HASH) - ["multinode-validate.yml"]=$(get_extra_vars_from_release \ - $OVERCLOUD_TARGET_RELEASE $OVERCLOUD_TARGET_HASH) - ["multinode-standalone.yml"]=$(get_extra_vars_from_release \ - $STANDALONE_DEPLOY_RELEASE $STANDALONE_DEPLOY_HASH \ - $STANDALONE_DEPLOY_NEWEST_HASH) - ["multinode-standalone-upgrade.yml"]=$(get_extra_vars_from_release \ - $STANDALONE_TARGET_RELEASE $STANDALONE_TARGET_HASH \ - $STANDALONE_TARGET_NEWEST_HASH) - ) - -fi - -if is_featureset mixed_os "{{ job_featureset_file }}"; then - eight_release=$LOCAL_WORKING_DIR/config/release/tripleo-ci/${DISTRIBUTION:-CentOS}-8/$QUICKSTART_RELEASE.yml - RELEASE_ARGS=( - ["multinode-overcloud-mixed-os-repos-compute.yml"]=" --extra-vars @$eight_release --extra-vars registry_distro=8 " - ["multinode-undercloud-mixed-os.yml"]=" $QUICKSTART_DEFAULT_RELEASE_ARG --extra-vars registry_distro=9 --extra-vars registry_distro_lower=8 " - ["multinode-overcloud-prep.yml"]=" $QUICKSTART_DEFAULT_RELEASE_ARG --extra-vars registry_distro=9 " - ["multinode-overcloud-mixed-os-deploy.yml"]=" $QUICKSTART_DEFAULT_RELEASE_ARG --extra-vars registry_distro=9 --extra-vars registry_distro_lower=8 " - ) -fi - -declare -A PLAYBOOKS_ARGS=( - ["baremetal-full-overcloud.yml"]=" --extra-vars validation_args='--validation-errors-nonfatal' " - ["multinode-overcloud.yml"]=" --extra-vars validation_args='--validation-errors-nonfatal' " - ["multinode.yml"]=" --extra-vars validation_args='--validation-errors-nonfatal' " -) - -# minor_update variable is set to true only in featureset068 -# In downstream we do not use content provider and we pull already created images, so we only need to override container images tag with newer one(override_docker_image_tag) -# In upstream we need to override container_registry_release to get ip of docker registry and dlrn hash from content provider which provides containers with 'current' tag -# Containers are required to be pulled both to undercloud and overcloud to run minor update on the same branch -# Also to trigger update of undercloud and overcloud from correct playbook, overcloud_update and undercloud_update extra-vars are set to false respectively -if is_featureset minor_update "{{ job_featureset_file }}"; then -{% if osp_release is defined %} - PLAYBOOKS_ARGS=( - ["multinode-undercloud-upgrade.yml"]="--extra-vars overcloud_update='false' --extra-vars override_docker_image_tag='true' " - ["multinode-overcloud-update.yml"]="--extra-vars undercloud_update='false' --extra-vars override_docker_image_tag='true'" - ) -{% else %} - PLAYBOOKS_ARGS=( - ["multinode-undercloud-upgrade.yml"]=" --extra-vars container_registry_release='${QUICKSTART_RELEASE}-current' --extra-vars promote_source='current' --extra-vars overcloud_update='false' " - ["multinode-overcloud-update.yml"]=" --extra-vars container_registry_release='${QUICKSTART_RELEASE}-current' --extra-vars promote_source='current' --extra-vars undercloud_update='false' " - ) -{% endif %} -fi - -mkdir -p $LOCAL_WORKING_DIR -# TODO(gcerami) parametrize hosts -cp {{ tripleo_root }}/tripleo-ci/toci-quickstart/config/testenv/{{ environment_infra }}_hosts $LOCAL_WORKING_DIR/hosts -pushd {{ tripleo_root }}/tripleo-quickstart/ - -$QUICKSTART_PREPARE_CMD -$QUICKSTART_VENV_CMD - -# Only ansible-playbook command will be used from this point forward, so we -# need some variables from quickstart.sh -OOOQ_DIR={{ tripleo_root }}/tripleo-quickstart/ -export OPT_WORKDIR=$LOCAL_WORKING_DIR -export ANSIBLE_CONFIG=$OOOQ_DIR/ansible.cfg -export ANSIBLE_COLLECTIONS_PATHS="$OPT_WORKDIR/share/ansible/collections:~/.ansible/collections:/usr/share/ansible/collections" -export ARA_DATABASE="sqlite:///${LOCAL_WORKING_DIR}/ara.sqlite" -export VIRTUAL_ENV_DISABLE_PROMPT=1 -# Workaround for virtualenv issue https://github.com/pypa/virtualenv/issues/1029 -set +u -source $LOCAL_WORKING_DIR/bin/activate -set -u -source $OOOQ_DIR/ansible_ssh_env.sh - -# Debug step capture env variables -{% if dryrun|default(false)|bool %} - echo "-- Capture Environment Variables Used ---------" - echo "$(env)" | tee -a $LOGS_DIR/toci_env_args_output.log - declare -p | tee -a $LOGS_DIR/toci_env_args_output.log -{% endif %} - -echo "-- Playbooks Output --------------------------" -for playbook in {{ " ".join(playbooks) }}; do - echo "$QUICKSTART_INSTALL_CMD \ - ${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG} \ - {{ nodes_args }} \ - {{ featureset_conf }} \ - {{ env_vars }} \ - {{ role_vars }} \ - {{ extra_vars }} \ - {{ vxlan_vars }} {{ quickstart_verbosity|default('') }} \ - $DEFAULT_ARGS \ - $LOCAL_WORKING_DIR/playbooks/$playbook ${PLAYBOOKS_ARGS[$playbook]:-}" \ - --extra-vars @{{ workspace }}/logs/zuul-variables.yaml \ - --extra-vars @{{ workspace }}/logs/hostvars-variables.yaml \ - | sed 's/--/\n--/g' \ - | tee -a $LOGS_DIR/playbook_executions.log - echo "# --------------------------------------- " \ - | tee -a $LOGS_DIR/playbook_executions.log -done - -{% if dryrun|default(false)|bool %} - # Bypassing execution, dryrun was set - exit_value=0 -{% else %} - ## LOGS COLLECTION PREPARE - create_collect_logs_script - for playbook in {{ " ".join(playbooks) }}; do - echo ${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG} - $QUICKSTART_INSTALL_CMD \ - ${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG} \ - {{ nodes_args }} \ - {{ featureset_conf }} \ - {{ env_vars }} \ - {{ role_vars }} \ - {{ extra_vars }} \ - {{ vxlan_vars }} {{ quickstart_verbosity|default('') }} \ - $DEFAULT_ARGS \ - --extra-vars @{{ workspace }}/logs/zuul-variables.yaml \ - --extra-vars @{{ workspace }}/logs/hostvars-variables.yaml \ - $LOCAL_WORKING_DIR/playbooks/$playbook ${PLAYBOOKS_ARGS[$playbook]:-} \ - 2>&1 | tee -a $LOGS_DIR/quickstart_install.log && exit_value=0 || exit_value=$? - - # Print status of playbook run - [[ "$exit_value" == 0 ]] && echo "Playbook run of $playbook passed successfully" - [[ "$exit_value" != 0 ]] && echo "Playbook run of $playbook failed" && break - done - [[ "$exit_value" == 0 ]] && echo "Playbook run passed successfully" || echo "Playbook run failed" - -{% endif %} - -echo 'Quickstart completed.' -{% if force_job_failure|default(false) %}echo "Quickstart completed with exit code $exit_value but forcing failure with exit 1" -exit 1{% else %} -exit $exit_value{% endif %} diff --git a/roles/tripleo-build-jobs-repos/defaults/main.yaml b/roles/tripleo-build-jobs-repos/defaults/main.yaml deleted file mode 100644 index 3a5d039d6..000000000 --- a/roles/tripleo-build-jobs-repos/defaults/main.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -rpm_packages: - - git - - python3 - - python3-libselinux - - python3-setuptools -# - python3-venv diff --git a/roles/tripleo-build-jobs-repos/tasks/load-vars.yaml b/roles/tripleo-build-jobs-repos/tasks/load-vars.yaml deleted file mode 100644 index 46e108688..000000000 --- a/roles/tripleo-build-jobs-repos/tasks/load-vars.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- name: Set the ci_branch fact - include_role: - name: build-containers - tasks_from: set_ci_branch - -- name: Get ci-common-vars - include_role: - name: ci-common-vars - -- name: Set facts for release_file_name - set_fact: - release_file_name: "{{ 'promotion-testing-hash-' + ci_branch + '.yml' if 'periodic' in zuul.job else ci_branch + '.yml' }}" - t_q_release_dir: "{{ tripleo_quickstart_dir }}/config/release/tripleo-ci/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}" - whole_disk_images: true - enable_opstools_repo: true # for collectd container build - cacheable: true - -- name: "fetch {{ release_file_name }} into ansible executor work_root" - fetch: - src: "{{ t_q_release_dir }}/{{ release_file_name }}" - dest: "{{ zuul.executor.work_root }}/" - flat: true - -- name: Load vars from release file - include_vars: - file: "{{ zuul.executor.work_root }}/{{ release_file_name }}" - -- name: "Load dependency-ci vars when 'dependency' is defined" - block: - - name: Set dependency facts - set_fact: - t_q_dependency_dir: "{{ tripleo_quickstart_dir }}/config/release/dependency_ci/{{ job.dependency|default(dependency) }}" - - - name: "fetch dependency {{ job.dependency }} file into ansible executor work_root" - fetch: - src: "{{ t_q_dependency_dir }}/repo_config.yaml" - dest: "{{ zuul.executor.work_root }}/" - flat: true - - - name: Load vars from dependency file - include_vars: - file: "{{ zuul.executor.work_root }}/repo_config.yaml" - when: job.dependency is defined or dependency is defined diff --git a/roles/tripleo-build-jobs-repos/tasks/main.yaml b/roles/tripleo-build-jobs-repos/tasks/main.yaml deleted file mode 100644 index ebc91b31d..000000000 --- a/roles/tripleo-build-jobs-repos/tasks/main.yaml +++ /dev/null @@ -1,56 +0,0 @@ ---- -- name: Install system packages - become: true - package: - name: "{{ rpm_packages }}" - state: present - -- name: Load vars from release file and set facts needed for repo-setup - include_tasks: load-vars.yaml - -- name: Remove pip package if already installed - become: true - package: - name: python3-pip - state: absent - when: ansible_distribution_major_version is version('8', '>') - -- name: Get pip needed for tripleo-repos installation - include_role: - name: ensure-pip - vars: - ensure_pip_from_packages: false - ensure_pip_from_upstream: true - -- name: install tripleo-repos from git checkout - shell: | - pushd "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-repos'].src_dir }}" - python3 setup.py install --user - popd - failed_when: false - changed_when: true - -- name: install tripleo-repos as superuser to be available for yum-config module - become: true - shell: | - pushd "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-repos'].src_dir }}" - python3 setup.py install - popd - failed_when: false - changed_when: true - when: use_yum_config_module is defined and use_yum_config_module|bool - -- name: Include repo-setup role - include_role: - name: repo-setup - vars: - repo_setup_dir: "{{ workspace }}" - repo_setup_use_collections: false - -- name: Install python3-tripleoclient python3-virtualenv - become: true - package: - name: - - python3-virtualenv - - python3-tripleoclient - state: latest diff --git a/roles/tripleo-ci-post/README.rst b/roles/tripleo-ci-post/README.rst deleted file mode 100644 index 29b6d7ee7..000000000 --- a/roles/tripleo-ci-post/README.rst +++ /dev/null @@ -1,4 +0,0 @@ -tripleo-ci-post -=============== - -A role to return Zuul job artifacts for Standalone and Multinode Job. diff --git a/roles/tripleo-ci-post/tasks/main.yaml b/roles/tripleo-ci-post/tasks/main.yaml deleted file mode 100644 index 43119dd27..000000000 --- a/roles/tripleo-ci-post/tasks/main.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- import_tasks: post-artifact-mult.yml - when: - - environment_type is defined and environment_type == "multinode" - - ansible_distribution_major_version is version(8, '>=') - -- import_tasks: post-artifact-sa.yml - when: - - environment_type is defined and environment_type == "standalone" - - ansible_distribution_major_version is version(8, '>=') diff --git a/roles/tripleo-ci-post/tasks/post-artifact-mult.yml b/roles/tripleo-ci-post/tasks/post-artifact-mult.yml deleted file mode 100644 index de2e731e1..000000000 --- a/roles/tripleo-ci-post/tasks/post-artifact-mult.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- name: Return artifact for Multinode Jobs - zuul_return: - data: - zuul: - artifacts: - - name: Undercloud deploy log - url: logs/undercloud/home/zuul/undercloud_install.log - - name: Overcloud deploy log - url: logs/undercloud/home/zuul/overcloud_deploy.log - - name: Tempest results - url: logs/stackviz/index.html#/testrepository.subunit - - name: All logs file in home dir - url: logs/undercloud/home/zuul/ - - name: Extra logs - url: logs/undercloud/var/log/extra/index.html - - name: Errors file - url: logs/undercloud/var/log/extra/errors.txt - - name: Delorean build logs - url: logs/delorean_logs/ - - name: System logs for each container - url: logs/undercloud/var/log/containers/ - - name: Podman container setup configuration and setup logs - url: logs/undercloud/var/log/extra/podman/ - - name: Container download, container update and provision log - url: logs/undercloud/var/log/tripleo-container-image-prepare.log diff --git a/roles/tripleo-ci-post/tasks/post-artifact-sa.yml b/roles/tripleo-ci-post/tasks/post-artifact-sa.yml deleted file mode 100644 index d38cb1c5d..000000000 --- a/roles/tripleo-ci-post/tasks/post-artifact-sa.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: Return artifacts for standalone jobs - zuul_return: - data: - zuul: - artifacts: - - name: Standalone deploy log - url: logs/undercloud/home/zuul/standalone_deploy.log - - name: All logs file in home dir - url: logs/undercloud/home/zuul/ - - name: Tempest results - url: logs/stackviz/index.html#/testrepository.subunit - - name: Extra logs - url: logs/undercloud/var/log/extra/index.html - - name: Errors file - url: logs/undercloud/var/log/extra/errors.txt - - name: Delorean build logs - url: logs/delorean_logs/ - - name: System logs for each container - url: logs/undercloud/var/log/containers/ - - name: Podman container setup configuration and setup logs - url: logs/undercloud/var/log/extra/podman/ - - name: Container download, container update and provision log - url: logs/undercloud/var/log/tripleo-container-image-prepare.log diff --git a/roles/tripleo-repos/README.rst b/roles/tripleo-repos/README.rst deleted file mode 100644 index a96fb306a..000000000 --- a/roles/tripleo-repos/README.rst +++ /dev/null @@ -1,54 +0,0 @@ -tripleo-repos -============= - -A role to install and run tripleo-repos to setup the CentOS and RDO yum -repositories. - -Role Variables --------------- - -.. list-table:: Variables used for chrony - :widths: auto - :header-rows: 1 - - * - Name - - Default Value - - Description - * - `tripleo_repos_repository` - - `git+https://opendev.org/openstack/tripleo-repos` - - Git repository to pip install tripleo-repos from - * - `workspace` - - `ansible_user_dir` - - Workspace directory to put the venv into - * - `centos_mirror_host` - - `http://mirror.centos.org` - - Mirror host for CentOS repositories - * - `rdo_mirror_host` - - `https://trunk.rdoproject.org` - - Mirror host for RDO repositories - -Requirements ------------- - - - ansible >= 2.4 - - python >= 2.6 - -Dependencies ------------- - -None - -Example Playbooks ------------------ - -.. code-block:: - - - hosts: localhost - become: true - roles: - - tripleo-repos - -License -------- - -Apache 2.0 diff --git a/roles/tripleo-repos/defaults/main.yml b/roles/tripleo-repos/defaults/main.yml deleted file mode 100644 index 72b775746..000000000 --- a/roles/tripleo-repos/defaults/main.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -# defaults file for tripleo-repos -tripleo_repos_repository: "git+https://opendev.org/openstack/tripleo-repos" -workspace: "{{ ansible_user_dir }}" -centos_mirror_host: "http://mirror.centos.org" -fedora_mirror_host: "https://mirrors.fedoraproject.org" -rdo_mirror_host: "https://trunk.rdoproject.org" -override_repos: "" -rpm_packages: - - git - - python3-libselinux - - python3-pip - - python3-setuptools - - python3-virtualenv diff --git a/roles/tripleo-repos/handlers/main.yml b/roles/tripleo-repos/handlers/main.yml deleted file mode 100644 index be48023df..000000000 --- a/roles/tripleo-repos/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for tripleo-repos diff --git a/roles/tripleo-repos/meta/main.yml b/roles/tripleo-repos/meta/main.yml deleted file mode 100644 index efecf7dbf..000000000 --- a/roles/tripleo-repos/meta/main.yml +++ /dev/null @@ -1,61 +0,0 @@ ---- -collections: - - community.general # for ini_file -galaxy_info: - author: Alex Schultz - description: Role to run tripleo-repos - role_name: tripleo_repos - namespace: tripleo - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Some suggested licenses: - # - BSD (default) - # - MIT - # - GPLv2 - # - GPLv3 - # - Apache - # - CC-BY - license: Apache - - min_ansible_version: 2.4 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # Optionally specify the branch Galaxy will use when accessing the GitHub - # repo for this role. During role install, if no tags are available, - # Galaxy will use this branch. During import Galaxy will access files on - # this branch. If Travis integration is configured, only notifications for this - # branch will be accepted. Otherwise, in all cases, the repo's default branch - # (usually master) will be used. - # github_branch: - - # - # platforms is a list of platforms, and each platform has a name and a list of versions. - # - platforms: - - name: Fedora - # versions: - # - all - # - 25 - - name: CentOS - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] -# List your role dependencies here, one per line. Be sure to remove the '[]' above, -# if you add dependencies to this list. diff --git a/roles/tripleo-repos/molecule/default/converge.yml b/roles/tripleo-repos/molecule/default/converge.yml deleted file mode 100644 index 82ac4077c..000000000 --- a/roles/tripleo-repos/molecule/default/converge.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Converge - hosts: all - tasks: - - - name: import tripleo-repos role - include_role: - name: tripleo-repos - - - name: validate that we can install openstack-tripleo-common # noqa package-latest - package: - name: openstack-tripleo-common - state: latest diff --git a/roles/tripleo-repos/molecule/default/molecule.yml b/roles/tripleo-repos/molecule/default/molecule.yml deleted file mode 100644 index dc3447937..000000000 --- a/roles/tripleo-repos/molecule/default/molecule.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# The MOLECULE_ vars used here are not officialy endorsed by molecule, but we -# hope a future version will add implicit support for them. -driver: - name: docker -log: true -platforms: - - - name: stream8 - hostname: stream8 - # image below is based on official quay.io/centos/centos:stream8 but - # it has python preinstalled on it. - image: quay.io/pycontribs/centos:stream8 - pre_build_image: true - # pull: true - -provisioner: - name: ansible diff --git a/roles/tripleo-repos/molecule/default/prepare.yml b/roles/tripleo-repos/molecule/default/prepare.yml deleted file mode 100644 index d4567f341..000000000 --- a/roles/tripleo-repos/molecule/default/prepare.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- hosts: all - tasks: - - - name: Remove EPEL repository (and clean up left-over metadata) - package: - name: epel-release - state: absent - notify: yum-clean-metadata - - handlers: - - name: yum-clean-metadata - command: yum clean metadata - args: - warn: false diff --git a/roles/tripleo-repos/tasks/main.yml b/roles/tripleo-repos/tasks/main.yml deleted file mode 100644 index 567ec04db..000000000 --- a/roles/tripleo-repos/tasks/main.yml +++ /dev/null @@ -1,138 +0,0 @@ ---- -- name: Install and enable epel (centos7/rhel7) - block: - - name: Install epel-release - package: - name: epel-release - state: present - - name: Ensure EPEL repo is enabled - ini_file: - dest: /etc/yum.repos.d/epel.repo - section: epel - option: enabled - value: '1' - mode: 0644 - become: true - when: ansible_distribution_major_version|int == 7 - -- name: install system packages - become: true - package: - name: "{{ rpm_packages }}" - state: present - -- name: pip install tripleo-repos - become: true - pip: - name: "{{ tripleo_repos_repository }}" - virtualenv: "{{ workspace }}/venv" - # https://github.com/ansible/ansible/issues/52275 - virtualenv_command: "/usr/bin/python3 -m venv" - virtualenv_site_packages: true - # NOTE(rfolco): we need to set both virtualenv_command and - # ansible_python_interpreter, otherwise we hit this error: - # Failed to import the required Python library (setuptools) - # This happens in a dual python env like centos7.8 - vars: - ansible_python_interpreter: /usr/bin/python3 - -- name: Ensure EPEL repo is disabled - become: true - when: ansible_distribution_major_version|int == 7 - ini_file: - dest: /etc/yum.repos.d/epel.repo - section: epel - option: enabled - value: '0' - mode: 0644 - -- name: Set branch for building containers check jobs - set_fact: - ci_branch: "{{ zuul.branch | regex_replace('(stable|cloudsig)/', '') }}" - when: zuul is defined - -- name: Set branch for building containers branchless - set_fact: - ci_branch: "{{ branch_override | regex_replace('(stable|cloudsig)/', '') }}" - when: branch_override is defined - -- name: Set branch for building containers periodic - set_fact: - ci_branch: "{{ release }}" - when: release is defined - -- name: Get /etc/os-release name - shell: 'source /etc/os-release && echo -e -n "$NAME"' - changed_when: false - register: os_name_output - -- name: Set stream false - set_fact: - is_stream_node: false - -- name: Set stream true if stream node - set_fact: - is_stream_node: true - when: "os_name_output.stdout_lines[0]| regex_search('(S|s)tream$')" - -- name: Install repos - become: true - shell: | - set -exo pipefail - source {{ workspace }}/venv/bin/activate - if [ -f /etc/ci/mirror_info.sh ]; then - source /etc/ci/mirror_info.sh - DISTRO_MIRROR_HOST="http://${NODEPOOL_MIRROR_HOST}" - fi - {% if ansible_distribution | lower == 'fedora' %} - DISTRO_MIRROR_HOST=${DISTRO_MIRROR_HOST:-"{{ fedora_mirror_host }}"} - {% elif ansible_distribution | lower == 'centos' %} - DISTRO_MIRROR_HOST=${DISTRO_MIRROR_HOST:-"{{ centos_mirror_host }}"} - {% endif %} - RDO_MIRROR_HOST=${NODEPOOL_RDO_PROXY:-"{{ rdo_mirror_host }}"} - - if [ "{{ override_repos }}" != "" ]; then - REPO="{{ override_repos }}" - elif [ "{{ ci_branch | default('master') }}" == "master" ]; then - REPO=current-tripleo - else - REPO=current - fi - - if [ ! -z "$DISTRO_MIRROR_HOST" ]; then - MIRROR="--mirror $DISTRO_MIRROR_HOST" - - # Workaround for setting nodepool centos mirror for delorean-deps - # check launchpad tripleo/+bug/1922032 - else - MIRROR="--mirror http://mirror.regionone.vexxhost.rdoproject.org/centos" - fi - - if [ "{{ is_stream_node|string }}" == "True" ]; then - tripleo-repos \ - -b "{{ ci_branch | default('master') }}" \ - $MIRROR \ - --rdo-mirror $RDO_MIRROR_HOST $REPO ceph opstools \ - --stream - else - tripleo-repos \ - -b "{{ ci_branch | default('master') }}" \ - $MIRROR \ - --rdo-mirror $RDO_MIRROR_HOST $REPO ceph opstools \ - --no-stream - fi - register: result - when: ansible_distribution_major_version is version(8, '<=') - changed_when: "'Installed:' in result.stdout_lines" - args: - warn: false - -- name: Print out the stdout of result - debug: - msg: "{{ result }}" - -- name: Update all installed packages after new repos are setup # noqa package-latest - become: true - package: - name: '*' - state: latest diff --git a/roles/tripleo-repos/tests/inventory b/roles/tripleo-repos/tests/inventory deleted file mode 100644 index 2fbb50c4a..000000000 --- a/roles/tripleo-repos/tests/inventory +++ /dev/null @@ -1 +0,0 @@ -localhost diff --git a/roles/tripleo-repos/tests/test.yml b/roles/tripleo-repos/tests/test.yml deleted file mode 100644 index 54d54bd0f..000000000 --- a/roles/tripleo-repos/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - tripleo-repos diff --git a/roles/tripleo-repos/vars/main.yml b/roles/tripleo-repos/vars/main.yml deleted file mode 100644 index d2cc024b2..000000000 --- a/roles/tripleo-repos/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for tripleo-repos diff --git a/scripts/bmc-template/bmc-template.sh b/scripts/bmc-template/bmc-template.sh deleted file mode 100755 index a00ff88c3..000000000 --- a/scripts/bmc-template/bmc-template.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# taken from openstack-virtual-baremetal/bin/install_openstackbmc.sh -yum -y update centos-release # required for rdo-release install to work -yum install -y https://rdo.fedorapeople.org/rdo-release.rpm -yum install -y python-pip python-crypto os-net-config python-novaclient python-neutronclient git jq -pip install pyghmi - -# the CI cloud is using a unsafe disk caching mode, so this sync will be ignored by the host -# we're syncing data on the VM, then give the host 5 seconds to write it to disk and hope its long enough -sync -sleep 5 - -touch /var/tmp/ready diff --git a/scripts/common_functions.sh b/scripts/common_functions.sh deleted file mode 100755 index 5d11de019..000000000 --- a/scripts/common_functions.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -# Tripleo CI functions - -# Revert a commit for tripleo ci -# $1 : project name e.g. nova -# $2 : hash id of commit to revert -# $3 : bug id of reason for revert (used to skip revert if found in commit -# that triggers ci). -function temprevert { - # Before reverting check to ensure this isn't the related fix - if git --git-dir=$TRIPLEO_ROOT/${ZUUL_PROJECT#*/}/.git log -1 | grep -iE "bug.*$3" ; then - echo "Skipping temprevert because bug fix $3 was found in git message." - return 0 - fi - - pushd $TRIPLEO_ROOT/$1 - # Abort on fail so we're not left in a conflict state - git revert --no-edit $2 || git revert --abort || true - popd - DELOREAN_BUILD_REFS="${DELOREAN_BUILD_REFS:-} $1" -} - -# Pin to a commit for tripleo ci -# $1 : project name e.g. nova -# $2 : hash id of commit to pin too -# $3 : bug id of reason for the pin (used to skip revert if found in commit -# that triggers ci). -function pin { - # Before reverting check to ensure this isn't the related fix - if git --git-dir=$TRIPLEO_ROOT/${ZUUL_PROJECT#*/}/.git log -1 | grep -iE "bug.*$3" ; then - echo "Skipping pin because bug fix $3 was found in git message." - return 0 - fi - - pushd $TRIPLEO_ROOT/$1 - git reset --hard $2 - popd - DELOREAN_BUILD_REFS="${DELOREAN_BUILD_REFS:-} $1" -} - -# Cherry-pick a commit for tripleo ci -# $1 : project name e.g. nova -# $2 : Gerrit refspec to cherry pick -# $3 : bug id of reason for the cherry pick (used to skip cherry pick if found -# in commit that triggers ci). -function cherrypick { - local PROJ_NAME=$1 - local REFSPEC=$2 - - # Before cherrypicking check to ensure this isn't the related fix - if git --git-dir=$TRIPLEO_ROOT/${ZUUL_PROJECT#*/}/.git log -1 | grep -iE "bug.*$3" ; then - echo "Skipping cherrypick because bug fix $3 was found in git message." - return 0 - fi - - pushd $TRIPLEO_ROOT/$PROJ_NAME - git fetch https://review.opendev.org/openstack/$PROJ_NAME "$REFSPEC" - # Abort on fail so we're not left in a conflict state - git cherry-pick FETCH_HEAD || git cherry-pick --abort - popd - DELOREAN_BUILD_REFS="${DELOREAN_BUILD_REFS:-} $1" - - # Export a DIB_REPOREF variable as well - export DIB_REPOREF_${PROJ_NAME//-/_}=$REFSPEC - -} - -# echo's out a project name from a ref -# $1 : e.g. openstack/nova:master:refs/changes/87/64787/3 returns nova -function filterref { - PROJ=${1%%:*} - PROJ=${PROJ##*/} - echo $PROJ -} - -function layer_ci_repo { - # Find the path to the trunk repository used - TRUNKREPOUSED=$(grep -Eo "[0-9a-z]{2}/[0-9a-z]{2}/[0-9a-z]{40}_[0-9a-z]+" /etc/yum.repos.d/delorean.repo) - - # Layer the ci repository on top of it - sudo wget http://$MY_IP:8766/current/delorean-ci.repo -O /etc/yum.repos.d/delorean-ci.repo - # rewrite the baseurl in delorean-ci.repo as its currently pointing a https://trunk.rdoproject.org/.. - sudo sed -i -e "s%baseurl=.*%baseurl=http://$MY_IP:8766/current/%" /etc/yum.repos.d/delorean-ci.repo - sudo sed -i -e 's%priority=.*%priority=1%' /etc/yum.repos.d/delorean-ci.repo -} - - -function echo_vars_to_deploy_env { - CALLER=$(caller) - echo "# Written via echo_vars_to_deploy_env from $CALLER" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env - for VAR in NODEPOOL_CBS_CENTOS_PROXY NODEPOOL_CENTOS_MIRROR http_proxy INTROSPECT MY_IP no_proxy NODECOUNT OVERCLOUD_DEPLOY_ARGS OVERCLOUD_UPDATE_ARGS PACEMAKER SSH_OPTIONS STABLE_RELEASE TRIPLEO_ROOT TRIPLEO_SH_ARGS NETISO_V4 NETISO_V6 TOCI_JOBTYPE UNDERCLOUD_SSL UNDERCLOUD_HEAT_CONVERGENCE RUN_TEMPEST_TESTS JOB_NAME OVB UNDERCLOUD_IDEMPOTENT MULTINODE CONTROLLER_HOSTS COMPUTE_HOSTS SUBNODES_SSH_KEY TEST_OVERCLOUD_DELETE OVERCLOUD OSINFRA UNDERCLOUD_SANITY_CHECK FEATURE_BRANCH OVERCLOUD_ROLES UPGRADE_RELEASE OVERCLOUD_MAJOR_UPGRADE MAJOR_UPGRADE UNDERCLOUD_MAJOR_UPGRADE CA_SERVER UNDERCLOUD_TELEMETRY UNDERCLOUD_UI UNDERCLOUD_VALIDATIONS PREDICTABLE_PLACEMENT OPSTOOLS_REPO_ENABLED UPGRADE_ENV BOOTSTRAP_SUBNODES_MINIMAL MULTINODE_ENV_PATH; do - if [ -n "${!VAR:+x}" ]; then - echo "export $VAR=\"${!VAR}\"" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env - fi - done - for role in $OVERCLOUD_ROLES; do - eval hosts=\${${role}_hosts} - echo "export ${role}_hosts=\"${hosts}\"" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env - done -} diff --git a/scripts/compare-reviews.py b/scripts/compare-reviews.py deleted file mode 100755 index e81f2341a..000000000 --- a/scripts/compare-reviews.py +++ /dev/null @@ -1,158 +0,0 @@ -#!/usr/bin/env python - -import argparse -import difflib -import json -import os -import requests - -from colorama import Fore -from colorama import init - -GERRIT_DETAIL_API = "https://review.opendev.org/changes/{}/detail" -GERRIT_USER_NAME = "zuul" -ZUUL_PIPELINE = "check" - - -def parse_ci_message(message): - """Convert zuul's gerrit message into a dict - - Dictionary contains job name as key and job url as value - """ - - jobs = {} - for line in message.split("\n"): - if line[:1] == '-': - splitted_line = line.split() - jobs[splitted_line[1]] = splitted_line[2] - return jobs - - -def get_file(logs_url, file): - """Download a file from logs server for this job""" - - response = requests.get(logs_url + '/logs/' + file) - if response.ok: - return response.content - return None - - -def get_last_jobs(change): - """Get the last CI jobs execution at check pipeline for this review""" - patchset = None - if '/' in change: - change_patchset = change.split('/') - change = change_patchset[0] - patchset = change_patchset[1] - - last_jobs = {} - detail_url = GERRIT_DETAIL_API.format(change) - response = requests.get(detail_url) - if response.ok: - sanitized_content = "\n".join(response.content.split("\n")[1:]) - detail = json.loads(sanitized_content) - zuul_messages = [ - message - for message in detail['messages'] - if message['author']['username'] == GERRIT_USER_NAME - and "({} pipeline)".format(ZUUL_PIPELINE) in message['message'] - ] - - if patchset: - patchset = "Patch Set {}".format(patchset) - filtered = [m for m in zuul_messages if patchset in m['message']] - if len(filtered) == 0: - raise RuntimeError( - "{} not found for review {}".format(patchset, change) - ) - last_message = filtered[0] - else: - last_message = zuul_messages[-1] - - last_jobs = parse_ci_message(last_message['message']) - date = last_message['date'] - else: - raise RuntimeError(response.content) - return last_jobs, date - - -def download(jobs, file_path): - """Download a file from all the specified jobs - - Return them as a dictionary with job name as key and file content as value - """ - downloaded_files = {} - for job, logs in jobs.iteritems(): - downloaded_file = get_file(logs, file_path) - if downloaded_file: - downloaded_files[job] = downloaded_file - else: - print("WARNING: {} not found at {}".format(file_path, job)) - return downloaded_files - - -def is_equal(lho_jobs, rho_jobs, file_path): - """Prints differences of file_path between the lho and rho job sets""" - - lho_files = download(lho_jobs, file_path) - rho_files = download(rho_jobs, file_path) - print(">>>>>>> Comparing {}".format(file_path)) - if lho_files != rho_files: - diffkeys = [k for k in lho_files if lho_files[k] != rho_files.get(k, None)] - print("{} are different at the following jobs:".format(file_path)) - for key in diffkeys: - print(Fore.BLUE + key) - print(Fore.BLUE + lho + ": " + lho_jobs[key]) - print(Fore.BLUE + rho + ": " + rho_jobs[key]) - for line in difflib.unified_diff( - lho_files[key].splitlines(), rho_files.get(key, '').splitlines() - ): - print(colors.get(line[0], Fore.BLACK) + line) - return False - print("{} files are the same".format(file_path)) - return True - - -if __name__ == '__main__': - parser = argparse.ArgumentParser( - description='Compares files at logs.o.o from two reviews' - ) - - parser.add_argument( - 'reviews', - metavar='review', - nargs=2, - help='left-side and right-side review numbers to compare it can' - 'include the specific patchset, examples:610491 or 610491/1', - ) - - parser.add_argument( - '--files', - type=str, - default='playbook_executions.log,reproducer-quickstart.sh,' 'collect_logs.sh', - help='Comma separated list of files to compare at logs.o.o ' - '(default: %(default)s)', - ) - - args = parser.parse_args() - - colors = {'-': Fore.RED, '+': Fore.GREEN, '@': Fore.YELLOW} - - # When piping colors are disabled unless you define PY_COLORS variable. - strip = os.environ.get('PY_COLORS', '0') != '1' - init(autoreset=True, strip=strip) - lho = args.reviews[0] - rho = args.reviews[1] - lho_jobs, lho_date = get_last_jobs(lho) - rho_jobs, rho_date = get_last_jobs(rho) - - # Compare only the job at both reviews - jobs_intersection = set(lho_jobs.keys()) & set(rho_jobs.keys()) - lho_jobs = {job: lho_jobs[job] for job in jobs_intersection} - rho_jobs = {job: rho_jobs[job] for job in jobs_intersection} - - print("- {}, {}".format(lho, lho_date)) - print("+ {}, {}".format(rho, rho_date)) - - for file_to_compare in args.files.split(','): - is_equal(lho_jobs, rho_jobs, file_to_compare) diff --git a/scripts/emit_releases_file/emit_releases_file.py b/scripts/emit_releases_file/emit_releases_file.py deleted file mode 100644 index 61170d35f..000000000 --- a/scripts/emit_releases_file/emit_releases_file.py +++ /dev/null @@ -1,579 +0,0 @@ -""" -Helper script that generates environmental variables for upgrade/update. - -From the stable-release parameter it calculate environmental variables -for mixed release. - -It exports those environmental variables in the OUTPUT_FILE: - - - UNDERCLOUD_INSTALL_RELEASE - - UNDERCLOUD_INSTALL_HASH - - UNDERCLOUD_TARGET_RELEASE - - UNDERCLOUD_TARGET_HASH - - OVERCLOUD_DEPLOY_RELEASE - - OVERCLOUD_DEPLOY_HASH - - OVERCLOUD_TARGET_RELEASE - - OVERCLOUD_TARGET_HASH - - STANDALONE_DEPLOY_RELEASE - - STANDALONE_DEPLOY_NEWEST_HASH - - STANDALONE_DEPLOY_HASH - - STANDALONE_TARGET_RELEASE - - STANDALONE_TARGET_NEWEST_HASH - - STANDALONE_TARGET_HASH - -""" -import argparse -import logging -import logging.handlers -import os -import re -import requests -import yaml -from typing import Dict - -# TODO(pojadhav): remove ussuri, victoria once we EOL victoria -# Define releases -RELEASES = [ - 'train', - 'ussuri', - 'victoria', - 'wallaby', - 'zed', - 'master', -] -# Define long term releases -LONG_TERM_SUPPORT_RELEASES = ['train', 'wallaby'] - -# NAMED DLRN HASHES -CURRENT_HASH_NAME = 'current-tripleo' -NEWEST_HASH_NAME = 'current' -PROMOTION_HASH_NAME = 'tripleo-ci-testing' -PREVIOUS_HASH_NAME = 'previous-current-tripleo' - - -def get_relative_release(release, relative_idx): - current_idx = RELEASES.index(release) - absolute_idx = current_idx + relative_idx - return RELEASES[absolute_idx] - - -def setup_logging(log_file): - '''Setup logging for the script''' - logger = logging.getLogger('emit-releases') - logger.setLevel(logging.DEBUG) - log_handler = logging.handlers.WatchedFileHandler(os.path.expanduser(log_file)) - logger.addHandler(log_handler) - - -def load_featureset_file(featureset_file): - logger = logging.getLogger('emit-releases') - try: - with open(featureset_file, 'r') as stream: - featureset = yaml.safe_load(stream) - except Exception as e: - logger.error( - "The featureset file: {} can not be " "opened.".format(featureset_file) - ) - logger.exception(e) - raise e - return featureset - - -def get_dlrn_hash( - release, hash_name, distro_name='centos', distro_version='7', retries=20, timeout=8 -): - """Get the dlrn hash for the release and hash name - - Retrieves the delorean.repo for the provided release and hash name, e.g. - https://trunk.rdoproject.org/centos7-master/current/delorean.repo for - master and current. The hash is taken from the repo file contents - and returned. - :param distro_name: Distro name - :param distro_version: Distro version - """ - logger = logging.getLogger('emit-releases') - full_hash_pattern = re.compile('[a-z,0-9]{40}_[a-z,0-9]{8}') - rdo_url = os.getenv('NODEPOOL_RDO_PROXY', 'https://trunk.rdoproject.org') - logger.error("distro %s version %s", distro_name, distro_version) - if distro_name == 'centos' and distro_version == '7': - repo_url = '%s/centos7-%s/%s/delorean.repo' % (rdo_url, release, hash_name) - elif distro_name == 'centos' and distro_version in ['8', '9']: - repo_url = '%s/centos%s-%s/%s/delorean.repo.md5' % ( - rdo_url, - distro_version, - release, - hash_name, - ) - logger.debug( - "distro_name {} distro_version {} repo_url {}" - "".format(distro_name, distro_version, repo_url) - ) - for retry_num in range(retries): - repo_file = None - try: - repo_file = requests.get(repo_url, timeout=timeout) - except Exception as e: - logger.warning( - "Attempt {} of {} to get DLRN hash threw an " - "exception.".format(retry_num + 1, retries) - ) - logger.exception(e) - continue - if repo_file is not None and repo_file.ok: - if distro_name == 'centos' and distro_version == '7': - print(repo_file.text) - full_hash = full_hash_pattern.findall(repo_file.text)[0] - elif distro_name == 'centos' and distro_version in ['8', '9']: - full_hash = repo_file.text - break - - elif repo_file: - logger.warning( - "Attempt {} of {} to get DLRN hash returned " - "status code {}.".format(retry_num + 1, retries, repo_file.status_code) - ) - else: - logger.warning( - "Attempt {} of {} to get DLRN hash failed to " - "get a response.".format(retry_num + 1, retries) - ) - - if repo_file is None or not repo_file.ok: - raise RuntimeError( - "Failed to retrieve repo file from {} after " - "{} retries".format(repo_url, retries) - ) - - logger.info( - "Got DLRN hash: {} for the named hash: {} on the {} " - "release".format(full_hash, hash_name, release) - ) - return full_hash - - -def compose_releases_dictionary( - stable_release, - featureset, - upgrade_from, - is_periodic=False, - distro_name='centos', - distro_version='7', - target_branch_override=None, - install_branch_override=None, - content_provider_hashes=None, -): - """Compose the release dictionary for stable_release and featureset - - This contains the main logic determining the contents of the release file. - - First perform some validations on the input - ensure the release is - supported and the featureset doesn't contain conflicting directives - like both overcloud_upgrade and undercloud_upgrade. - - The provided stable_release set as the target, and then the featureset - determines the type of upgrade. This is used to determine the deploy - release and hash/teg relative to the target: - * Standalone, Undercloud and Overcloud Upgrade: deploy current-tripleo - of previous release to stable_release and upgrade to current of - stable_release - * Overcloud FFWDUpgrade: as above, except deploy is set to - tripleo-ci-testing of 3 previous releases from stable_release - :param distro_name: Distro name - :param distro_version: Distro version - """ - logger = logging.getLogger('emit-releases') - if stable_release not in RELEASES: - raise RuntimeError( - "The {} release is not supported by this tool" - "Supported releases: {}".format(stable_release, RELEASES) - ) - - if ( - featureset.get('overcloud_upgrade') or featureset.get('undercloud_upgrade') - ) and stable_release == RELEASES[0]: - raise RuntimeError("Cannot upgrade to {}".format(RELEASES[0])) - - if featureset.get('overcloud_upgrade') and featureset.get('undercloud_upgrade'): - raise RuntimeError( - "This tool currently only supports upgrading the " - "undercloud OR the overcloud NOT both." - ) - - if featureset.get('ffu_undercloud_upgrade') and featureset.get( - 'undercloud_upgrade' - ): - raise RuntimeError( - "Only Fast Forward Undercloud upgrade or single release undercloud " - "upgrade is supported, NOT both at the same time." - ) - - if ( - featureset.get('overcloud_upgrade') or featureset.get('ffu_overcloud_upgrade') - ) and not featureset.get('mixed_upgrade'): - raise RuntimeError("Overcloud upgrade has to be mixed upgrades") - - if ( - featureset.get('ffu_overcloud_upgrade') - or featureset.get('ffu_undercloud_upgrade') - ) and stable_release not in LONG_TERM_SUPPORT_RELEASES: - raise RuntimeError( - "{} is not a long-term support release, and cannot be " - "used in a fast forward upgrade. Current long-term support " - "releases: {}".format(stable_release, LONG_TERM_SUPPORT_RELEASES) - ) - - newest_hash = get_dlrn_hash( - stable_release, NEWEST_HASH_NAME, distro_name, distro_version - ) - if is_periodic: - current_hash = get_dlrn_hash( - stable_release, PROMOTION_HASH_NAME, distro_name, distro_version - ) - elif content_provider_hashes is not None and content_provider_hashes.get( - target_branch_override - ): - current_hash = content_provider_hashes[target_branch_override] - logger.info( - "Using hash override {} from content provider hashes map for branch {}".format( - current_hash, target_branch_override - ) - ) - else: - current_hash = get_dlrn_hash( - stable_release, CURRENT_HASH_NAME, distro_name, distro_version - ) - - releases_dictionary = { - 'undercloud_install_release': stable_release, - 'undercloud_install_hash': current_hash, - 'undercloud_target_release': stable_release, - 'undercloud_target_hash': current_hash, - 'overcloud_deploy_release': stable_release, - 'overcloud_deploy_hash': current_hash, - 'overcloud_target_release': stable_release, - 'overcloud_target_hash': current_hash, - 'standalone_deploy_release': stable_release, - 'standalone_deploy_hash': current_hash, - 'standalone_deploy_newest_hash': newest_hash, - 'standalone_target_release': stable_release, - 'standalone_target_hash': current_hash, - 'standalone_target_newest_hash': newest_hash, - } - - if featureset.get('mixed_upgrade'): - if featureset.get('overcloud_upgrade'): - logger.info('Doing an overcloud upgrade') - deploy_release = get_relative_release(stable_release, -1) - deploy_hash = get_dlrn_hash( - deploy_release, CURRENT_HASH_NAME, distro_name, distro_version - ) - releases_dictionary['overcloud_deploy_release'] = deploy_release - releases_dictionary['overcloud_deploy_hash'] = deploy_hash - - elif featureset.get('ffu_overcloud_upgrade'): - logger.info('Doing an overcloud fast forward upgrade') - deploy_release = get_relative_release(stable_release, -3) - deploy_hash = get_dlrn_hash( - deploy_release, CURRENT_HASH_NAME, distro_name, distro_version - ) - releases_dictionary['overcloud_deploy_release'] = deploy_release - releases_dictionary['overcloud_deploy_hash'] = deploy_hash - - elif featureset.get('undercloud_upgrade') or featureset.get( - 'ffu_undercloud_upgrade' - ): - if featureset.get('undercloud_upgrade'): - logger.info('Doing an undercloud upgrade') - install_release = get_relative_release(stable_release, -1) - else: - logger.info('Doing an undercloud fast forward upgrade') - install_release = get_relative_release(stable_release, -3) - - install_hash = '' - if content_provider_hashes is not None and content_provider_hashes.get( - install_branch_override - ): - install_hash = content_provider_hashes[install_branch_override] - logger.info( - "Using hash override {} for branch {}".format( - install_hash, install_branch_override - ) - ) - else: - install_hash = get_dlrn_hash( - install_release, CURRENT_HASH_NAME, distro_name, distro_version - ) - releases_dictionary['undercloud_install_release'] = install_release - releases_dictionary['undercloud_install_hash'] = install_hash - - elif featureset.get('standalone_upgrade') or featureset.get( - 'ffu_standalone_upgrade' - ): - if featureset.get('standalone_upgrade'): - logger.info('Doing an standalone upgrade') - install_release = get_relative_release(stable_release, -1) - else: - logger.info('Doing an ffu standalone upgrade') - install_release = get_relative_release(stable_release, -3) - install_hash = get_dlrn_hash( - install_release, CURRENT_HASH_NAME, distro_name, distro_version - ) - install_newest_hash = get_dlrn_hash( - install_release, NEWEST_HASH_NAME, distro_name, distro_version - ) - releases_dictionary['standalone_deploy_release'] = install_release - releases_dictionary['standalone_deploy_newest_hash'] = install_newest_hash - releases_dictionary['standalone_deploy_hash'] = install_hash - - elif featureset.get('minor_update'): - if is_periodic: - previous_hash = get_dlrn_hash( - stable_release, PREVIOUS_HASH_NAME, distro_name, distro_version - ) - releases_dictionary['overcloud_deploy_hash'] = previous_hash - else: - target_newest_hash = get_dlrn_hash( - stable_release, NEWEST_HASH_NAME, distro_name, distro_version - ) - releases_dictionary['undercloud_target_hash'] = target_newest_hash - releases_dictionary['overcloud_target_hash'] = target_newest_hash - if content_provider_hashes is not None and content_provider_hashes.get( - install_branch_override - ): - install_hash = content_provider_hashes[install_branch_override] - releases_dictionary['undercloud_install_hash'] = install_hash - releases_dictionary['overcloud_deploy_hash'] = install_hash - if content_provider_hashes is not None and content_provider_hashes.get( - target_branch_override - ): - current_hash = content_provider_hashes[target_branch_override] - releases_dictionary['undercloud_target_hash'] = current_hash - releases_dictionary['overcloud_target_hash'] = current_hash - - elif featureset.get('overcloud_update'): - logger.info('Doing an overcloud update') - previous_hash = get_dlrn_hash( - stable_release, PREVIOUS_HASH_NAME, distro_name, distro_version - ) - releases_dictionary['overcloud_deploy_hash'] = previous_hash - - logger.debug("stable_release: %s, featureset: %s", stable_release, featureset) - - logger.info('output releases: %s', releases_dictionary) - - return releases_dictionary - - -def shim_convert_old_release_names(releases_names, is_periodic): - """Convert release names for mixed upgrade and periodics - - For overcloud upgrade jobs we start with already upgraded undercloud - and use config files named "{{target}}-undercloud-{{deploy}}-overcloud" - like ocata-undercloud-newton-overcloud so we need to set both deploy and - target names to point this release config. - - For periodic jobs the deploy and target config files are in files named - promotion-testing-hash-{{release}} so the deploy and target names are - prefixed with promotion-testing-hash- - """ - # TODO(trown): Remove this shim when we no longer need to use the - # old style double release files. - - # Remove unspected side-effects - modified_releases_name = releases_names.copy() - - oc_deploy_release = releases_names['overcloud_deploy_release'] - oc_target_release = releases_names['overcloud_target_release'] - uc_install_release = releases_names['undercloud_install_release'] - - if oc_deploy_release != oc_target_release: - release_file = "{}-undercloud-{}-overcloud".format( - uc_install_release, oc_deploy_release - ) - modified_releases_name['undercloud_install_release'] = release_file - modified_releases_name['undercloud_target_release'] = release_file - modified_releases_name['overcloud_deploy_release'] = release_file - modified_releases_name['overcloud_target_release'] = release_file - elif is_periodic: - for key in [ - 'undercloud_install_release', - 'undercloud_target_release', - 'overcloud_deploy_release', - 'overcloud_target_release', - 'standalone_deploy_release', - 'standalone_target_release', - ]: - modified_releases_name[key] = ( - "promotion-testing-hash-" + releases_names[key] - ) - - return modified_releases_name - - -def write_releases_dictionary_to_bash( - releases_dictionary: Dict[str, str], bash_file_name -): - logger = logging.getLogger('emit-releases') - # Make it deterministic, expected constants in the proper order - try: - bash_script = '''#!/bin/env bash -export UNDERCLOUD_INSTALL_RELEASE="{undercloud_install_release}" -export UNDERCLOUD_INSTALL_HASH="{undercloud_install_hash}" -export UNDERCLOUD_TARGET_RELEASE="{undercloud_target_release}" -export UNDERCLOUD_TARGET_HASH="{undercloud_target_hash}" -export OVERCLOUD_DEPLOY_RELEASE="{overcloud_deploy_release}" -export OVERCLOUD_DEPLOY_HASH="{overcloud_deploy_hash}" -export OVERCLOUD_TARGET_RELEASE="{overcloud_target_release}" -export OVERCLOUD_TARGET_HASH="{overcloud_target_hash}" -export STANDALONE_DEPLOY_RELEASE="{standalone_deploy_release}" -export STANDALONE_DEPLOY_HASH="{standalone_deploy_hash}" -export STANDALONE_DEPLOY_NEWEST_HASH="{standalone_deploy_newest_hash}" -export STANDALONE_TARGET_RELEASE="{standalone_target_release}" -export STANDALONE_TARGET_NEWEST_HASH="{standalone_target_newest_hash}" -export STANDALONE_TARGET_HASH="{standalone_target_hash}" -'''.format( - **releases_dictionary - ) - with open(bash_file_name, 'w') as bash_file: - bash_file.write(bash_script) - except Exception: - logger.exception("Writting releases dictionary") - return False - return True - - -if __name__ == '__main__': - default_log_file = '{}.log'.format(os.path.basename(__file__)) - default_output_file = '{}.out'.format(os.path.basename(__file__)) - - parser = argparse.ArgumentParser( - formatter_class=argparse.RawTextHelpFormatter, - description='Get a dictionary of releases from a release ' - 'and a featureset file.', - ) - parser.add_argument( - '--stable-release', - choices=RELEASES, - required=True, - help='Release that the change being tested is from.\n' - 'All other releases are calculated from this\n' - 'basis.', - ) - parser.add_argument( - '--distro-name', choices=['centos'], required=True, help='Distribution name' - ) - parser.add_argument( - '--distro-version', - choices=['7', '8', '9'], - required=True, - help='Distribution version', - ) - parser.add_argument( - '--featureset-file', - required=True, - help='Featureset file which will be introspected to\n' - 'infer what type of upgrade is being performed\n' - '(if any).', - ) - parser.add_argument( - '--output-file', - default=default_output_file, - help='Output file containing dictionary of releases\n' - 'for the provided featureset and release.\n' - '(default: %(default)s)', - ) - parser.add_argument( - '--log-file', - default=default_log_file, - help='log file to print debug information from\n' - 'running the script.\n' - '(default: %(default)s)', - ) - parser.add_argument( - '--upgrade-from', - action='store_false', - help='Upgrade FROM the change under test instead\n' - 'of the default of upgrading TO the change\n' - 'under test.', - ) - - parser.add_argument( - '--is-periodic', - action='store_true', - help='Specify if the current running job is periodic', - ) - - parser.add_argument( - '--target-branch-override', - help='Override to use this branch for the target version - required\n' - 'with the --content-provider-hashes argument', - ) - - parser.add_argument( - '--install-branch-override', - help='Override to use this branch for the install version - required\n' - 'with the --content-provider-hashes argument', - ) - - parser.add_argument( - '--content-provider-hashes', - help='A string representing the content provider branches and hashes\n' - 'e.g. master:abcd;wallaby:defg i.e. branch1:hash1;branch2:hash2', - ) - args = parser.parse_args() - - setup_logging(args.log_file) - logger = logging.getLogger('emit-releases') - - featureset = load_featureset_file(args.featureset_file) - - _content_provider_hashes = None - # when overriding with content-provider-hashes we expect to have - # --install-branch-override and --target-branch-override when doing - # undercloud upgrade, and --target only when doing minor update, - # and that these branches exist in the passed content-provider-hashes. - if args.content_provider_hashes: - if args.target_branch_override is None: - raise RuntimeError( - "Missing --target-branch-override or --install-branch-override" - "At least --target is required with --content-provider-hashes" - ) - if ( - args.target_branch_override not in args.content_provider_hashes - and args.install_branch_override not in args.content_provider_hashes - ): - raise RuntimeError( - "The passed content provider hashes ({}) does not contain" - " the branches specified by --target-branch-override ({}) or" - " --install-branch-override ({})".format( - args.content_provider_hashes, - args.target_branch_override, - args.install_branch_override, - ) - ) - - _content_provider_hashes = {} - # args.content_provider_hashes 'master:1;wallaby:2' - for keyval in args.content_provider_hashes.split(';'): - dict_key = keyval.split(':')[0] - dict_val = keyval.split(':')[1] - _content_provider_hashes.update({dict_key: dict_val}) - - releases_dictionary = compose_releases_dictionary( - args.stable_release, - featureset, - args.upgrade_from, - args.is_periodic, - args.distro_name, - args.distro_version, - args.target_branch_override, - args.install_branch_override, - _content_provider_hashes, - ) - - releases_dictionary = shim_convert_old_release_names( - releases_dictionary, args.is_periodic - ) - - if not write_releases_dictionary_to_bash(releases_dictionary, args.output_file): - exit(1) diff --git a/scripts/emit_releases_file/pytest.ini b/scripts/emit_releases_file/pytest.ini deleted file mode 100644 index cb050f5a4..000000000 --- a/scripts/emit_releases_file/pytest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -log_level = debug diff --git a/scripts/emit_releases_file/test_get_dlrn_hash.py b/scripts/emit_releases_file/test_get_dlrn_hash.py deleted file mode 100644 index 70e1ac5e7..000000000 --- a/scripts/emit_releases_file/test_get_dlrn_hash.py +++ /dev/null @@ -1,233 +0,0 @@ -from emit_releases_file import get_dlrn_hash - -from unittest import mock -import pytest - - -@mock.patch('logging.getLogger') -@mock.patch('requests.get') -def test_get_dlrn_hash_ok(mock_get, mock_logging): - mock_logger = mock.MagicMock() - mock_logging.return_value = mock_logger - mock_log_exception = mock.MagicMock() - mock_log_warning = mock.MagicMock() - mock_log_info = mock.MagicMock() - mock_logger.exception = mock_log_exception - mock_logger.warning = mock_log_warning - mock_logger.info = mock_log_info - mock_response = mock.Mock() - mock_response.ok = True - mock_response.text = ( - '[delorean]\nname=delorean-openstack-nova-81c23c04' - '7e8e0fc03b54164921f49fdb4103202c\nbaseurl=https:/' - '/trunk.rdoproject.org/centos7/81/c2/81c23c047e8e0' - 'fc03b54164921f49fdb4103202c_b333f915\nenabled=1\n' - 'gpgcheck=0\npriority=1' - ) - mock_get.return_value = mock_response - release = 'master' - hash_name = 'current-tripleo' - dlrn_hash = '81c23c047e8e0fc03b54164921f49fdb4103202c_b333f915' - repo_url = 'https://trunk.rdoproject.org/centos7-%s/%s/delorean.repo' % ( - release, - hash_name, - ) - assert ( - get_dlrn_hash(release, hash_name, distro_name='centos', distro_version='7') - == dlrn_hash - ) - mock_get.assert_called_once_with(repo_url, timeout=8) - mock_log_info.assert_called_once_with( - "Got DLRN hash: {} for the named " - "hash: {} on the {} " - "release".format(dlrn_hash, hash_name, release) - ) - mock_log_warning.assert_not_called() - mock_log_exception.assert_not_called() - - # centos8 test scenario - mock_get.reset_mock() - mock_log_info.reset_mock() - mock_response.text = '7e8e0fc03b54164921f49fdb4103202c' - mock_get.return_value = mock_response - release = 'master' - hash_name = 'current-tripleo' - dlrn_hash = '7e8e0fc03b54164921f49fdb4103202c' - repo_url = 'https://trunk.rdoproject.org/centos8-%s/%s/delorean.repo.md5' % ( - release, - hash_name, - ) - assert ( - get_dlrn_hash(release, hash_name, distro_name='centos', distro_version='8') - == dlrn_hash - ) - mock_get.assert_called_once_with(repo_url, timeout=8) - mock_log_info.assert_called_once_with( - "Got DLRN hash: {} for the named " - "hash: {} on the {} " - "release".format(dlrn_hash, hash_name, release) - ) - mock_log_warning.assert_not_called() - mock_log_exception.assert_not_called() - - # centos9 test scenario - mock_get.reset_mock() - mock_log_info.reset_mock() - mock_response.text = '1b28380bbbe279159578da5c60e567492cbb599d' - mock_get.return_value = mock_response - release = 'master' - hash_name = 'current-tripleo' - dlrn_hash = '1b28380bbbe279159578da5c60e567492cbb599d' - repo_url = 'https://trunk.rdoproject.org/centos9-%s/%s/delorean.repo.md5' % ( - release, - hash_name, - ) - assert ( - get_dlrn_hash(release, hash_name, distro_name='centos', distro_version='9') - == dlrn_hash - ) - mock_get.assert_called_once_with(repo_url, timeout=8) - mock_log_info.assert_called_once_with( - "Got DLRN hash: {} for the named " - "hash: {} on the {} " - "release".format(dlrn_hash, hash_name, release) - ) - mock_log_warning.assert_not_called() - mock_log_exception.assert_not_called() - - -@mock.patch('logging.getLogger') -@mock.patch('requests.get') -def test_null_response_raises_runtimeerror(mock_get, mock_logging): - mock_logger = mock.MagicMock() - mock_logging.return_value = mock_logger - mock_log_exception = mock.MagicMock() - mock_log_warning = mock.MagicMock() - mock_log_info = mock.MagicMock() - mock_logger.exception = mock_log_exception - mock_logger.warning = mock_log_warning - mock_logger.info = mock_log_info - release = 'master' - hash_name = 'current-tripleo' - repo_url = 'https://trunk.rdoproject.org/centos7-%s/%s/delorean.repo' % ( - release, - hash_name, - ) - mock_get.return_value = None - with pytest.raises(RuntimeError): - get_dlrn_hash(release, hash_name) - mock_get.assert_called_with(repo_url, timeout=8) - assert mock_get.call_count == 20 - mock_log_info.assert_not_called() - mock_log_warning.assert_called_with( - "Attempt 20 of 20 to get DLRN hash " "failed to get a response." - ) - assert mock_log_warning.call_count == 20 - mock_log_exception.assert_not_called() - - -@mock.patch('logging.getLogger') -@mock.patch('requests.get') -def test_get_dlrn_hash_500_then_200(mock_get, mock_logging): - mock_logger = mock.MagicMock() - mock_logging.return_value = mock_logger - mock_log_exception = mock.MagicMock() - mock_log_warning = mock.MagicMock() - mock_log_info = mock.MagicMock() - mock_logger.exception = mock_log_exception - mock_logger.warning = mock_log_warning - mock_logger.info = mock_log_info - mock_response_ok = mock.Mock() - mock_response_ok.ok = True - mock_response_ok.text = ( - '[delorean]\nname=delorean-openstack-nova-81c23c04' - '7e8e0fc03b54164921f49fdb4103202c\nbaseurl=https:/' - '/trunk.rdoproject.org/centos7/81/c2/81c23c047e8e0' - 'fc03b54164921f49fdb4103202c_b333f915\nenabled=1\n' - 'gpgcheck=0\npriority=1' - ) - mock_response_bad = mock.Mock() - mock_response_bad.ok = False - mock_response_bad.status_code = 500 - release = 'master' - hash_name = 'current-tripleo' - dlrn_hash = '81c23c047e8e0fc03b54164921f49fdb4103202c_b333f915' - repo_url = 'https://trunk.rdoproject.org/centos7-%s/%s/delorean.repo' % ( - release, - hash_name, - ) - mock_get.side_effect = [mock_response_bad, mock_response_ok] - assert get_dlrn_hash(release, hash_name, retries=20) == dlrn_hash - mock_get.assert_called_with(repo_url, timeout=8) - mock_log_info.assert_called_once_with( - "Got DLRN hash: {} for the named " - "hash: {} on the {} " - "release".format(dlrn_hash, hash_name, release) - ) - mock_log_warning.assert_called_once_with( - "Attempt 1 of 20 to get DLRN " "hash returned status code 500." - ) - mock_log_exception.assert_not_called() - - -@mock.patch('logging.getLogger') -@mock.patch('requests.get') -def test_get_dlrn_hash_timeout(mock_get, mock_logging): - mock_logger = mock.MagicMock() - mock_logging.return_value = mock_logger - mock_log_exception = mock.MagicMock() - mock_log_warning = mock.MagicMock() - mock_log_info = mock.MagicMock() - mock_logger.exception = mock_log_exception - mock_logger.warning = mock_log_warning - mock_logger.info = mock_log_info - release = 'master' - hash_name = 'current-tripleo' - repo_url = 'https://trunk.rdoproject.org/centos7-%s/%s/delorean.repo' % ( - release, - hash_name, - ) - mock_get_exception = Exception("We need more power!") - mock_get.side_effect = mock_get_exception - with pytest.raises(RuntimeError): - get_dlrn_hash(release, hash_name, retries=20) - mock_get.assert_called_with(repo_url, timeout=8) - mock_log_info.assert_not_called() - mock_log_warning.assert_called_with( - "Attempt 20 of 20 to get DLRN hash " "threw an exception." - ) - assert mock_log_warning.call_count == 20 - mock_log_exception.assert_called_with(mock_get_exception) - assert mock_log_exception.call_count == 20 - - -@mock.patch('logging.getLogger') -@mock.patch('requests.get') -def test_get_dlrn_hash_500_10_times(mock_get, mock_logging): - mock_logger = mock.MagicMock() - mock_logging.return_value = mock_logger - mock_log_exception = mock.MagicMock() - mock_log_warning = mock.MagicMock() - mock_log_info = mock.MagicMock() - mock_logger.exception = mock_log_exception - mock_logger.warning = mock_log_warning - mock_logger.info = mock_log_info - mock_response = mock.Mock() - mock_response.ok = False - mock_response.status_code = 500 - release = 'master' - hash_name = 'current-tripleo' - repo_url = 'https://trunk.rdoproject.org/centos7-%s/%s/delorean.repo' % ( - release, - hash_name, - ) - mock_get.return_value = mock_response - with pytest.raises(RuntimeError): - get_dlrn_hash(release, hash_name, retries=20) - mock_get.assert_called_with(repo_url, timeout=8) - mock_log_info.assert_not_called() - mock_log_warning.assert_called_with( - "Attempt 20 of 20 to get DLRN hash " "returned status code 500." - ) - assert mock_log_warning.call_count == 20 - mock_log_exception.assert_not_called() diff --git a/scripts/emit_releases_file/test_release_file.py b/scripts/emit_releases_file/test_release_file.py deleted file mode 100644 index aadfe96c0..000000000 --- a/scripts/emit_releases_file/test_release_file.py +++ /dev/null @@ -1,98 +0,0 @@ -from emit_releases_file import shim_convert_old_release_names - - -def test_converting_from_periodic_uc_upgrade_has_single_release_with_sufix(): - releases_name = { - 'undercloud_install_release': 'wallaby', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'wallaby', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'master', - 'standalone_target_hash': 'current-tripleo', - } - expected_releases_file = { - 'undercloud_install_release': 'promotion-testing-hash-wallaby', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'promotion-testing-hash-master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'promotion-testing-hash-master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'promotion-testing-hash-master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'promotion-testing-hash-wallaby', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'promotion-testing-hash-master', - 'standalone_target_hash': 'current-tripleo', - } - assert ( - shim_convert_old_release_names(releases_name, is_periodic=True) - == expected_releases_file - ) - - -def test_converting_from_noop_has_single_release(): - releases_name = { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - } - expected_releases_file = { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - } - assert ( - shim_convert_old_release_names(releases_name, is_periodic=False) - == expected_releases_file - ) - - -def test_converting_from_periodic_noop_has_single_release_with_sufix(): - releases_name = { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'wallaby', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'master', - 'standalone_target_hash': 'current-tripleo', - } - expected_releases_file = { - 'undercloud_install_release': 'promotion-testing-hash-master', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'promotion-testing-hash-master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'promotion-testing-hash-master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'promotion-testing-hash-master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'promotion-testing-hash-wallaby', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'promotion-testing-hash-master', - 'standalone_target_hash': 'current-tripleo', - } - assert ( - shim_convert_old_release_names(releases_name, is_periodic=True) - == expected_releases_file - ) diff --git a/scripts/emit_releases_file/test_release_name.py b/scripts/emit_releases_file/test_release_name.py deleted file mode 100644 index 02be82a0a..000000000 --- a/scripts/emit_releases_file/test_release_name.py +++ /dev/null @@ -1,1090 +0,0 @@ -from emit_releases_file import compose_releases_dictionary - -from unittest import mock -import pytest - - -@pytest.fixture -def hash_mock_setup(): - # We need this variables to be arrays to emulate a reference in python - # https://stackoverflow.com/questions/12116127/python-yield-generator-variable-scope - # For python3 we have special keyword nonlocal so we can refer the variable - # in the inner factory function - setup_mock = [] - calls_args = [] - - def _hash_mock_setup(get_hash_mock, calls): - get_hash_mock.side_effect = lambda r, h, t, s: calls[(r, h)] - - # Store the references to use them at tear down - setup_mock.append(get_hash_mock) - calls_args.append( - [mock.call(cargs[0], cargs[1], 'centos', '7') for cargs in calls] - ) - - yield _hash_mock_setup - - # Tear down code here - setup_mock[0].assert_has_calls(calls_args[0], any_order=True) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'master', - { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'zed', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'master', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'zed', - { - 'undercloud_install_release': 'zed', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'zed', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'wallaby', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'zed', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'zed', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'zed', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'wallaby', - { - 'undercloud_install_release': 'wallaby', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'wallaby', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'victoria', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'wallaby', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'wallaby', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'wallaby', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'victoria', - { - 'undercloud_install_release': 'victoria', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'victoria', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'ussuri', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'victoria', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'victoria', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'victoria', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'ussuri', - { - 'undercloud_install_release': 'ussuri', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'ussuri', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'train', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'ussuri', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'ussuri', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'ussuri', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ], -) -def test_overcloud_upgrade_is_n_minus_one_to_n( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - hash_mock_setup( - hash_mock, - { - (stable_release, 'current-tripleo'): 'current-tripleo', - (stable_release, 'current'): 'current', - ( - expected_releases['overcloud_deploy_release'], - 'current-tripleo', - ): 'previous-current-tripleo', - }, - ) - - featureset = { - 'mixed_upgrade': True, - 'overcloud_upgrade': True, - } - upgrade_from = False - assert ( - compose_releases_dictionary(stable_release, featureset, upgrade_from) - == expected_releases - ) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'master', - { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'zed', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'master', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'zed', - { - 'undercloud_install_release': 'zed', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'zed', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'wallaby', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'zed', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'zed', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'zed', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'wallaby', - { - 'undercloud_install_release': 'wallaby', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'wallaby', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'victoria', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'wallaby', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'wallaby', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'wallaby', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'victoria', - { - 'undercloud_install_release': 'victoria', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'victoria', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'ussuri', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'victoria', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'victoria', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'victoria', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'ussuri', - { - 'undercloud_install_release': 'ussuri', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'ussuri', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'train', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'ussuri', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'ussuri', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'ussuri', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ], -) -def test_period_overcloud_upgrade_is_n_minus_one_to_n( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - hash_mock_setup( - hash_mock, - { - (stable_release, 'tripleo-ci-testing'): 'current-tripleo', - (stable_release, 'current'): 'current', - ( - expected_releases['overcloud_deploy_release'], - 'current-tripleo', - ): 'previous-current-tripleo', - }, - ) - - featureset = { - 'mixed_upgrade': True, - 'overcloud_upgrade': True, - } - upgrade_from = False - assert ( - compose_releases_dictionary( - stable_release, featureset, upgrade_from, is_periodic=True - ) - == expected_releases - ) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'master', - { - 'undercloud_install_release': 'zed', - 'undercloud_install_hash': 'previous-current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'master', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'zed', - { - 'undercloud_install_release': 'wallaby', - 'undercloud_install_hash': 'previous-current-tripleo', - 'undercloud_target_release': 'zed', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'zed', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'zed', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'zed', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'zed', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'wallaby', - { - 'undercloud_install_release': 'victoria', - 'undercloud_install_hash': 'previous-current-tripleo', - 'undercloud_target_release': 'wallaby', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'wallaby', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'wallaby', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'wallaby', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'wallaby', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'victoria', - { - 'undercloud_install_release': 'ussuri', - 'undercloud_install_hash': 'previous-current-tripleo', - 'undercloud_target_release': 'victoria', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'victoria', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'victoria', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'victoria', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'victoria', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'ussuri', - { - 'undercloud_install_release': 'train', - 'undercloud_install_hash': 'previous-current-tripleo', - 'undercloud_target_release': 'ussuri', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'ussuri', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'ussuri', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'ussuri', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'ussuri', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ], -) -def test_undercloud_upgrade_is_n_minus_one_to_n( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - expected_release = expected_releases['undercloud_install_release'] - hash_mock_setup( - hash_mock, - { - (stable_release, 'current-tripleo'): 'current-tripleo', - (stable_release, 'current'): 'current', - (expected_release, 'current-tripleo'): 'previous-current-tripleo', - }, - ) - - featureset = { - 'undercloud_upgrade': True, - } - - upgrade_from = False - assert ( - compose_releases_dictionary(stable_release, featureset, upgrade_from) - == expected_releases - ) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'master', - { - 'undercloud_install_release': 'zed', - 'undercloud_install_hash': 'previous-current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'master', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'victoria', - { - 'undercloud_install_release': 'ussuri', - 'undercloud_install_hash': 'previous-current-tripleo', - 'undercloud_target_release': 'victoria', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'victoria', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'victoria', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'victoria', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'victoria', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ], -) -def test_period_undercloud_upgrade_is_n_minus_one_to_n( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - expected_release = expected_releases['undercloud_install_release'] - - hash_mock_setup( - hash_mock, - { - (stable_release, 'tripleo-ci-testing'): 'current-tripleo', - (stable_release, 'current'): 'current', - (expected_release, 'current-tripleo'): 'previous-current-tripleo', - }, - ) - - featureset = { - 'undercloud_upgrade': True, - } - - upgrade_from = False - assert ( - compose_releases_dictionary( - stable_release, featureset, upgrade_from, is_periodic=True - ) - == expected_releases - ) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'master', - { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'zed', - 'standalone_deploy_newest_hash': 'old-current', - 'standalone_deploy_hash': 'previous-current-tripleo', - 'standalone_target_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ], -) -def test_standalone_upgrade_is_n_minus_one_to_n( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - expected_release = expected_releases['standalone_deploy_release'] - - hash_mock_setup( - hash_mock, - { - (stable_release, 'current-tripleo'): 'current-tripleo', - (stable_release, 'current'): 'current', - (expected_release, 'current-tripleo'): 'previous-current-tripleo', - (expected_release, 'current'): 'old-current', - }, - ) - - featureset = { - 'standalone_upgrade': True, - } - - upgrade_from = False - assert ( - compose_releases_dictionary(stable_release, featureset, upgrade_from) - == expected_releases - ) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'master', - { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'zed', - 'standalone_deploy_newest_hash': 'old-current', - 'standalone_deploy_hash': 'previous-current-tripleo', - 'standalone_target_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'wallaby', - { - 'undercloud_install_release': 'wallaby', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'wallaby', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'wallaby', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'wallaby', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'victoria', - 'standalone_deploy_newest_hash': 'old-current', - 'standalone_deploy_hash': 'previous-current-tripleo', - 'standalone_target_release': 'wallaby', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ], -) -def test_period_standalone_upgrade_is_n_minus_one_to_n( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - expected_release = expected_releases['standalone_deploy_release'] - - hash_mock_setup( - hash_mock, - { - (stable_release, 'tripleo-ci-testing'): 'current-tripleo', - (stable_release, 'current'): 'current', - (expected_release, 'current-tripleo'): 'previous-current-tripleo', - (expected_release, 'current'): 'old-current', - }, - ) - - featureset = { - 'standalone_upgrade': True, - } - upgrade_from = False - assert ( - compose_releases_dictionary( - stable_release, featureset, upgrade_from, is_periodic=True - ) - == expected_releases - ) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'train', - { - 'undercloud_install_release': 'train', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'train', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'train', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'train', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_deploy_release': 'train', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - 'standalone_target_release': 'train', - }, - ), - ], -) -def test_overcloud_update_train_target_is_hash( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - expected_release = expected_releases['overcloud_deploy_release'] - - hash_mock_setup( - hash_mock, - { - (stable_release, 'current-tripleo'): 'current-tripleo', - (stable_release, 'current'): 'current', - (expected_release, 'previous-current-tripleo'): 'previous-current-tripleo', - }, - ) - - featureset = { - 'overcloud_update': True, - } - - upgrade_from = False - assert ( - compose_releases_dictionary(stable_release, featureset, upgrade_from) - == expected_releases - ) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'master', - { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_deploy_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - 'standalone_target_release': 'master', - }, - ), - ( - 'wallaby', - { - 'undercloud_install_release': 'wallaby', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'wallaby', - 'undercloud_target_hash': 'current', - 'overcloud_deploy_release': 'wallaby', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'wallaby', - 'overcloud_target_hash': 'current', - 'standalone_deploy_release': 'wallaby', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'wallaby', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ], -) -def test_overcloud_minor_update_target_is_hash( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - expected_release = expected_releases['overcloud_deploy_release'] - - hash_mock_setup( - hash_mock, - { - (stable_release, 'current-tripleo'): 'current-tripleo', - (stable_release, 'current'): 'current', - (expected_release, 'current'): 'current', - }, - ) - - featureset = { - 'minor_update': True, - } - - upgrade_from = False - assert ( - compose_releases_dictionary(stable_release, featureset, upgrade_from) - == expected_releases - ) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'master', - { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'tripleo-ci-testing', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'tripleo-ci-testing', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'tripleo-ci-testing', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'tripleo-ci-testing', - 'standalone_deploy_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'tripleo-ci-testing', - 'standalone_target_release': 'master', - }, - ), - ( - 'wallaby', - { - 'undercloud_install_release': 'wallaby', - 'undercloud_install_hash': 'tripleo-ci-testing', - 'undercloud_target_release': 'wallaby', - 'undercloud_target_hash': 'tripleo-ci-testing', - 'overcloud_deploy_release': 'wallaby', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'wallaby', - 'overcloud_target_hash': 'tripleo-ci-testing', - 'standalone_deploy_release': 'wallaby', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'tripleo-ci-testing', - 'standalone_target_release': 'wallaby', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'tripleo-ci-testing', - }, - ), - ( - 'victoria', - { - 'undercloud_install_release': 'victoria', - 'undercloud_install_hash': 'tripleo-ci-testing', - 'undercloud_target_release': 'victoria', - 'undercloud_target_hash': 'tripleo-ci-testing', - 'overcloud_deploy_release': 'victoria', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'victoria', - 'overcloud_target_hash': 'tripleo-ci-testing', - 'standalone_deploy_release': 'victoria', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'tripleo-ci-testing', - 'standalone_target_release': 'victoria', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'tripleo-ci-testing', - }, - ), - ( - 'ussuri', - { - 'undercloud_install_release': 'ussuri', - 'undercloud_install_hash': 'tripleo-ci-testing', - 'undercloud_target_release': 'ussuri', - 'undercloud_target_hash': 'tripleo-ci-testing', - 'overcloud_deploy_release': 'ussuri', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'ussuri', - 'overcloud_target_hash': 'tripleo-ci-testing', - 'standalone_deploy_release': 'ussuri', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'tripleo-ci-testing', - 'standalone_target_release': 'ussuri', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'tripleo-ci-testing', - }, - ), - ( - 'train', - { - 'undercloud_install_release': 'train', - 'undercloud_install_hash': 'tripleo-ci-testing', - 'undercloud_target_release': 'train', - 'undercloud_target_hash': 'tripleo-ci-testing', - 'overcloud_deploy_release': 'train', - 'overcloud_deploy_hash': 'previous-current-tripleo', - 'overcloud_target_release': 'train', - 'overcloud_target_hash': 'tripleo-ci-testing', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'tripleo-ci-testing', - 'standalone_deploy_release': 'train', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'tripleo-ci-testing', - 'standalone_target_release': 'train', - }, - ), - ], -) -def test_periodic_overcloud_update_target_is_hash( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - expected_release = expected_releases['overcloud_deploy_release'] - - hash_mock_setup( - hash_mock, - { - (stable_release, 'tripleo-ci-testing'): 'tripleo-ci-testing', - (stable_release, 'current'): 'current', - (expected_release, 'previous-current-tripleo'): 'previous-current-tripleo', - }, - ) - - featureset = { - 'overcloud_update': True, - } - upgrade_from = False - assert ( - compose_releases_dictionary( - stable_release, featureset, upgrade_from, is_periodic=True - ) - == expected_releases - ) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'master', - { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - 'standalone_target_release': 'master', - }, - ), - ( - 'wallaby', - { - 'undercloud_install_release': 'wallaby', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'wallaby', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'wallaby', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'wallaby', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'wallaby', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'wallaby', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'victoria', - { - 'undercloud_install_release': 'victoria', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'victoria', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'victoria', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'victoria', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'victoria', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'victoria', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'ussuri', - { - 'undercloud_install_release': 'ussuri', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'ussuri', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'ussuri', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'ussuri', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'ussuri', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'ussuri', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - }, - ), - ( - 'train', - { - 'undercloud_install_release': 'train', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'train', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'train', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'train', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_release': 'train', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - 'standalone_target_release': 'train', - }, - ), - ], -) -def test_noop_target_is_the_same( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - hash_mock_setup( - hash_mock, - { - (stable_release, 'current-tripleo'): 'current-tripleo', - (stable_release, 'current'): 'current', - }, - ) - - featureset = {} - upgrade_from = False - assert ( - compose_releases_dictionary(stable_release, featureset, upgrade_from) - == expected_releases - ) - - -@mock.patch('emit_releases_file.get_dlrn_hash') -@pytest.mark.parametrize( - 'stable_release,expected_releases', - [ - ( - 'master', - { - 'undercloud_install_release': 'master', - 'undercloud_install_hash': 'tripleo-ci-testing', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'tripleo-ci-testing', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'tripleo-ci-testing', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'tripleo-ci-testing', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'tripleo-ci-testing', - 'standalone_deploy_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'tripleo-ci-testing', - 'standalone_target_release': 'master', - }, - ), - ( - 'wallaby', - { - 'undercloud_install_release': 'wallaby', - 'undercloud_install_hash': 'tripleo-ci-testing', - 'undercloud_target_release': 'wallaby', - 'undercloud_target_hash': 'tripleo-ci-testing', - 'overcloud_deploy_release': 'wallaby', - 'overcloud_deploy_hash': 'tripleo-ci-testing', - 'overcloud_target_release': 'wallaby', - 'overcloud_target_hash': 'tripleo-ci-testing', - 'standalone_deploy_release': 'wallaby', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'tripleo-ci-testing', - 'standalone_target_release': 'wallaby', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'tripleo-ci-testing', - }, - ), - ( - 'victoria', - { - 'undercloud_install_release': 'victoria', - 'undercloud_install_hash': 'tripleo-ci-testing', - 'undercloud_target_release': 'victoria', - 'undercloud_target_hash': 'tripleo-ci-testing', - 'overcloud_deploy_release': 'victoria', - 'overcloud_deploy_hash': 'tripleo-ci-testing', - 'overcloud_target_release': 'victoria', - 'overcloud_target_hash': 'tripleo-ci-testing', - 'standalone_deploy_release': 'victoria', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'tripleo-ci-testing', - 'standalone_target_release': 'victoria', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'tripleo-ci-testing', - }, - ), - ( - 'ussuri', - { - 'undercloud_install_release': 'ussuri', - 'undercloud_install_hash': 'tripleo-ci-testing', - 'undercloud_target_release': 'ussuri', - 'undercloud_target_hash': 'tripleo-ci-testing', - 'overcloud_deploy_release': 'ussuri', - 'overcloud_deploy_hash': 'tripleo-ci-testing', - 'overcloud_target_release': 'ussuri', - 'overcloud_target_hash': 'tripleo-ci-testing', - 'standalone_deploy_release': 'ussuri', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'tripleo-ci-testing', - 'standalone_target_release': 'ussuri', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'tripleo-ci-testing', - }, - ), - ( - 'train', - { - 'undercloud_install_release': 'train', - 'undercloud_install_hash': 'tripleo-ci-testing', - 'undercloud_target_release': 'train', - 'undercloud_target_hash': 'tripleo-ci-testing', - 'overcloud_deploy_release': 'train', - 'overcloud_deploy_hash': 'tripleo-ci-testing', - 'overcloud_target_release': 'train', - 'overcloud_target_hash': 'tripleo-ci-testing', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'tripleo-ci-testing', - 'standalone_deploy_release': 'train', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'tripleo-ci-testing', - 'standalone_target_release': 'train', - }, - ), - ], -) -def test_periodic_noop_target_is_the_same( - hash_mock, hash_mock_setup, stable_release, expected_releases -): - hash_mock_setup( - hash_mock, - { - (stable_release, 'tripleo-ci-testing'): 'tripleo-ci-testing', - (stable_release, 'current'): 'current', - }, - ) - - featureset = {} - upgrade_from = False - assert ( - compose_releases_dictionary( - stable_release, featureset, upgrade_from, is_periodic=True - ) - == expected_releases - ) diff --git a/scripts/emit_releases_file/test_unsupported_upgrades.py b/scripts/emit_releases_file/test_unsupported_upgrades.py deleted file mode 100644 index 47db1d58d..000000000 --- a/scripts/emit_releases_file/test_unsupported_upgrades.py +++ /dev/null @@ -1,7 +0,0 @@ -from emit_releases_file import compose_releases_dictionary -import pytest - - -def test_fail_with_wrong_release(): - with pytest.raises(RuntimeError): - compose_releases_dictionary('foobar', {}, False) diff --git a/scripts/emit_releases_file/test_write_bash_script.py b/scripts/emit_releases_file/test_write_bash_script.py deleted file mode 100644 index 142e1c07d..000000000 --- a/scripts/emit_releases_file/test_write_bash_script.py +++ /dev/null @@ -1,85 +0,0 @@ -import copy -from emit_releases_file import write_releases_dictionary_to_bash - -from unittest import mock -from unittest.mock import mock_open -import os -from six import PY2 - -import pytest - -if PY2: - BUILTINS_OPEN = "__builtin__.open" -else: - BUILTINS_OPEN = "builtins.open" - - -def test_empty_releases_dictionary_fails(caplog): - assert not write_releases_dictionary_to_bash({}, "") - - expected_info = ('emit-releases', 40, 'Writting releases dictionary') - assert expected_info in caplog.record_tuples - - -@pytest.fixture -def releases_dictionary(): - return { - 'undercloud_install_release': 'wallaby', - 'undercloud_install_hash': 'current-tripleo', - 'undercloud_target_release': 'master', - 'undercloud_target_hash': 'current-tripleo', - 'overcloud_deploy_release': 'master', - 'overcloud_deploy_hash': 'current-tripleo', - 'overcloud_target_release': 'master', - 'overcloud_target_hash': 'current-tripleo', - 'standalone_deploy_release': 'master', - 'standalone_deploy_newest_hash': 'current', - 'standalone_deploy_hash': 'current-tripleo', - 'standalone_target_release': 'master', - 'standalone_target_newest_hash': 'current', - 'standalone_target_hash': 'current-tripleo', - } - - -@pytest.mark.parametrize( - 'deleted_key', - [ - 'undercloud_install_release', - 'undercloud_install_hash', - 'undercloud_target_release', - 'undercloud_target_hash', - 'overcloud_deploy_release', - 'overcloud_deploy_hash', - 'overcloud_target_release', - 'overcloud_target_hash', - 'standalone_deploy_release', - 'standalone_deploy_newest_hash', - 'standalone_deploy_hash', - 'standalone_target_release', - 'standalone_target_newest_hash', - 'standalone_target_hash', - ], -) -def test_missing_key_fails(releases_dictionary, deleted_key): - wrong_releases_dictionary = copy.copy(releases_dictionary) - wrong_releases_dictionary.pop(deleted_key) - assert not write_releases_dictionary_to_bash(wrong_releases_dictionary, "") - - -@mock.patch(BUILTINS_OPEN, new_callable=mock_open) -def test_open_exception_fails(mock, releases_dictionary): - bash_script = '/foo/bar.sh' - mock.side_effect = IOError - assert not write_releases_dictionary_to_bash(releases_dictionary, bash_script) - - -@mock.patch(BUILTINS_OPEN, new_callable=mock_open) -def test_output_is_sourceable(mock, releases_dictionary): - bash_script = '/foo/bar.sh' - assert write_releases_dictionary_to_bash(releases_dictionary, bash_script) - mock.assert_called_once_with(bash_script, 'w') - handle = mock() - args, _ = handle.write.call_args - written_content = args[0] - # TODO(Llorente): check environment variables - assert 0 == os.system(written_content) diff --git a/scripts/emit_releases_file/test_yaml_parsing.py b/scripts/emit_releases_file/test_yaml_parsing.py deleted file mode 100644 index 7998ed4fd..000000000 --- a/scripts/emit_releases_file/test_yaml_parsing.py +++ /dev/null @@ -1,78 +0,0 @@ -from emit_releases_file import load_featureset_file - -from unittest import mock -import pytest -from six import PY2 -import yaml - - -if PY2: - BUILTINS_OPEN = "__builtin__.open" -else: - BUILTINS_OPEN = "builtins.open" - - -@mock.patch('yaml.safe_load') -@mock.patch('logging.getLogger') -def test_featureset_file_with_bad_file_path(mock_logging, mock_yaml): - mock_logger = mock.MagicMock() - mock_logging.return_value = mock_logger - mock_log_exception = mock.MagicMock() - mock_log_error = mock.MagicMock() - mock_logger.exception = mock_log_exception - mock_logger.error = mock_log_error - bad_file_exception = IOError("Dude where's my YAML!") - mo = mock.mock_open() - with pytest.raises(IOError): - with mock.patch(BUILTINS_OPEN, mo, create=True) as mock_file: - mock_file.side_effect = bad_file_exception - featureset = load_featureset_file('some_non_existent.yaml') - mock_yaml.assert_not_called() - mock_file.assert_called_with('some_non_existent.yaml', 'r') - mock_logging.assert_called_with('emit-releases') - mock_log_error.assert_called() - mock_log_exception.assert_called_with(bad_file_exception) - assert featureset is None - - -@mock.patch('yaml.safe_load') -@mock.patch('logging.getLogger') -def test_featureset_file_with_bad_yaml(mock_logging, mock_yaml): - mock_logger = mock.MagicMock() - mock_logging.return_value = mock_logger - mock_log_exception = mock.MagicMock() - mock_log_error = mock.MagicMock() - mock_logger.exception = mock_log_exception - mock_logger.error = mock_log_error - mo = mock.mock_open() - mock_yaml.side_effect = yaml.YAMLError() - with pytest.raises(yaml.YAMLError): - with mock.patch(BUILTINS_OPEN, mo, create=True) as mock_file: - featureset = load_featureset_file('some_badly_formatted.yaml') - mock_yaml.assert_called() - mock_file.assert_called_with('some_badly_formatted.yaml', 'r') - mock_logging.assert_called_with('emit-releases') - mock_log_exception.assert_called() - mock_log_error.assert_called() - assert featureset is None - - -@mock.patch('yaml.safe_load') -@mock.patch('logging.getLogger') -def test_featureset_file_loaded_ok(mock_logging, mock_yaml): - mock_logger = mock.MagicMock() - mock_logging.return_value = mock_logger - mock_log_exception = mock.MagicMock() - mock_log_error = mock.MagicMock() - mock_logger.exception = mock_log_exception - mock_logger.error = mock_log_error - ok_yaml_dict = {'some_featureset_keys': 'some_featureset_values'} - mock_yaml.return_value = ok_yaml_dict - mo = mock.mock_open() - with mock.patch(BUILTINS_OPEN, mo, create=True) as mock_file: - featureset = load_featureset_file('featureset999.yaml') - mock_file.assert_called_with('featureset999.yaml', 'r') - mock_yaml.assert_called() - mock_log_exception.assert_not_called() - mock_log_error.assert_not_called() - assert featureset == ok_yaml_dict diff --git a/scripts/fake_fail_subunit b/scripts/fake_fail_subunit deleted file mode 100644 index 31648d8f5..000000000 Binary files a/scripts/fake_fail_subunit and /dev/null differ diff --git a/scripts/getthelogs b/scripts/getthelogs deleted file mode 100644 index 08490e22a..000000000 --- a/scripts/getthelogs +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -set -eu -o pipefail - -function usage { - echo "Helper script for downloading tripleo-ci jobs logs" - echo - echo "Example:" - echo "getthelogs http://logs.openstack.org/00/123456/7/check/gate-tripleo-ci-foo/d3adbeef" - echo - echo "Downloads the logs and starts a shell from the logs root directory" -} - -function finish { - rc=${rc:-$?} - trap - EXIT - cd $TDIR/../ - echo "Download job exited ${rc}" - PS1="JOBLOGS ]\$ " bash --noprofile --norc -} - -function get_dirs { - local drop="\b(etc|ara|ara_oooq|docs|build|stackviz|sudoers.d|config-data|extra)\b" - local directories="" - directories=$(curl -s "$1" 2> /dev/null | grep -E "\[DIR" | grep -vE "${drop}" | sed -e "s,.*href=\"\([^\"]*\)\".*,${1}\1,g") - if [ -n "$directories" ]; then - for d in $directories; do - directories="$directories $(get_dirs $d/)" - done - echo $directories - else - echo "" - fi - return 0 -} - -[[ "${1:--}" =~ ^\s+?- ]] && (usage; exit 1) -type -p wget 2>&1 >/dev/null || ( echo "Please install a wget tool!"; exit 127 ) -trap finish EXIT SIGINT SIGTERM - -WORKERS=6 -BASEURL=${1%/} -SC=$(dirname $BASEURL | grep -o \/ | wc -w) -if [[ $BASEURL =~ 'logs.rdoproject' && SC -le 9 ]] ||\ - [[ $BASEURL =~ 'logs.rdoproject.org/openstack-periodic' && SC -le 5 ]]; then - console="$BASEURL/console.txt.gz" -elif [[ ! $(basename $BASEURL) == 'logs' && SC -le 7 ]]; then - console="$BASEURL/job-output.txt.gz" - BASEURL=${BASEURL}/logs -else - console='' -fi -TDIR=${BASEURL##*http://} -TDIR=${TDIR##*https://} -TDIR=/tmp/${TDIR} -mkdir -p $TDIR -cd /tmp - -echo "Target dir for download: $TDIR" -echo Will download logs from the following URLs: -list_to_get="$console $(get_dirs $BASEURL/)" -for d in $list_to_get; do - echo $d -done - -rm -f wget-jobs.txt -for d in $list_to_get; do - args="\"-nv -nc --no-use-server-timestamps \ - --accept-regex='\.txt\.gz$|messages$' \ - --reject='index.html*' \ - --recursive -l 10 --domains logs.openstack.org,logs.rdoproject.org \ - --no-parent \ - -erobots=off --wait 0.25 ${d}\"" - echo "${args}" >> wget-jobs.txt -done - -cat wget-jobs.txt | sed -n '{p;p}' | shuf > wget-jobs-shuf.txt -cat wget-jobs-shuf.txt | xargs -r -n1 -P ${WORKERS} -I{} sh -c "wget {}" diff --git a/scripts/hosts b/scripts/hosts deleted file mode 100644 index 2531366f2..000000000 --- a/scripts/hosts +++ /dev/null @@ -1,11 +0,0 @@ -localhost ansible_connection=local - -127.0.0.2 ansible_host=127.0.0.2 ansible_user=jenkins ansible_private_key_file=/home/jenkins/.ssh/id_rsa undercloud_ip=127.0.0.2 - -undercloud ansible_host=undercloud ansible_user=jenkins ansible_private_key_file=/home/jenkins/.ssh/id_rsa undercloud_ip=127.0.0.2 - -[virthost] -127.0.0.2 - -[undercloud] -undercloud diff --git a/scripts/move_bugs/README.txt b/scripts/move_bugs/README.txt deleted file mode 100644 index d7e5a6deb..000000000 --- a/scripts/move_bugs/README.txt +++ /dev/null @@ -1,34 +0,0 @@ -# https://help.launchpad.net/API/launchpadlib -# https://help.launchpad.net/API/ThirdPartyIntegration - -# setup a python virtenv, WITH site-packages -virtualenv --python /usr/bin/python2.7 /home/whayutin/virtualenv/python2 --system-site-packages - - -python -keyring.set_password("app_name", "oauthkey", "oauthpass") -from launchpadlib.launchpad import Launchpad -launchpad = Launchpad.login_with('app_name', 'production') - -# follow the promps, auth for a short time. -python move_bugs.py tripleo ussuri-2 ussuri-3 -# move all the bugs w/o criteria for milestone -python --no-dry-run tripleo ussuri-2 ussuri-3 - -# due to paging etc, you'll have to run -# the command a few times - - -Other Notes: - git clone https://github.com/openstack/release-tools -[13:39:20] cd release-tools -[13:39:22] git checkout 8a69cd398af69768221109a7e12c1755e5a2c4eb -[13:39:26] ./process_bugs.py tripleo --milestone ussuri-1 --settarget ussuri-2 -[13:39:43] repeat a lot of times until there is no more bugs to process (launchpad would limit you) -[13:39:47] and once it's done, that's it -[13:39:55] don't forget to close the milestone in LP -[13:39:57] weshay: ^ -[13:40:34] weshay: for milestones i just move them all -[13:40:42] k.. thanks -[13:40:53] weshay: i only use priority when RC time to move all but like the high/critical -[13:40:57] aye diff --git a/scripts/move_bugs/close_bugs.py b/scripts/move_bugs/close_bugs.py deleted file mode 100644 index 97129ddda..000000000 --- a/scripts/move_bugs/close_bugs.py +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env python -import argparse -import json -import os -import sys - -from datetime import datetime, timedelta -from launchpadlib.launchpad import Launchpad - -cachedir = "{}/.launchpadlib/cache/".format(os.path.expanduser('~')) - -LP_CACHE_DIR = os.path.expanduser('~/.launchpadlib/cache') - - -def no_creds(): - print("No active credentials") - sys.exit(1) - - -def get_bugs(status, tag=None, previous_days=None, milestone=None): - # launchpad = Launchpad.login_anonymously( - # 'OOOQ Ruck Rover', 'production', cachedir, version='devel') - # launchpad = Launchpad.login_with('lKfbPKz0qdwdjVLjtnTF', 'production') - lp = Launchpad.login_with( - application_name='tripleo-bugs', - service_root='production', - launchpadlib_dir=LP_CACHE_DIR, - credential_save_failed=no_creds, - version='devel', - ) - project = lp.projects['tripleo'] - target_milestone = project.getMilestone(name=milestone) - - # Filter by Status and Tag - if tag is not None and previous_days is None: - bugs = project.searchTasks(status=status, tags=tag) - # Filter by Status only - elif tag is None and previous_days is None: - bugs = project.searchTasks(status=status) - # Filter by Status and Number of Days - elif tag is None and previous_days is not None: - days_to_search = datetime.utcnow() - timedelta(days=int(previous_days)) - bugs = project.searchTasks( - status=status, created_before=days_to_search, milestone=target_milestone - ) - # Filter by Tag, Status and Number of Days - elif tag is not None and previous_days is not None: - days_to_search = datetime.utcnow() - timedelta(days=int(previous_days)) - bugs = project.searchTasks( - status=status, created_before=days_to_search, tags=tag - ) - else: - print("invalid combination of parameters") - sys.exit(1) - - return bugs - - -def print_as_csv(bug_tasks): - if bug_tasks: - for bug_task in bug_tasks: - print( - ('{},{},{},{},"{}"').format( - bug_task.bug.id, - bug_task.status, - json.dumps(bug_task.bug.tags) - .replace(',', ' ') - .replace('"', '') - .replace('[', '') - .replace(']', ''), - bug_task.web_link, - json.dumps(bug_task.bug.title) - .replace('"', "'") - .replace("\\n", "") - .replace("\\", ""), - ) - ) - print("Total: %s bugs" % (len(bug_tasks))) - - -CLOSE_MESSAGE = ( - "This is an automated action. Bug status has been set to " - "'Incomplete' and target milestone has been removed " - "due to inactivity. If you disagree please " - "re-set these values and reach out to us on OFTC #tripleo" -) - - -def close_bug(bug_tasks): - if bug_tasks: - for bug_task in bug_tasks: - bug_task.status = "Incomplete" - bug_task.milestone = None - bug_task.bug.newMessage(content=CLOSE_MESSAGE) - bug_task.lp_save() - print(bug_task.bug.id) - - -def main(): - parser = argparse.ArgumentParser( - description="Print launchpad bugs as influxdb lines" - ) - - parser.add_argument('--tag') - parser.add_argument( - '--status', - nargs='+', - default=['New', 'Triaged', 'In Progress', 'Confirmed', 'Fix Committed'], - ), - parser.add_argument('--previous_days', default=365) - parser.add_argument('--milestone') - args = parser.parse_args() - - print_as_csv(get_bugs(args.status, args.tag, args.previous_days, args.milestone)) - - close_bug(get_bugs(args.status, args.tag, args.previous_days, args.milestone)) - - -if __name__ == '__main__': - main() diff --git a/scripts/move_bugs/move_bugs.py b/scripts/move_bugs/move_bugs.py deleted file mode 100644 index c5b4f95d7..000000000 --- a/scripts/move_bugs/move_bugs.py +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/env python - -# Example usage: -# python move_bugs.py --no-dry-run --priority-less-than High tripleo stein-3 train-1 -# python move_bugs.py --no-dry-run tripleo stein-3 stein-rc1 -# python move_bugs.py --no-dry-run --priority-less-than High tripleo stein-rc1 train-1 -# python move_bugs.py --no-dry-run --priority-less-than Critical tripleo stein-rc1 train-1 -# python move_bugs.py --no-dry-run tripleo stein-rc1 train-1 - -import argparse -import lazr.restfulclient.errors -import os -import sys - -# import sqlite3 - -from launchpadlib import launchpad - -# LP_DB = os.path.expanduser('~/.launchpadlib/tripleo') -LP_CACHE_DIR = os.path.expanduser('~/.launchpadlib/cache') -LP_OPEN_STATUS = ['New', 'Incomplete', 'Confirmed', 'Triaged', 'In Progress'] -LP_CLOSED_STATUS = ['Fix Released', 'Fix Committed'] -LP_EXPIRED_STATUS = ['Expired'] -LP_IMPORTANCE = ['Undecided', 'Critical', 'High', 'Medium', 'Low', 'Wishlist'] - -# def connect_db(): -# conn = sqlite3.connect(LP_DB) -# return conn - -# NOTES: -# lp_attributes: Data fields of this object. You can read from these might -# be able to write to some of them. -# -# lp_collections: List of launchpad objects associated with this object. -# -# lp_entries: Other Launchpad objects associated with this one. -# -# lp_operations: The names of Launchpad methods you can call on the object. - - -def no_creds(): - print("No active credentials") - sys.exit(1) - - -def login(): - lp = launchpad.Launchpad.login_with( - application_name='tripleo-bugs', - service_root='production', - launchpadlib_dir=LP_CACHE_DIR, - credential_save_failed=no_creds, - version='devel', - ) - return lp - - -def validate_milestone(project, milestone): - _milestone = project.getMilestone(name=milestone) - if not _milestone: - parser.error('Requested milestone {} does not exist'.format(milestone)) - return _milestone - - -def validate_importance(importance): - if importance not in LP_IMPORTANCE: - parser.error( - 'Provided importance {} is not one of: {}'.format( - importance, ', '.join(LP_IMPORTANCE) - ) - ) - return importance - - -def get_importance_from_input(args): - if args.priority_less_than: - return LP_IMPORTANCE[LP_IMPORTANCE.index(args.priority_less_than) + 1 :] - if args.priority_greater_than: - return LP_IMPORTANCE[: LP_IMPORTANCE.index(args.priority_greater_than)] - return args.priority - - -def main(args): - lp = login() - project = lp.projects[args.projectname] - to_milestone = validate_milestone(project, args.to_milestone) - from_milestone = validate_milestone(project, args.from_milestone) - - # TODO: switch to exclude in progress bugs - # bug_status = ['New', 'Incomplete', 'Confirmed', 'Triaged'] - bug_status = LP_OPEN_STATUS - from_importance = get_importance_from_input(args) - print("Moving bugs from {} to {}".format(from_milestone.name, to_milestone.name)) - print("Limiting to importance: {}".format(from_importance)) - bugs = project.searchTasks( - status=bug_status, milestone=from_milestone, importance=from_importance - ) - - failed = set() - success = set() - for b in bugs: - bug = b.bug - # print("{}\t{}\t{}".format(b.bug.id, b.importance, b.status)) - - print( - "Moving {} from {} to {} ...".format( - bug.id, from_milestone.name, to_milestone.name - ), - end='', - ) - b.milestone = to_milestone - try: - if args.no_dry_run: - b.lp_save() - print(" SAVED!") - else: - print(" SKIPPED!") - success.add(bug.id) - except lazr.restfulclient.errors.ServerError as e: - print("ERROR - Timeout", e) - failed.add(bug.id) - except Exception as e: - print("ERROR - {}".format(e)) - - print("Moved {} Bugs".format(len(success))) - print("Failed to move {} Bugs".format(len(failed))) - if failed: - print("Failed to move the following bugs:") - for bugid in failed: - print("http://bugs.launchpad.net/bugs/{}".format(bugid)) - - # milestones = project.active_milestones - - # tags = project.official_bug_tags - # tags = ['ui', 'tech-debt'] - - # print("{}".format(",".join(['tag']+LP_OPEN_STATUS))) - # for T in tags: - # res = [T] - # for S in LP_OPEN_STATUS: - # bugs = lpt.searchTasks(tags=T, status=S) - # res = res + [str(len(bugs))] - # print("{}".format(",".join(res))) - - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Change Move bugs") - parser.add_argument('projectname', default='tripleo', help='The project to act on') - limiting = parser.add_mutually_exclusive_group() - limiting.add_argument( - '--priority-less-than', - type=validate_importance, - dest='priority_less_than', - help='All bugs with with importance less than ' 'the provided value', - ) - limiting.add_argument( - '--priority-greater-than', - type=validate_importance, - dest='priority_greater_than', - help='All bugs with with importance greater than ' 'the provided value', - ) - limiting.add_argument( - '--priority', - type=validate_importance, - dest='priority', - help='All bugs with with the provided importance', - ) - parser.add_argument('from_milestone', help='Milestone to move from (queens-1)') - parser.add_argument('to_milestone', help='Milestone to move to (queens-2)') - parser.add_argument( - '--no-dry-run', - dest='no_dry_run', - help='Execute the move for real.', - action='store_true', - ) - - args = parser.parse_args() - main(args) diff --git a/scripts/rdocloud.env b/scripts/rdocloud.env deleted file mode 100644 index 67d6d24a8..000000000 --- a/scripts/rdocloud.env +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -export PUBLIC_IP_NET=38.145.32.0/22 -export PUBLIC_IP_GATEWAY=38.145.32.254 -export PUBLIC_IP_FLOATING_START=38.145.32.16 -export PUBLIC_IP_FLOATING_END=38.145.32.250 - -# The total number of testenv-workers running, to allow for timeouts -# Should be slightly higher then the max number of CI slaves running. -export TOTALOVBENVS=70 - -export QUOTA_RAM=3145728 -export QUOTA_FIPS=75 -export QUOTA_NETS=1000 -export QUOTA_PORTS=10000 - -export UNDERCLOUD_FLAVOR="m1.small" -export BAREMETAL_FLAVOR="ci.m1.large" -export BMC_FLAVOR="ci.m1.medium" -export EXTRA_NODE_FLAVOR="ci.m1.small" -export BAREMETAL_IMAGE="CentOS-7-x86_64-GenericCloud-1708" - -export TEBROKERIP=192.168.100.250 diff --git a/scripts/tripleo-critical-bugs/README.md b/scripts/tripleo-critical-bugs/README.md deleted file mode 100644 index 954f2faf8..000000000 --- a/scripts/tripleo-critical-bugs/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Tool used to automated CIX escalations for Red Hat Openstack TripleO group. - -First time executing? - * cp config/critical-alert-escalation.cfg.sample config/critical-alert-escalation.cfg - - -./statusreport.py --trello_token $token --trello_api_key $key --trello_board_id $board_id diff --git a/scripts/tripleo-critical-bugs/config/critical-alert-escalation.cfg.sample b/scripts/tripleo-critical-bugs/config/critical-alert-escalation.cfg.sample deleted file mode 100644 index d0a0531b9..000000000 --- a/scripts/tripleo-critical-bugs/config/critical-alert-escalation.cfg.sample +++ /dev/null @@ -1,16 +0,0 @@ -# Each line is a launchpad project name, filter regex -[LaunchpadBugs] -TripleO=tripleo,.* -#Heat=heat,.* - -[TrelloConfig] -# now in the cli -#token= -#api_key= -#board_id= -list_outtage=Critical PChain Outage -list_tech_debt=Release Blocker Technical Debt -list_new=New / Triage - -[Bug] -delay: 5 diff --git a/scripts/tripleo-critical-bugs/reports/__init__.py b/scripts/tripleo-critical-bugs/reports/__init__.py deleted file mode 100644 index 9dd8c3ae1..000000000 --- a/scripts/tripleo-critical-bugs/reports/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# -# 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/scripts/tripleo-critical-bugs/reports/erhealth.py b/scripts/tripleo-critical-bugs/reports/erhealth.py deleted file mode 100644 index 22e95476f..000000000 --- a/scripts/tripleo-critical-bugs/reports/erhealth.py +++ /dev/null @@ -1,40 +0,0 @@ -import requests -import re - -base_url = "https://opendev.org/openstack/tripleo-ci-health-queries/raw/branch/master/output/elastic-recheck/" -health_url = "http://ci-health.tripleo.org/" - - -def get_health_link(bug_id): - response = requests.get(base_url + str(bug_id) + ".yaml") - if response.status_code == 200: - return "\n" + health_url + "#" + str(bug_id) - return "" - - -def get_bug_id_from_card(card): - """Finds LP bug id in card name""" - pattern = "^\\[CIX]\\[LP:((.*?))]" - match_found = re.search(pattern, card["name"]) - if match_found: - bug_id = match_found.group(1) - return bug_id - return None - - -def is_health_link_in_desc(card): - """Checks if card has health link in desc""" - pattern = health_url - return re.search(pattern, card["desc"]) - - -def add_health_link(card): - """Adds health link if present to card""" - # Updates health link in each card for now - # This doesn't check if health link is already present - bug_id = get_bug_id_from_card(card) - if bug_id: - health_link = get_health_link(bug_id) - desc = card["desc"] + health_link - return desc - return card["desc"] diff --git a/scripts/tripleo-critical-bugs/reports/launchpad.py b/scripts/tripleo-critical-bugs/reports/launchpad.py deleted file mode 100644 index 2be3c74c3..000000000 --- a/scripts/tripleo-critical-bugs/reports/launchpad.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python - -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import datetime -from datetime import timedelta -import pytz -import re - -from launchpadlib.launchpad import Launchpad - -""" this returns a list of launchpad bugs """ - - -class LaunchpadReport(object): - def __init__(self, bugs, config): - self.bugs = bugs - self.config = config - - def generate(self): - bugs_with_alerts_open = {} - bugs_with_alerts_closed = {} - launchpad = Launchpad.login_anonymously( - 'Red Hat Status Bot', 'production', '.cache', version='devel' - ) - bug_statuses_open = ['Confirmed', 'Triaged', 'In Progress', 'Fix Committed'] - bug_statuses_closed = ['Fix Released'] - for label, config_string in self.bugs.items(): - c = config_string.split(',') - project = launchpad.projects[c[0]] - filter_re = c[1] - for milestone in project.all_milestones: - if re.match(filter_re, milestone.name): - for task in project.searchTasks( - milestone=milestone, - status=bug_statuses_open, - tags='promotion-blocker', - ): - now = datetime.datetime.now(pytz.UTC) - delay = int(self.config.get('Bug', 'delay')) - delay_time = now - timedelta(hours=delay) - if delay_time > task.date_created: - bugs_with_alerts_open[task.bug.id] = task.bug - - for task in project.searchTasks( - milestone=milestone, - status=bug_statuses_closed, - importance='Critical', - tags='alert', - ): - bugs_with_alerts_closed[task.bug.id] = task.bug - return bugs_with_alerts_open, bugs_with_alerts_closed diff --git a/scripts/tripleo-critical-bugs/reports/trello.py b/scripts/tripleo-critical-bugs/reports/trello.py deleted file mode 100644 index 47480b8c3..000000000 --- a/scripts/tripleo-critical-bugs/reports/trello.py +++ /dev/null @@ -1,287 +0,0 @@ -#!/usr/bin/python - -import json -import os -from datetime import datetime - -import dateutil.parser -import pytz -import requests -from dateutil.relativedelta import relativedelta - -BOARD_BLACKLIST = os.environ.get('TRELLO_BOARD_BLACKLIST') - -# -# API CONTEXT OBJECT -# - - -class ApiContext(object): - def __init__(self, config): - self.config = config - self._apiVersion = 1 - self.apiToken = config.get('TrelloConfig', 'token') - self.apiKey = config.get('TrelloConfig', 'api_key') - self._payload = {'key': self.apiKey, 'token': self.apiToken} - - @property - def ApiRootUrl(self): - return "https://trello.com/%s" % self._apiVersion - - @property - def Payload(self): - return self._payload - - -# -# BOARDS -# -class Boards(object): - def __init__(self, context): - self._api = context - - # note: it's not currently possible to nuke a board, only to close it - def create(self, name, description=None): - "create a new board." - response = requests.post( - "%s/boards" % self._api.ApiRootUrl, - params=self._api.Payload, - data=dict(name=name, desc=description), - ) - response.raise_for_status() - jsonResponse = json.loads(response.text) - return jsonResponse - - def get_all_by_member(self, memberNameOrId): - "Obtain data struct for a board by name." - - memberBoardsUrl = '{0}/members/{1}/boards'.format( - self._api.ApiRootUrl, memberNameOrId - ) - response = requests.get(memberBoardsUrl, params=self._api.Payload) - response.raise_for_status() - jsonResponse = json.loads(response.text) - return jsonResponse - - def get_name(self, boardId): - "Obtain data struct for a board by name." - - memberBoardsUrl = '{0}/boards/{1}'.format(self._api.ApiRootUrl, boardId) - response = requests.get(memberBoardsUrl, params=self._api.Payload) - response.raise_for_status() - jsonResponse = json.loads(response.text) - return jsonResponse['name'] - - def get_all_by_member_and_name( - self, memberNameOrId, boardName, raiseExceptionIfDuplicates=True - ): - "Get all boards for a member, and return those matching a name (handles duplicate names)." - boards = self.get_all_by_member(memberNameOrId) - boardsToReturn = [b for b in boards if b['name'] == boardName] - - if raiseExceptionIfDuplicates: - if len(boardsToReturn) != 1: - raise AssertionError( - "ERROR: get_all_by_member_and_name({0}, {1}) - NO DUPES ALLOWED".format( - memberNameOrId, boardName - ) - ) - - return boardsToReturn - - def get_lists(self, boardId): - "Get all lists on a board." - - boardListsUrl = '{0}/boards/{1}/lists'.format(self._api.ApiRootUrl, boardId) - resp = requests.get(boardListsUrl, params=self._api.Payload) - resp.raise_for_status() - jsonResp = json.loads(resp.text) - return jsonResp - - def get_cards(self, boardId): - "Get all cards on a board." - - boardListsUrl = '{0}/boards/{1}/cards'.format(self._api.ApiRootUrl, boardId) - resp = requests.get(boardListsUrl, params=self._api.Payload) - resp.raise_for_status() - jsonResp = json.loads(resp.text) - return jsonResp - - def get_lists_by_name(self, boardId, listName, raiseExceptionIfDuplicates=True): - "Get all lists associated with a board by name." - lists = self.get_lists(boardId) - listsToReturn = [lst for lst in lists if lst['name'] == listName] - - if raiseExceptionIfDuplicates: - if len(listsToReturn) != 1: - raise AssertionError( - "ERROR: get_lists_by_name({0}, {1}) - NO DUPES ALLOWED".format( - boardId, listName - ) - ) - - return listsToReturn - - def get_lists_by_id(self, boardId, listId, raiseExceptionIfDuplicates=True): - "Get all lists associated with a board by id." - lists = self.get_lists(boardId) - listsToReturn = [lst for lst in lists if lst['id'] == listId] - - # if raiseExceptionIfDuplicates == True: - # if len(listsToReturn) != 1: - # raise AssertionError("ERROR: get_lists_by_id({0}, {1}) - NO DUPES ALLOWED".format(boardId, listId)) - - return listsToReturn - - # TODO: for now do this expensive way (getting everything and filtering) vs. a nice nuanced query - def get_single_by_member_and_name(self, memberNameOrId, boardName): - board = self.get_all_by_member_and_name(memberNameOrId, boardName) - id = board[0]['id'] - return id - - def get_single_list_by_name(self, boardId, listName): - lists = self.get_lists_by_name(boardId, listName) - id = lists[0]['id'] - return id - - def get_single_list_by_id(self, boardId, listId): - lists = self.get_lists_by_id(boardId, listId) - try: - name = lists[0]['name'] - except IndexError: - name = "unknown" - return name - - -# -# MEMBERS -# -class Members(object): - def __init__(self, context): - self._api = context - - def get_member(self, memberName): - "Get member data based on name" - membersUrl = '{0}/members/{1}'.format(self._api.ApiRootUrl, memberName) - response = requests.get(membersUrl, params=self._api.Payload) - response.raise_for_status() - return json.loads(response.text) - - def get_member_id(self, memberName): - "Get member id based on name" - return self.get_member(memberName)['id'] - - def get_member_name(self, memberId): - "Get member name based on id" - return self.get_member(memberId)['fullName'].encode('ascii', 'ignore') - - def get_member_names_from_list(self, memberId): - "Get member name based on id" - if isinstance(memberId, list): - names = [self.get_member_name(member) for member in memberId] - return ', '.join(names) - else: - raise TypeError() - - def get_member_cards(self, memberId): - # get all the open cards from a particular member - membersUrl = '{0}/members/{1}/cards/open'.format(self._api.ApiRootUrl, memberId) - response = requests.get(membersUrl, params=self._api.Payload) - response.raise_for_status() - - # scrub trello cards for blacklisted boards - data = json.loads(response.text) - remove_list = [] - # create a list of cards that are blacklisted - for i in range(len(data)): - if BOARD_BLACKLIST == data[i]['idBoard'].encode("ascii"): - remove_list.append(i) - return data - - -# -# CARDS -# -class Cards(object): - def __init__(self, context): - self._api = context - - def get_card(self, cardId): - cardUrl = '{0}/cards/{1}'.format(self._api.ApiRootUrl, cardId) - response = requests.get(cardUrl, params=self._api.Payload) - response.raise_for_status() - return json.loads(response.text) - - def get_card_due_date(self, cardId): - "Get member id based on name" - return self.get_card(cardId)['due'] - - def get_card_labels(self, cardId): - return self.get_card(cardId)['labels'] - - def get_card_members(self, cardId): - return self.get_card(cardId)['idMembers'] - - def create(self, name, idList, due=None, desc=None): - "create a new card, optionally setting a due date and description." - response = requests.post( - "%s/cards" % self._api.ApiRootUrl, - params=self._api.Payload, - data=dict(name=name, idList=idList, due=due, desc=desc), - ) - response.raise_for_status() - return json.loads(response.text) - - def add_comment_to_card(self, cardId, comment): - "Add a member to a card" - postMemberToCardUrl = '{0}/cards/{1}/actions/comments'.format( - self._api.ApiRootUrl, cardId - ) - response = requests.post( - postMemberToCardUrl, params=self._api.Payload, data={'text': comment} - ) - response.raise_for_status() - return json.loads(response.text) - - def add_due_date_to_card(self, card, date): - "Add a due date to a trello card" - putDueDateToCardUrl = '{0}/cards/{1}'.format(self._api.ApiRootUrl, card['id']) - response = requests.put( - putDueDateToCardUrl, params=self._api.Payload, data={'due': date} - ) - response.raise_for_status() - return json.loads(response.text) - - def check_card_overdue(self, cardId, blocking_labels, overdue_notice): - now = datetime.now(pytz.utc) - due = dateutil.parser.parse(self.get_card_due_date(cardId)) - delta = relativedelta(now, due) - if delta.days > 0 or delta.months > 0: - if not self.check_card_blocked_label(cardId, blocking_labels): - self.add_comment_to_card(cardId, overdue_notice) - return True - else: - return False - - def check_card_blocked_label(self, cardId, blocking_labels): - labels = self.get_card_labels(cardId) - if [label for label in labels if label['name'] in blocking_labels]: - return True - else: - return False - - def get_cards(self, listId, filterArg="all"): - "Get cards on a given list" - getCardsUrl = '{0}/lists/{1}/cards/{2}'.format( - self._api.ApiRootUrl, listId, filterArg - ) - response = requests.get(getCardsUrl, params=self._api.Payload) - response.raise_for_status() - return json.loads(response.text) - - def update(self, card_id, desc): - "update card" - url = "%s/cards/%s" % (self._api.ApiRootUrl, card_id) - response = requests.put(url, params=self._api.Payload, data=dict(desc=desc)) - response.raise_for_status() - return json.loads(response.text) diff --git a/scripts/tripleo-critical-bugs/requirements.txt b/scripts/tripleo-critical-bugs/requirements.txt deleted file mode 100644 index 104bf2ffb..000000000 --- a/scripts/tripleo-critical-bugs/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -click -configparser -launchpadlib==1.10.5 -python-dateutil -#pytz==2015.7 -pytz -requests diff --git a/scripts/tripleo-critical-bugs/statusreport.py b/scripts/tripleo-critical-bugs/statusreport.py deleted file mode 100755 index 74c4f32c3..000000000 --- a/scripts/tripleo-critical-bugs/statusreport.py +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/env python - -# The MIT License (MIT) -# Copyright (c) 2017 Wes Hayutin -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -""" -takes a list of launchpad bugs that have the tag 'promotion-blocker' -then compares the list to cards on the cix trello board. If there -is a lp bug that does not have a card it will open a trello card -""" - -import click -import configparser - -from reports.erhealth import get_health_link, add_health_link, is_health_link_in_desc -from reports.launchpad import LaunchpadReport -import reports.trello as trello - - -class StatusReport(object): - """ - compares a list of launchpad bugs to a list - of trello cards. - """ - - def __init__(self, config): - self.config = config - self.brief_status = {} - self.detailed_status = {} - - def summarise_launchpad_bugs(self): - """ - a list of open bugs with promotion-blocker - also returns a list of closed bugs if action needs to - be taken - """ - if not self.config.has_section('LaunchpadBugs'): - return - - bugs = self.config["LaunchpadBugs"] - report = LaunchpadReport(bugs, self.config) - bugs_with_alerts_open, bugs_with_alerts_closed = report.generate() - return bugs_with_alerts_open, bugs_with_alerts_closed - - def print_report(self, bug_list): - """print the bugs to the console""" - bug_number_list = [] - for key, value in bug_list.items(): - print(key) - bug_number_list.append(str(key)) - return bug_number_list - - def _get_config_items(self, section_name, prefix=None): - if not self.config.has_section(section_name): - return {} - - items = { - k: v - for (k, v) in self.config.items(section_name) - if not k.startswith('_') and (prefix is None or k.startswith(prefix)) - } - return items - - def compare_bugs_with_cards(self, list_of_bugs, cards): - """ - compare a list of bugs to trello cards by checking for - the bug number in the title of the trello card - """ - open_bugs = list_of_bugs - cards_outtage_names = [] - for card in cards: - cards_outtage_names.append(card['name']) - print(card['name'].encode('utf-8')) - - match = [] - for card in cards_outtage_names: - for key in open_bugs: - key = str(key) - if key in card: - match.append(int(key)) - print("##########################################") - print("openbugs " + str(set(open_bugs))) - print("match " + str(set(match))) - critical_bugs_with_out_escalation_cards = list(set(open_bugs) - set(match)) - return critical_bugs_with_out_escalation_cards - - def create_escalation( - self, config, critical_bugs_with_out_escalation_cards, list_of_bugs, trello_list - ): - """ - create a trello card in the triage list of the cix board - """ - if not critical_bugs_with_out_escalation_cards: - print("There are no bugs that require a new escalation") - else: - # send email to list - for bug in critical_bugs_with_out_escalation_cards: - bug_title = list_of_bugs[bug].title - bug_link = list_of_bugs[bug].web_link - health_link = get_health_link(list_of_bugs[bug].id) - - card_title = ( - "[CIX][LP:" + str(bug) + "][tripleoci][proa] " + str(bug_title) - ) - - # create escalation card - trello_api_context = trello.ApiContext(config) - trello_cards = trello.Cards(trello_api_context) - trello_cards.create( - card_title, trello_list, desc=bug_link + health_link - ) - - -@click.command() -@click.option( - "--config_file", - default="config/critical-alert-escalation.cfg", - help="Defaults to 'config/critical-alert-escalation.cfg'", -) -@click.option("--trello_token", required=True, help="Your Trello Token") -@click.option("--trello_api_key", required=True, help="Your Trello api key") -@click.option("--trello_board_id", required=True, help="The trello board id") -def main(config_file, trello_token, trello_api_key, trello_board_id): - """ - get the list of promotion-blocker bugs - compare the list to trello - create cards as needed - """ - - config = configparser.ConfigParser() - config.read(config_file) - config['TrelloConfig']['token'] = trello_token - config['TrelloConfig']['api_key'] = trello_api_key - config['TrelloConfig']['board_id'] = trello_board_id - - report = StatusReport(config) - - bugs_with_alerts_open, bugs_with_alerts_closed = report.summarise_launchpad_bugs() - - print("*** open critical bugs ***") - print("*** closed critical bugs ***") - report.print_report(bugs_with_alerts_closed) - - trello_api_context = trello.ApiContext(config) - trello_boards = trello.Boards(trello_api_context) - - trello_new_list = trello_boards.get_lists_by_name( - config.get('TrelloConfig', 'board_id'), config.get('TrelloConfig', 'list_new') - ) - trello_new_list_id = str(trello_new_list[0]['id']) - - all_cards_on_board = trello_boards.get_cards(config.get('TrelloConfig', 'board_id')) - print("all cards " + str(len(all_cards_on_board))) - - # Add health link if available to card without health link - for card in all_cards_on_board: - if not is_health_link_in_desc(card): - desc = add_health_link(card) - trello_api_context = trello.ApiContext(config) - trello_cards = trello.Cards(trello_api_context) - trello_cards.update(card["id"], desc) - print("Updated card " + card["name"]) - cards_outtage = all_cards_on_board - - critical_bugs_with_out_escalation_cards = report.compare_bugs_with_cards( - bugs_with_alerts_open, cards_outtage - ) - print( - "critical bugs not tracked on board " - + str(critical_bugs_with_out_escalation_cards) - ) - - report.create_escalation( - config, - critical_bugs_with_out_escalation_cards, - bugs_with_alerts_open, - trello_new_list_id, - ) - - -if __name__ == '__main__': - main() diff --git a/scripts/tripleo.sh b/scripts/tripleo.sh deleted file mode 100755 index ed3ebb339..000000000 --- a/scripts/tripleo.sh +++ /dev/null @@ -1,1489 +0,0 @@ -#!/bin/bash -# Copyright 2015 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -############################################################################## -# tripleo.sh is a script to automate a TripleO setup. It's goals are to be -# used in aiding: -# -# - developer setups -# - CI -# - documentation generation (hopefully) -# -# It's not a new CLI, or end user facing wrapper around existing TripleO -# CLI's. -# -# tripleo.sh should never contain any "business" logic in it that is -# necessary for a successful deployment. It should instead just mirror the -# steps that we document for TripleO end users. -# -############################################################################## - - -set -eu -set -o pipefail - -SCRIPT_NAME=${SCRIPT_NAME:-$(basename $0)} - -function show_options { - echo "Usage: $SCRIPT_NAME [options]" - echo - echo "Automates TripleO setup steps." - echo - echo "$SCRIPT_NAME is also configurable via environment variables, most of" - echo "which are not exposed via cli args for simplicity. See the source" - echo "for the set of environment variables that can be overridden." - echo - echo "Note that cli args always take precedence over environment" - echo "variables." - echo - echo "Options:" - echo " --repo-setup -- Perform repository setup." - echo " --delorean-setup -- Install local delorean build environment." - echo " --delorean-build -- Build a delorean package locally" - echo " --multinode-setup -- Perform multinode setup." - echo " --bootstrap-subnodes -- Perform bootstrap setup on subnodes. WARNING bootstrap-subnodes is deprecated and will be removed." - echo " --setup-nodepool-files -- Setup nodepool files on subnodes." - echo " --undercloud -- Install the undercloud." - echo " --overcloud-images -- Build and load overcloud images." - echo " --register-nodes -- Register and configure nodes." - echo " --introspect-nodes -- Introspect nodes." - echo " --undercloud-upgrade -- Upgrade a deployed undercloud." - echo " --overcloud-deploy -- Deploy an overcloud." - echo " --overcloud-update -- Update a deployed overcloud." - echo " --overcloud-upgrade -- Upgrade a deployed overcloud." - echo " --overcloud-upgrade-converge -- Finish (converge) upgrade of a deployed overcloud." - echo " --overcloud-delete -- Delete the overcloud." - echo " --use-containers -- Use a containerized compute node." - echo " --enable-check -- Enable checks on update." - echo " --overcloud-sanitytest -- Run some basic crud checks for each service." - echo " --skip-sanitytest-create -- Do not create resources when performing a sanitytest (assume they exist)." - echo " --skip-sanitytest-cleanup -- Do not delete the created resources when performing a sanitytest." - echo " --run-tempest -- Run tempest tests." - echo " --all, -a -- Run all of the above commands." - echo " -x -- enable tracing" - echo " --help, -h -- Print this help message." - echo - exit 1 -} - -if [ ${#@} = 0 ]; then - show_options - exit 1 -fi - -TEMP=$(getopt -o ,h \ - -l,help,repo-setup,delorean-setup,delorean-build,multinode-setup,bootstrap-subnodes,undercloud,overcloud-images,register-nodes,introspect-nodes,overcloud-deploy,overcloud-update,overcloud-upgrade,overcloud-upgrade-converge,overcloud-delete,use-containers,undercloud-upgrade,all,enable-check,run-tempest,setup-nodepool-files,overcloud-sanitytest,skip-sanitytest-create,skip-sanitytest-cleanup \ - -o,x,h,a \ - -n $SCRIPT_NAME -- "$@") - -if [ $? != 0 ]; then - show_options - exit 1 -fi - -# Note the quotes around `$TEMP': they are essential! -eval set -- "$TEMP" - -TRIPLEO_ROOT=${TRIPLEO_ROOT:-$HOME/tripleo} - -# Source deploy.env if it exists. It should exist if we are running under -# tripleo-ci -if [ -f "$TRIPLEO_ROOT/tripleo-ci/deploy.env" ]; then - source $TRIPLEO_ROOT/tripleo-ci/deploy.env -fi - -ALL=${ALL:-""} -TRIPLEO_HEAT_TEMPLATES_ROOT=${TRIPLEO_HEAT_TEMPLATES_ROOT:-"/usr/share/openstack-tripleo-heat-templates"} -CONTAINER_ARGS=${CONTAINER_ARGS:-"-e ${TRIPLEO_HEAT_TEMPLATES_ROOT}/environments/docker.yaml --libvirt-type=qemu"} -STABLE_RELEASE=${STABLE_RELEASE:-} -REVIEW_RELEASE=${REVIEW_RELEASE:-} -UPGRADE_RELEASE=${UPGRADE_RELEASE:-""} -DELOREAN_REPO_FILE=${DELOREAN_REPO_FILE:-"delorean.repo"} -DELOREAN_REPO_URL=${DELOREAN_REPO_URL:-"\ - https://trunk.rdoproject.org/centos7/current-tripleo/"} -DELOREAN_STABLE_REPO_URL=${DELOREAN_STABLE_REPO_URL:-"\ - https://trunk.rdoproject.org/centos7-$STABLE_RELEASE/current/"} -ATOMIC_URL=${ATOMIC_URL:-"https://download.fedoraproject.org/pub/alt/atomic/stable/Cloud-Images/x86_64/Images/Fedora-Cloud-Atomic-23-20160308.x86_64.qcow2"} -INSTACKENV_JSON_PATH=${INSTACKENV_JSON_PATH:-"$HOME/instackenv.json"} -INTROSPECT_NODES=${INTROSPECT_NODES:-""} -REGISTER_NODES=${REGISTER_NODES:-""} -OVERCLOUD_DEPLOY=${OVERCLOUD_DEPLOY:-""} -OVERCLOUD_DELETE=${OVERCLOUD_DELETE:-""} -OVERCLOUD_DELETE_TIMEOUT=${OVERCLOUD_DELETE_TIMEOUT:-"300"} -OVERCLOUD_DEPLOY_ARGS=${OVERCLOUD_DEPLOY_ARGS:-""} -OVERCLOUD_VALIDATE_ARGS=${OVERCLOUD_VALIDATE_ARGS-"--validation-warnings-fatal"} -OVERCLOUD_UPDATE=${OVERCLOUD_UPDATE:-""} -OVERCLOUD_UPGRADE=${OVERCLOUD_UPGRADE:-""} -OVERCLOUD_UPGRADE_CONVERGE=${OVERCLOUD_UPGRADE_CONVERGE:-""} -OVERCLOUD_UPDATE_RM_FILES=${OVERCLOUD_UPDATE_RM_FILES:-"1"} -OVERCLOUD_UPDATE_ARGS=${OVERCLOUD_UPDATE_ARGS:-"$OVERCLOUD_DEPLOY_ARGS $OVERCLOUD_VALIDATE_ARGS"} -OVERCLOUD_UPDATE_CHECK=${OVERCLOUD_UPDATE_CHECK:-} -OVERCLOUD_IMAGES_PATH=${OVERCLOUD_IMAGES_PATH:-"$HOME"} -OVERCLOUD_IMAGES_YAML_PATH=${OVERCLOUD_IMAGES_YAML_PATH:-"/usr/share/openstack-tripleo-common/image-yaml"} -OVERCLOUD_IMAGES=${OVERCLOUD_IMAGES:-""} -OVERCLOUD_IMAGES_LEGACY_ARGS=${OVERCLOUD_IMAGES_LEGACY_ARGS:-"--all"} -OVERCLOUD_IMAGES_ARGS=${OVERCLOUD_IMAGES_ARGS:-"--output-directory $OVERCLOUD_IMAGES_PATH --config-file $OVERCLOUD_IMAGES_YAML_PATH/overcloud-images.yaml --config-file $OVERCLOUD_IMAGES_YAML_PATH/overcloud-images-centos7.yaml"} -OVERCLOUD_NAME=${OVERCLOUD_NAME:-"overcloud"} -OVERCLOUD_UPGRADE_THT_PATH=${OVERCLOUD_UPGRADE_THT_PATH:-"/usr/share/openstack-tripleo-heat-templates"} -OVERCLOUD_UPGRADE_ARGS=${OVERCLOUD_UPGRADE_ARGS:-"-e $OVERCLOUD_UPGRADE_THT_PATH/overcloud-resource-registry-puppet.yaml $OVERCLOUD_DEPLOY_ARGS -e $OVERCLOUD_UPGRADE_THT_PATH/environments/major-upgrade-composable-steps.yaml -e $HOME/init-repo.yaml --templates $OVERCLOUD_UPGRADE_THT_PATH"} -OVERCLOUD_UPGRADE_CONVERGE_ARGS=${OVERCLOUD_UPGRADE_CONVERGE_ARGS:-"-e $OVERCLOUD_UPGRADE_THT_PATH/overcloud-resource-registry-puppet.yaml $OVERCLOUD_DEPLOY_ARGS -e $OVERCLOUD_UPGRADE_THT_PATH/environments/major-upgrade-converge.yaml --templates $OVERCLOUD_UPGRADE_THT_PATH"} -UNDERCLOUD_UPGRADE=${UNDERCLOUD_UPGRADE:-""} -OVERCLOUD_SANITYTEST_SKIP_CREATE=${OVERCLOUD_SANITYTEST_SKIP_CREATE:-""} -OVERCLOUD_SANITYTEST_SKIP_CLEANUP=${OVERCLOUD_SANITYTEST_SKIP_CLEANUP:-""} -OVERCLOUD_SANITYTEST=${OVERCLOUD_SANITYTEST:-""} -SANITYTEST_CONTENT_NAME=${SANITYTEST_CONTENT_NAME:-"sanity_test"} -UNDERCLOUD_SANITY_CHECK=${UNDERCLOUD_SANITY_CHECK:-""} -REPO_SETUP=${REPO_SETUP:-""} -REPO_PREFIX=${REPO_PREFIX:-"/etc/yum.repos.d/"} -CACHEUPLOAD=${CACHEUPLOAD:-"0"} -OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF=${OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF:-"\ - $REPO_PREFIX/delorean.repo \ - $REPO_PREFIX/delorean-current.repo \ - $REPO_PREFIX/delorean-deps.repo"} -CEPH_RELEASE=jewel -CEPH_REPO_FILE=centos-ceph-$CEPH_RELEASE.repo -if [[ -e /etc/ci/mirror_info.sh ]]; then - source /etc/ci/mirror_info.sh -fi -NODEPOOL_CENTOS_MIRROR=${NODEPOOL_CENTOS_MIRROR:-http://mirror.centos.org/centos} -NODEPOOL_RDO_PROXY=${NODEPOOL_RDO_PROXY:-https://trunk.rdoproject.org} -NODEPOOL_BUILDLOGS_CENTOS_PROXY="${NODEPOOL_BUILDLOGS_CENTOS_PROXY:-https://buildlogs.centos.org}" -NODEPOOL_CBS_CENTOS_PROXY="${NODEPOOL_CBS_CENTOS_PROXY:-https://cbs.centos.org/repos}" -OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF=${OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF}"\ - $REPO_PREFIX/$CEPH_REPO_FILE" -OPSTOOLS_REPO_ENABLED=${OPSTOOLS_REPO_ENABLED:-"0"} -if [[ "${OPSTOOLS_REPO_ENABLED}" = 1 ]]; then - OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF=${OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF}"\ - $REPO_PREFIX/centos-opstools.repo" -fi -FEATURE_BRANCH=${FEATURE_BRANCH:-} -DELOREAN_SETUP=${DELOREAN_SETUP:-""} -DELOREAN_BUILD=${DELOREAN_BUILD:-""} -MULTINODE_SETUP=${MULTINODE_SETUP:-""} -MULTINODE_ENV_NAME=${MULTINODE_ENV_NAME:-} -MTU=${MTU:-"1450"} -BOOTSTRAP_SUBNODES=${BOOTSTRAP_SUBNODES:-""} -SETUP_NODEPOOL_FILES=${SETUP_NODEPOOL_FILES:-""} -PRIMARY_NODE_IP=${PRIMARY_NODE_IP:-""} -SUB_NODE_IPS=${SUB_NODE_IPS:-""} -NODEPOOL_REGION=${NODEPOOL_REGION:-"nodepool_region"} -NODEPOOL_CLOUD=${NODEPOOL_CLOUD:-"nodepool_cloud"} -STDERR=/dev/null -UNDERCLOUD=${UNDERCLOUD:-""} -UNDERCLOUD_CONF=${UNDERCLOUD_CONF:-"/usr/share/instack-undercloud/undercloud.conf.sample"} -UNDERCLOUD_SSL=${UNDERCLOUD_SSL:-""} -BASE=${BASE:-$TRIPLEO_ROOT} -USE_CONTAINERS=${USE_CONTAINERS:-""} -TEMPEST_RUN=${TEMPEST_RUN:-""} -TEMPEST_ARGS=${TEMPEST_ARGS:-"--parallel --subunit"} -TEMPEST_ADD_CONFIG=${TEMPEST_ADD_CONFIG:-} -TEMPEST_REGEX=${TEMPEST_REGEX:-"^(?=(.*smoke))(?!(tempest.api.orchestration.stacks|tempest.scenario.test_volume_boot_pattern|tempest.api.telemetry))"} -TEMPEST_PINNED="72ccabcb685df7c3e28cd25639b05d8a031901c8" -SSH_OPTIONS=${SSH_OPTIONS:-'-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=Verbose -o PasswordAuthentication=no -o ConnectionAttempts=32'} -ALT_OVERCLOUDRC=${ALT_OVERCLOUDRC:-""} -export SCRIPTS_DIR=$(dirname ${BASH_SOURCE[0]:-$0}) -OVB=${OVB:-0} - -# Make sure we use Puppet to deploy packages on scenario upgrades jobs after ocata release -if [[ "${STABLE_RELEASE}" != "newton" ]] ; then - OVERCLOUD_UPGRADE_ARGS="$OVERCLOUD_UPGRADE_ARGS -e $TRIPLEO_ROOT/tripleo-ci/test-environments/enable_package_install.yaml " - OVERCLOUD_UPGRADE_CONVERGE_ARGS="$OVERCLOUD_UPGRADE_CONVERGE_ARGS -e $TRIPLEO_ROOT/tripleo-ci/test-environments/enable_package_install.yaml " -fi -# Temporary workarounds - -while true ; do - case "$1" in - --all|-a ) ALL="1"; shift 1;; - --use-containers) USE_CONTAINERS="1"; shift 1;; - --enable-check) OVERCLOUD_UPDATE_CHECK="1"; shift 1;; - --introspect-nodes) INTROSPECT_NODES="1"; shift 1;; - --register-nodes) REGISTER_NODES="1"; shift 1;; - --overcloud-deploy) OVERCLOUD_DEPLOY="1"; shift 1;; - --overcloud-update) OVERCLOUD_UPDATE="1"; shift 1;; - --overcloud-upgrade) OVERCLOUD_UPGRADE="1"; shift 1;; - --overcloud-upgrade-converge) OVERCLOUD_UPGRADE_CONVERGE="1"; shift 1;; - --overcloud-delete) OVERCLOUD_DELETE="1"; shift 1;; - --overcloud-images) OVERCLOUD_IMAGES="1"; shift 1;; - --overcloud-sanitytest) OVERCLOUD_SANITYTEST="1"; shift 1;; - --skip-sanitytest-create) OVERCLOUD_SANITYTEST_SKIP_CREATE="1"; shift 1;; - --skip-sanitytest-cleanup) OVERCLOUD_SANITYTEST_SKIP_CLEANUP="1"; shift 1;; - --run-tempest) TEMPEST_RUN="1"; shift 1;; - --repo-setup) REPO_SETUP="1"; shift 1;; - --delorean-setup) DELOREAN_SETUP="1"; shift 1;; - --delorean-build) DELOREAN_BUILD="1"; shift 1;; - --undercloud) UNDERCLOUD="1"; shift 1;; - --undercloud-upgrade) UNDERCLOUD_UPGRADE="1"; shift 1;; - --multinode-setup) MULTINODE_SETUP="1"; shift 1;; - --bootstrap-subnodes) BOOTSTRAP_SUBNODES="1"; shift 1;; - --setup-nodepool-files) SETUP_NODEPOOL_FILES="1"; shift 1;; - -x) set -x; STDERR=/dev/stderr; shift 1;; - -h | --help) show_options 0;; - --) shift ; break ;; - *) echo "Error: unsupported option $1." ; exit 1 ;; - esac -done - -function log { - echo "#################" - echo -n "$SCRIPT_NAME -- " - echo $@ - echo "#################" -} - -function source_rc { - if [ $1 = "stackrc" ]; then - cloud="Undercloud" - else - cloud="Overcloud" - fi - echo "You must source a $1 file for the $cloud." - echo "Attempting to source $HOME/$1" - source $HOME/$1 - echo "Done" -} - -function stackrc_check { - source_rc "stackrc" -} - -function overcloudrc_check { - if [ -z "$ALT_OVERCLOUDRC" ]; then - source_rc "overcloudrc" - else - source_rc "$ALT_OVERCLOUDRC" - fi -} - -function repo_setup { - - log "Repository setup" - - sudo yum clean metadata - - # sets $TRIPLEO_OS_FAMILY and $TRIPLEO_OS_DISTRO - source $(dirname ${BASH_SOURCE[0]:-$0})/set-os-type - - if [ "$TRIPLEO_OS_DISTRO" = "centos" ]; then - # Enable Storage/SIG Ceph repo - if rpm -q centos-release-ceph-jewel; then - sudo yum -y erase centos-release-ceph-jewel - fi - sudo /bin/bash -c "cat <<-EOF>$REPO_PREFIX/$CEPH_REPO_FILE -[centos-ceph-$CEPH_RELEASE] -name=centos-ceph-$CEPH_RELEASE -baseurl=$NODEPOOL_CENTOS_MIRROR/7/storage/x86_64/ceph-$CEPH_RELEASE/ -gpgcheck=0 -enabled=1 -EOF" - if [[ "${OPSTOOLS_REPO_ENABLED}" = 1 ]]; then - sudo /bin/bash -c "cat <<-EOF>$REPO_PREFIX/centos-opstools.repo -[centos-opstools] -name=centos-opstools -baseurl=$NODEPOOL_CENTOS_MIRROR/7/opstools/x86_64/ -gpgcheck=0 -enabled=1 -EOF" - fi - fi - # @matbu TBR debuginfo: - log "Stable release: $STABLE_RELEASE" - if [ -z "$STABLE_RELEASE" ]; then - # Enable the Delorean Deps repository - sudo curl -fLvo $REPO_PREFIX/delorean-deps.repo https://trunk.rdoproject.org/centos7/delorean-deps.repo - sudo sed -i -e 's%priority=.*%priority=30%' $REPO_PREFIX/delorean-deps.repo - sudo sed -i -e "s~http://mirror.centos.org/centos~$NODEPOOL_CENTOS_MIRROR~" $REPO_PREFIX/delorean-deps.repo - sudo sed -i -e "s~https://buildlogs.centos.org~$NODEPOOL_BUILDLOGS_CENTOS_PROXY~" $REPO_PREFIX/delorean-deps.repo - sudo sed -i -e "s~https://trunk.rdoproject.org~$NODEPOOL_RDO_PROXY~" $REPO_PREFIX/delorean-deps.repo - cat $REPO_PREFIX/delorean-deps.repo - - # Enable last known good RDO Trunk Delorean repository - sudo curl -fLvo $REPO_PREFIX/delorean.repo $DELOREAN_REPO_URL/$DELOREAN_REPO_FILE - sudo sed -i -e 's%priority=.*%priority=20%' $REPO_PREFIX/delorean.repo - sudo sed -i -e "s~https://trunk.rdoproject.org~$NODEPOOL_RDO_PROXY~" $REPO_PREFIX/delorean.repo - cat $REPO_PREFIX/delorean.repo - - # Enable latest RDO Trunk Delorean repository if not promotion job - if [[ $CACHEUPLOAD != 1 ]]; then - sudo curl -fLvo $REPO_PREFIX/delorean-current.repo https://trunk.rdoproject.org/centos7/current/delorean.repo - sudo sed -i -e 's%priority=.*%priority=10%' $REPO_PREFIX/delorean-current.repo - sudo sed -i 's/\[delorean\]/\[delorean-current\]/' $REPO_PREFIX/delorean-current.repo - sudo sed -i -e "s~https://trunk.rdoproject.org~$NODEPOOL_RDO_PROXY~" $REPO_PREFIX/delorean-current.repo - sudo /bin/bash -c "cat <<-EOF>>$REPO_PREFIX/delorean-current.repo - -includepkgs=diskimage-builder,instack,instack-undercloud,os-apply-config,os-collect-config,os-net-config,os-refresh-config,python-tripleoclient,openstack-tripleo-*,openstack-puppet-modules,puppet-* -EOF" - else - # Create empty delorean-current for dib image building - sudo sh -c "> $REPO_PREFIX/delorean-current.repo" - fi - cat $REPO_PREFIX/delorean-current.repo - else - # Enable the Delorean Deps repository - sudo curl -fLvo $REPO_PREFIX/delorean-deps.repo https://trunk.rdoproject.org/centos7-$STABLE_RELEASE/delorean-deps.repo - sudo sed -i -e 's%priority=.*%priority=30%' $REPO_PREFIX/delorean-deps.repo - sudo sed -i -e "s~http://mirror.centos.org/centos~$NODEPOOL_CENTOS_MIRROR~" $REPO_PREFIX/delorean-deps.repo - sudo sed -i -e "s~https://buildlogs.centos.org~$NODEPOOL_BUILDLOGS_CENTOS_PROXY~" $REPO_PREFIX/delorean-deps.repo - cat $REPO_PREFIX/delorean-deps.repo - - # Enable delorean current for the stable version - sudo curl -fLvo $REPO_PREFIX/delorean.repo $DELOREAN_STABLE_REPO_URL/$DELOREAN_REPO_FILE - sudo sed -i -e 's%priority=.*%priority=20%' $REPO_PREFIX/delorean.repo - sudo sed -i -e "s~https://trunk.rdoproject.org~$NODEPOOL_RDO_PROXY~" $REPO_PREFIX/delorean.repo - cat $REPO_PREFIX/delorean.repo - - # Create empty delorean-current for dib image building - sudo sh -c "> $REPO_PREFIX/delorean-current.repo" - cat $REPO_PREFIX/delorean-current.repo - fi - - # Install the yum-plugin-priorities package so that the Delorean repository - # takes precedence over the main RDO repositories. - sudo yum -y install yum-plugin-priorities - - # Make sure EPEL is uninstalled. - if rpm --quiet -q epel-release; then - sudo rpm -e epel-release - fi - - sudo yum clean all - sudo yum makecache - - log "Repository setup - DONE." - -} - -function delorean_setup { - - log "Delorean setup" - - # Install delorean as per combination of toci-instack and delorean docs - sudo yum install -y createrepo git mock rpm-build yum-plugin-priorities yum-utils gcc rpmdevtools redhat-rpm-config - - # NOTE(pabelanger): Check if virtualenv is already install, if not install - # from packages. - if ! command -v virtualenv ; then - sudo yum install -y python-virtualenv - fi - - # Workaround until https://review.opendev.org/#/c/311734/ is merged and a new image is built - sudo yum install -y libffi-devel openssl-devel - - # Add the current user to the mock group - sudo usermod -G mock -a $(id -nu) - - mkdir -p $TRIPLEO_ROOT - [ -d $TRIPLEO_ROOT/delorean ] || git clone https://github.com/softwarefactory-project/DLRN.git $TRIPLEO_ROOT/delorean - - pushd $TRIPLEO_ROOT/delorean - - sudo rm -rf data commits.sqlite - mkdir -p data - - sed -i -e "s%reponame=.*%reponame=delorean-ci%" projects.ini - sed -i -e "s%target=.*%target=centos%" projects.ini - - # Remove the rpm install test to speed up delorean (our ci test will to this) - if [ -f scripts/build_rpm.sh ]; then - # DLRN < 0.8.0 - sed -i -e 's%--postinstall%%' scripts/build_rpm.sh - else - # This is an option in DLRN since 0.8.0 for the mock build driver - sed -i -e 's/^#install_after_build=1.*/install_after_build=0/' projects.ini - fi - - virtualenv venv - # NOTE(pabelanger): We need to update setuptools to the latest version for - # CentOS 7. Also, pytz is not declared as a dependency so we need to - # manually add it. Lastly, use pip install . to use wheel AFS pypi mirrors. - ./venv/bin/pip install -U pip - ./venv/bin/pip install -U setuptools - ./venv/bin/pip install pytz - ./venv/bin/pip install . - - popd - log "Delorean setup - DONE." -} - -function delorean_build { - - log "Delorean build" - - export PATH=/sbin:/usr/sbin:$PATH - source $(dirname ${BASH_SOURCE[0]:-$0})/common_functions.sh - - pushd $TRIPLEO_ROOT/delorean - - if [ -n "$REVIEW_RELEASE" ]; then - log "Building for release $REVIEW_RELEASE" - # first check if we have a stable release - sed -i -e "s%baseurl=.*%baseurl=$NODEPOOL_RDO_PROXY/centos7-$REVIEW_RELEASE%" projects.ini - # RDO changed the distgit branch for stable releases starting from newton. - sed -i -e "s%distro=.*%distro=$REVIEW_RELEASE-rdo%" projects.ini - sed -i -e "s%source=.*%source=stable/$REVIEW_RELEASE%" projects.ini - elif [ -n "$FEATURE_BRANCH" ]; then - # next, check if we are testing for a feature branch - log "Building for feature branch $FEATURE_BRANCH" - sed -i -e "s%baseurl=.*%baseurl=$NODEPOOL_RDO_PROXY/centos7%" projects.ini - sed -i -e "s%distro=.*%distro=rpm-$FEATURE_BRANCH%" projects.ini - sed -i -e "s%source=.*%source=$FEATURE_BRANCH%" projects.ini - else - log "Building for master" - sed -i -e "s%baseurl=.*%baseurl=$NODEPOOL_RDO_PROXY/centos7%" projects.ini - sed -i -e "s%distro=.*%distro=rpm-master%" projects.ini - sed -i -e "s%source=.*%source=master%" projects.ini - fi - - sudo rm -rf data commits.sqlite - mkdir -p data - - # build packages - # loop through each of the projects listed in DELOREAN_BUILD_REFS, if it is a project we - # are capable of building an rpm for then build it. - # e.g. DELOREAN_BUILD_REFS="openstack/cinder openstack/heat etc.." - for PROJ in $DELOREAN_BUILD_REFS ; do - log "Building $PROJ" - - PROJ=$(filterref $PROJ) - - # Clone the repo if it doesn't yet exist - if [ ! -d $TRIPLEO_ROOT/$PROJ ]; then - git clone https://opendev.org/openstack/$PROJ.git $TRIPLEO_ROOT/$PROJ - if [ ! -z "$REVIEW_RELEASE" ]; then - pushd $TRIPLEO_ROOT/$PROJ - git checkout -b stable/$REVIEW_RELEASE origin/stable/$REVIEW_RELEASE - popd - fi - fi - - # Work around inconsistency where map-project-name expects oslo-* - MAPPED_NAME=$(echo $PROJ | sed "s/oslo./oslo-/") - MAPPED_PROJ=$(rdopkg findpkg $MAPPED_NAME | grep ^name | awk '{print $2}' || true) - [ -e data/$MAPPED_PROJ ] && continue - cp -r $TRIPLEO_ROOT/$PROJ data/$MAPPED_PROJ - pushd data/$MAPPED_PROJ - GITHASH=$(git rev-parse HEAD) - - # Set the branches delorean reads to the same git hash as PROJ has left for us - for BRANCH in master origin/master stable/newton origin/stable/newton stable/ocata origin/stable/ocata stable/pike origin/stable/pike stable/queens origin/stable/queens; do - git checkout -b $BRANCH || git checkout $BRANCH - git reset --hard $GITHASH - done - popd - - set +e - while true; do - DELOREANCMD="./venv/bin/dlrn --config-file projects.ini --head-only --package-name $MAPPED_PROJ --local --use-public --build-env http_proxy=${http_proxy:-}" - # Using sudo to su a command as ourselves to run the command with a new login - # to ensure the addition to the mock group has taken effect. - sudo su $(id -nu) -c "$DELOREANCMD" - EXITCODE=$? - - # delorean exits with 2 if the error is a network glitch, we can retry - if [ "$EXITCODE" == "2" ] ; then - continue - elif [ "$EXITCODE" == "0" ] ; then - break - fi - set -e - exit 1 - done - set -e - done - popd - log "Delorean build - DONE." -} - -function undercloud { - - log "Undercloud install" - - sudo yum install -y python-tripleoclient ceph-ansible - - if [ ! -f ~/undercloud.conf ]; then - cp -b -f $UNDERCLOUD_CONF ~/undercloud.conf - else - log "~/undercloud.conf already exists, not overwriting" - fi - - # Hostname check, add to /etc/hosts if needed - if ! grep -E "^127.0.0.1\s*$(hostname -f)" /etc/hosts; then - sudo sed -i "s/127.0.0.1\s*\(.*\)/127.0.0.1\t$(hostname -f) $(hostname -s) \1/" /etc/hosts - fi - if ! grep -E "^::1\s*$(hostname -f)" /etc/hosts; then - sudo sed -i "s/::1\s*\(.*\)/::1\t$(hostname -f) $(hostname -s) \1/" /etc/hosts - fi - - openstack undercloud install - - # Masquerade traffic to external networks from controllers on baremetal undercloud - # In ovb deployments, baremental nodes use undercloud as default route to reach DNS etc... - if [ $OVB -eq 1 ]; then - sudo iptables -A BOOTSTACK_MASQ -s 10.0.0.0/24 ! -d 10.0.0.0/24 -j MASQUERADE -t nat - sudo iptables-save | sudo tee /etc/sysconfig/iptables - fi - - log "Undercloud install - DONE." - -} - -function overcloud_images { - - log "Overcloud images" - - # This hack is no longer needed in ocata. - if [[ "${STABLE_RELEASE}" =~ ^(newton)$ ]]; then - # Ensure yum-plugin-priorities is installed - - # get the right path for diskimage-builder version - COMMON_ELEMENTS_PATH=$(python -c ' -try: - import diskimage_builder.paths - diskimage_builder.paths.show_path("elements") -except: - print("/usr/share/diskimage-builder/elements") - ') - echo -e '#!/bin/bash\nyum install -y yum-plugin-priorities' | sudo tee ${COMMON_ELEMENTS_PATH}/yum/pre-install.d/99-tmphacks - sudo chmod +x ${COMMON_ELEMENTS_PATH}/yum/pre-install.d/99-tmphacks - fi - - # To install the undercloud instack-undercloud is run as root, - # as a result all of the git repositories get cached to - # ~root/.cache/image-create/source-repositories, lets not clone them again - if [ -d ~root/.cache/image-create/source-repositories ] && \ - [ ! -d ~/.cache/image-create/source-repositories ] ; then - sudo cp -r ~root/.cache/image-create/source-repositories ~/.cache/image-create/source-repositories - sudo chown -R $(id -u) ~/.cache/image-create/source-repositories - fi - - export DIB_YUM_REPO_CONF=$OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF - - log "Overcloud images saved in $OVERCLOUD_IMAGES_PATH" - pushd $OVERCLOUD_IMAGES_PATH - log "OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF=$OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF" - if [[ "${STABLE_RELEASE}" =~ ^(newton)$ ]] ; then - OVERCLOUD_IMAGES_ARGS="$OVERCLOUD_IMAGES_LEGACY_ARGS" - fi - DIB_YUM_REPO_CONF=$OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF \ - openstack overcloud image build $OVERCLOUD_IMAGES_ARGS 2>&1 | \ - tee -a overcloud-image-build.log - - stackrc_check - openstack overcloud image upload --update-existing - popd - - log "Overcloud images - DONE." - -} - - -function register_nodes { - - log "Register nodes" - - if [ ! -f $INSTACKENV_JSON_PATH ]; then - echo Could not find instackenv.json at $INSTACKENV_JSON_PATH - echo Specify the path to instackenv.json with '$INSTACKENV_JSON_PATH' - exit 1 - fi - - stackrc_check - - if [ "$INTROSPECT_NODES" = 1 ]; then - # Keep the nodes in manageable state so that they may be - # introspected later. - openstack overcloud node import $INSTACKENV_JSON_PATH - else - openstack overcloud node import $INSTACKENV_JSON_PATH --provide - fi - - ironic node-list - - log "Register nodes - DONE." - -} - -function introspect_nodes { - - log "Introspect nodes" - - stackrc_check - - # Note: Unlike the legacy bulk command, overcloud node - # introspect will only run on nodes in the 'manageable' - # provisioning state. - openstack overcloud node introspect --all-manageable - openstack overcloud node provide --all-manageable - - log "Introspect nodes - DONE." - -} - -function overcloud_deploy { - - log "Overcloud deploy" - - # Force use of --templates - if [[ ! $OVERCLOUD_DEPLOY_ARGS =~ --templates ]]; then - OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS --templates" - fi - stackrc_check - - OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS $OVERCLOUD_VALIDATE_ARGS" - # Set dns server for the overcloud nodes - subnet_id=$(openstack network list -f value -c Name -c Subnets | grep ctlplane | cut -d " " -f 2) - neutron subnet-update $subnet_id --dns-nameserver $(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }' | sed ':a;N;$!ba;s/\n/ --dns-nameserver /g') - - if [[ $USE_CONTAINERS == 1 ]]; then - if ! glance image-list | grep -q atomic-image; then - wget --progress=dot:mega $ATOMIC_URL - glance image-create --name atomic-image --file `basename $ATOMIC_URL` --disk-format qcow2 --container-format bare - fi - #TODO: When container job is changed to network-isolation remove this - neutron subnet-update $(neutron net-list | grep ctlplane | cut -d ' ' -f 6) --dns-nameserver 8.8.8.8 - OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS $CONTAINER_ARGS" - fi - - - log "unsetting any http proxy" - unset http_proxy - log "Overcloud create started." - exitval=0 - log "Deploy command arguments: $OVERCLOUD_DEPLOY_ARGS" - openstack overcloud deploy $OVERCLOUD_DEPLOY_ARGS || exitval=1 - if [ $exitval -eq 1 ]; then - log "Overcloud create - FAILED!" - exit 1 - fi - log "Overcloud create - DONE." -} - -function undercloud_upgrade { - - log "Undercloud upgrade" - - # Setup repositories - repo_setup - - # In pike and above this is handled by the pre-upgrade hook - if [[ "$STABLE_RELEASE" =~ ^(newton|ocata)$ ]]; then - sudo systemctl stop openstack-* - sudo systemctl stop neutron-* - sudo systemctl stop openvswitch - sudo systemctl stop httpd - fi - # tripleo cli needs to be updated first - sudo yum -y update python-tripleoclient - - # Upgrade the undercloud - openstack undercloud upgrade - log "Undercloud upgrade - Done." -} - -function overcloud_update { - # Force use of --templates - if [[ ! $OVERCLOUD_UPDATE_ARGS =~ --templates ]]; then - OVERCLOUD_UPDATE_ARGS="$OVERCLOUD_UPDATE_ARGS --templates" - fi - stackrc_check - if openstack stack show "$OVERCLOUD_NAME" | grep "stack_status " | egrep "(CREATE|UPDATE)_COMPLETE"; then - FILE_PREFIX=$(date "+overcloud-update-resources-%s") - BEFORE_FILE="/tmp/${FILE_PREFIX}-before.txt" - AFTER_FILE="/tmp/${FILE_PREFIX}-after.txt" - # This is an update, so if enabled, compare the before/after resource lists - if [ ! -z "$OVERCLOUD_UPDATE_CHECK" ]; then - openstack stack resource list -n5 overcloud | awk '{print $2, $4, $6}' | sort > $BEFORE_FILE - fi - - log "Overcloud update started." - exitval=0 - openstack overcloud deploy $OVERCLOUD_UPDATE_ARGS || exitval=1 - if [ $exitval -eq 1 ]; then - log "Overcloud update - FAILED!" - exit 1 - fi - log "Overcloud update - DONE." - - if [ ! -z "$OVERCLOUD_UPDATE_CHECK" ]; then - openstack stack resource list -n5 overcloud | awk '{print $2, $4, $6}' | sort > $AFTER_FILE - diff_rsrc=$(diff $BEFORE_FILE $AFTER_FILE) - if [ ! -z "$diff_rsrc" ]; then - log "Overcloud update - Completed but unexpected resource differences: $diff_rsrc" - exit 1 - fi - fi - log "Overcloud update - DONE." - if [[ $OVERCLOUD_UPDATE_RM_FILES == 1 ]]; then - rm -f $BEFORE_FILE $AFTER_FILE - fi - else - log "Overcloud FAILED - No stack $OVERCLOUD_NAME." - exit 1 - fi -} - -function overcloud_upgrade { - stackrc_check - if openstack stack show "$OVERCLOUD_NAME" 2>&1 > /dev/null ; then - log "Create overcloud repo template file" - /bin/bash -c "cat <$HOME/init-repo.yaml - -parameter_defaults: - UpgradeInitCommand: | - set -e - # For some reason '$HOME' is not defined when the Heat agent executes this - # script and tripleo.sh expects it. Just reuse the same value from the - # current undercloud user. - yum clean all - export STABLE_RELEASE=$STABLE_RELEASE - HOME=$HOME $TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --repo-setup - yum clean all - yum install -y python-heat-agent-* - - # TODO: (slagle) - # remove the --noscripts install of openstack-tripleo-image-elements - # once https://review.rdoproject.org/r/4225 merges - pushd /tmp - yumdownloader openstack-tripleo-image-elements - rpm -Uvh --noscripts --force ./openstack-tripleo-image-elements* - rm -f openstack-tripleo-image-elements* - popd - - # FIXME: matbu - # Remove those packages is temporary workaround since the fix in - # https://bugs.launchpad.net/tripleo/+bug/1649284 - # will be release and landed in the packages - yum remove -y python-UcsSdk openstack-neutron-bigswitch-agent python-networking-bigswitch openstack-neutron-bigswitch-lldp python-networking-odl -EOF" - log "Overcloud upgrade started." - log "Upgrade command arguments: $OVERCLOUD_UPGRADE_ARGS" - log "Execute major upgrade." - openstack overcloud deploy $OVERCLOUD_UPGRADE_ARGS - log "Major upgrade - DONE." - - if openstack stack show "$OVERCLOUD_NAME" | grep "stack_status " | egrep "UPDATE_COMPLETE"; then - log "Major Upgrade - DONE." - else - log "Major Upgrade FAILED." - exit 1 - fi - else - log "Overcloud upgrade FAILED - No stack $OVERCLOUD_NAME." - exit 1 - fi -} - -function overcloud_upgrade_converge { - stackrc_check - if openstack stack show "$OVERCLOUD_NAME" 2>&1 > /dev/null; then - log "Overcloud upgrade converge started." - log "Upgrade command arguments: $OVERCLOUD_UPGRADE_CONVERGE_ARGS" - log "Execute major upgrade converge." - openstack overcloud deploy $OVERCLOUD_UPGRADE_CONVERGE_ARGS - log "Major upgrade converge - DONE." - - if openstack stack show "$OVERCLOUD_NAME" | grep "stack_status " | egrep "UPDATE_COMPLETE"; then - log "Major Upgrade converge - DONE." - else - log "Major Upgrade converge FAILED." - exit 1 - fi - else - log "Overcloud upgrade converge FAILED - No stack $OVERCLOUD_NAME." - exit 1 - fi -} - -function overcloud_delete { - - log "Overcloud delete" - - stackrc_check - - OVERCLOUD_ID=$(openstack stack list | grep "$OVERCLOUD_NAME" | awk '{print $2}') - wait_command="openstack stack show $OVERCLOUD_ID" - openstack stack delete --yes "$OVERCLOUD_NAME" - if $($(dirname $0)/wait_for -w $OVERCLOUD_DELETE_TIMEOUT -d 10 -s "DELETE_COMPLETE" -- "$wait_command"); then - log "Overcloud $OVERCLOUD_ID DELETE_COMPLETE" - else - log "Overcloud $OVERCLOUD_ID delete failed or timed out:" - openstack stack show $OVERCLOUD_ID - exit 1 - fi - if [[ "${STABLE_RELEASE}" != "mitaka" ]] ; then - openstack overcloud plan delete "$OVERCLOUD_NAME" && exitval=0 || exitval=1 - if [ ${exitval} -eq 0 ]; then - log "Overcloud $OVERCLOUD_ID plan delete SUCCESS" - else - log "Overcloud $OVERCLOUD_ID plan delete FAILED" - exit 1 - fi - fi -} - -function run_cmd { - if ! $@; then - echo "Command: $@ FAILED" >&2 - exit 1 - else - echo "Command: $@ OK" - fi -} - -function overcloud_sanitytest_create { - ENABLED_SERVICES=$@ - for service in $ENABLED_SERVICES; do - case $service in - "keystone" ) - run_cmd openstack user create ${SANITYTEST_CONTENT_NAME} - run_cmd openstack user list - ;; - "glance_api" ) - run_cmd openstack image create ${SANITYTEST_CONTENT_NAME} - run_cmd openstack image list - ;; - "neutron_api" ) - run_cmd openstack network create ${SANITYTEST_CONTENT_NAME} - run_cmd openstack network list - ;; - "cinder_api" ) - run_cmd openstack volume create ${SANITYTEST_CONTENT_NAME} --size 1 - run_cmd openstack volume list - ;; - "heat_api" ) - echo "heat_template_version: newton" > /tmp/${SANITYTEST_CONTENT_NAME}.yaml - openstack stack create ${SANITYTEST_CONTENT_NAME} --template /tmp/${SANITYTEST_CONTENT_NAME}.yaml - openstack stack list - ;; - "swift_proxy" ) - openstack container create ${SANITYTEST_CONTENT_NAME} - openstack container list - ;; - "sahara_api" ) - # glance_api must also be enabled - run_cmd openstack image create sahara_${SANITYTEST_CONTENT_NAME} - run_cmd openstack dataprocessing image register sahara_${SANITYTEST_CONTENT_NAME} --username centos - run_cmd openstack dataprocessing image list - ;; - esac - done -} - -function overcloud_sanitytest_check { - ENABLED_SERVICES=$@ - for service in $ENABLED_SERVICES; do - case $service in - "keystone" ) - run_cmd openstack user show ${SANITYTEST_CONTENT_NAME} - ;; - "glance_api" ) - run_cmd openstack image show ${SANITYTEST_CONTENT_NAME} - ;; - "neutron_api" ) - run_cmd openstack network show ${SANITYTEST_CONTENT_NAME} - ;; - "cinder_api" ) - run_cmd openstack volume show ${SANITYTEST_CONTENT_NAME} - ;; - "heat_api" ) - run_cmd openstack stack show ${SANITYTEST_CONTENT_NAME} - # FIXME(shardy): It'd be good to add pre/post upgrade checks - # on the actual version, but this is still good for debugging - run_cmd openstack orchestration template version list - ;; - "swift_proxy" ) - run_cmd openstack container show ${SANITYTEST_CONTENT_NAME} - ;; - "sahara_api" ) - run_cmd openstack dataprocessing image show sahara_${SANITYTEST_CONTENT_NAME} - ;; - esac - done -} - -function overcloud_sanitytest_cleanup { - ENABLED_SERVICES=$@ - for service in $ENABLED_SERVICES; do - case $service in - "keystone" ) - echo "Sanity test keystone" - run_cmd openstack user delete ${SANITYTEST_CONTENT_NAME} - ;; - "glance_api" ) - run_cmd openstack image delete ${SANITYTEST_CONTENT_NAME} - ;; - "neutron_api" ) - run_cmd openstack network delete ${SANITYTEST_CONTENT_NAME} - ;; - "cinder_api" ) - run_cmd openstack volume delete ${SANITYTEST_CONTENT_NAME} - ;; - "heat_api" ) - run_cmd openstack stack delete --yes ${SANITYTEST_CONTENT_NAME} - ;; - "swift_proxy" ) - run_cmd openstack container delete ${SANITYTEST_CONTENT_NAME} - ;; - "sahara_api" ) - run_cmd openstack dataprocessing image unregister sahara_${SANITYTEST_CONTENT_NAME} - run_cmd openstack image delete sahara_${SANITYTEST_CONTENT_NAME} - ;; - esac - done -} - -function overcloud_sanitytest { - - log "Overcloud sanitytest" - exitval=0 - stackrc_check - - if openstack stack show "$OVERCLOUD_NAME" | grep "stack_status " | egrep -q "(CREATE|UPDATE)_COMPLETE"; then - - ENABLED_SERVICES=$(openstack stack output show overcloud EnabledServices -f json | \ - jq -r ".output_value" | jq '.Controller | .[]' | tr "\n" " " | sed "s/\"//g") - echo "Sanity Test, ENABLED_SERVICES=$ENABLED_SERVICES" - - overcloudrc_check - - if [ "$OVERCLOUD_SANITYTEST_SKIP_CREATE" != 1 ]; then - overcloud_sanitytest_create $ENABLED_SERVICES - fi - - overcloud_sanitytest_check $ENABLED_SERVICES - - if [ "$OVERCLOUD_SANITYTEST_SKIP_CLEANUP" != 1 ]; then - overcloud_sanitytest_cleanup $ENABLED_SERVICES - fi - - if [ $exitval -eq 0 ]; then - log "Overcloud sanitytest SUCCEEDED" - else - log "Overcloud sanitytest FAILED" - fi - exit $exitval - else - log "Overcloud sanitytest FAILED - No stack $OVERCLOUD_NAME." - exit 1 - fi -} - -function clean_tempest { - neutron net-delete nova || echo "Cleaning tempest: no networks were created" -} - -function tempest_run { - - log "Running tempest" - - stackrc_check - CTLPLANE_CIDR=$(neutron net-list -c subnets -c name -f value | grep ctlplane | awk {'print $2'}) - CTLPLANE_NET=$(echo $CTLPLANE_CIDR | awk -F "." {'print $1"."$2"."$3'}) - - overcloudrc_check - clean_tempest - root_dir=$(realpath $(dirname ${BASH_SOURCE[0]:-$0})) - [[ ! -e $HOME/tempest ]] && git clone https://github.com/openstack/tempest $HOME/tempest - pushd $HOME/tempest - git checkout $TEMPEST_PINNED - FLOATING_IP_CIDR=${FLOATING_IP_CIDR:-$CTLPLANE_CIDR} - FLOATING_IP_START=${FLOATING_IP_START:-"${CTLPLANE_NET}.50"} - FLOATING_IP_END=${FLOATING_IP_END:-"${CTLPLANE_NET}.64"} - export EXTERNAL_NETWORK_GATEWAY=${EXTERNAL_NETWORK_GATEWAY:-"${CTLPLANE_NET}.1"} - neutron net-create nova --shared --router:external=True --provider:network_type flat --provider:physical_network datacentre; - neutron subnet-create --name ext-subnet --allocation-pool start=$FLOATING_IP_START,end=$FLOATING_IP_END --disable-dhcp --gateway $EXTERNAL_NETWORK_GATEWAY nova $FLOATING_IP_CIDR; - sudo yum install -y libffi-devel openssl-devel python-virtualenv - virtualenv --no-site-packages .venv - $HOME/tempest/tools/with_venv.sh pip install -U pip setuptools - $HOME/tempest/tools/with_venv.sh pip install junitxml httplib2 -r test-requirements.txt -r requirements.txt - cp $root_dir/config_tempest.py $HOME/tempest/tools/ - cp $root_dir/api_discovery.py $HOME/tempest/tempest/common/ - cp $root_dir/default-overrides.conf $HOME/tempest/etc/ - sudo mkdir -p /var/log/tempest/ ||: - sudo mkdir -p /etc/tempest/ ||: - sudo chown $USER:$USER -R /var/log/tempest/ - $HOME/tempest/tools/with_venv.sh python $HOME/tempest/tools/config_tempest.py \ - --out etc/tempest.conf \ - --debug \ - --create \ - --deployer-input ~/tempest-deployer-input.conf \ - identity.uri $OS_AUTH_URL \ - auth.use_dynamic_credentials true \ - identity.admin_password $OS_PASSWORD \ - compute.build_timeout 500 \ - validation.image_ssh_user cirros \ - orchestration.stack_owner_role _member_ \ - network.build_timeout 500 \ - volume.build_timeout 500 \ - DEFAULT.log_file "/var/log/tempest/tempest.log" \ - $TEMPEST_ADD_CONFIG - sudo cp $HOME/tempest/etc/tempest.conf /etc/tempest/tempest.conf - [[ ! -e $HOME/tempest/.testrepository ]] && $HOME/tempest/tools/with_venv.sh testr init - $HOME/tempest/tools/with_venv.sh testr run \ - $TEMPEST_ARGS \ - $TEMPEST_REGEX | \ - tee >( $HOME/tempest/tools/with_venv.sh subunit2junitxml --output-to=/var/log/tempest/tempest.xml ) | \ - $HOME/tempest/tools/with_venv.sh subunit-trace --no-failure-debug -f 2>&1 | \ - tee /var/log/tempest/tempest_console.log && exitval=0 || exitval=$? - $HOME/tempest/tools/with_venv.sh subunit2html $HOME/tempest/.testrepository/$(ls -t $HOME/tempest/.testrepository/ | grep -e "[0-9]" | head -1) /var/log/tempest/tempest.html - exit ${exitval} -} - -function clone { - - local repo=$1 - - log "$0 requires $repo to be cloned at \$TRIPLEO_ROOT ($TRIPLEO_ROOT)" - - mkdir -p $TRIPLEO_ROOT - if [ ! -d $TRIPLEO_ROOT/$(basename $repo) ]; then - echo "$repo not found at $TRIPLEO_ROOT/$repo, git cloning." - pushd $TRIPLEO_ROOT - git clone https://opendev.org/$repo - popd - else - echo "$repo found at $TRIPLEO_ROOT/$repo, nothing to do." - fi - -} - -# This function creates an internal gre bridge to connect all external -# network bridges across the compute and network nodes. -# bridge_name: Bridge name on each host for logical l2 network -# connectivity. -# host_ip: ip address of the bridge host which is reachable for all peer -# the hub for all of our spokes. -# set_ips: Whether or not to set l3 addresses on our logical l2 network. -# This can be helpful for setting up routing tables. -# offset: starting value for gre tunnel key and the ip addr suffix -# The next two parameters are only used if set_ips is "True". -# pub_addr_prefix: The IPv4 address three octet prefix used to give compute -# nodes non conflicting addresses on the pub_if_name'd -# network. Should be provided as X.Y.Z. Offset will be -# applied to this as well as the below mask to get the -# resulting address. -# pub_addr_mask: the CIDR mask less the '/' for the IPv4 addresses used -# above. -# every additional parameter is considered as a peer host (spokes) -# -# For OVS troubleshooting needs: -# http://www.yet.org/2014/09/openvswitch-troubleshooting/ -# -function ovs_vxlan_bridge { - if is_suse; then - local ovs_package='openvswitch' - local ovs_service='openvswitch' - elif is_fedora; then - local ovs_package='openvswitch openstack-selinux' - local ovs_service='openvswitch' - elif uses_debs; then - local ovs_package='openvswitch-switch' - local ovs_service='openvswitch-switch' - else - echo "Unsupported platform, can't determine openvswitch service" - exit 1 - fi - local install_ovs_deps="source $BASE/new/devstack/functions-common; \ - install_package ${ovs_package}; \ - restart_service ${ovs_service}" - local mtu=1450 - local bridge_name=$1 - local host_ip=$2 - local set_ips=$3 - local offset=$4 - if [[ "$set_ips" == "True" ]] ; then - local pub_addr_prefix=$5 - local pub_addr_mask=$6 - shift 6 - else - shift 4 - fi - local peer_ips=$@ - # neutron uses 1:1000 with default devstack configuration, avoid overlap - local additional_vni_offset=1000000 - eval $install_ovs_deps - # create a bridge, just like you would with 'brctl addbr' - # if the bridge exists, --may-exist prevents ovs from returning an error - sudo ovs-vsctl --may-exist add-br $bridge_name - # as for the mtu, look for notes on lp#1301958 in devstack-vm-gate.sh - sudo ip link set mtu $mtu dev $bridge_name - if [[ "$set_ips" == "True" ]] ; then - echo "Set bridge: ${bridge_name}" - if ! sudo ip addr show dev ${bridge_name} | grep -q \ - ${pub_addr_prefix}.${offset}/${pub_addr_mask} ; then - sudo ip addr add ${pub_addr_prefix}.${offset}/${pub_addr_mask} \ - dev ${bridge_name} - fi - fi - sudo ip link set dev $bridge_name up - for node_ip in $peer_ips; do - offset=$(( offset+1 )) - vni=$(( offset + additional_vni_offset )) - # For reference on how to setup a tunnel using OVS see: - # http://openvswitch.org/support/config-cookbooks/port-tunneling/ - # The command below is equivalent to the sequence of ip/brctl commands - # where an interface of vxlan type is created first, and then plugged into - # the bridge; options are command specific configuration key-value pairs. - # - # Create the vxlan tunnel for the Controller/Network Node: - # This establishes a tunnel between remote $node_ip to local $host_ip - # uniquely identified by a key $offset - sudo ovs-vsctl --may-exist add-port $bridge_name \ - ${bridge_name}_${node_ip} \ - -- set interface ${bridge_name}_${node_ip} type=vxlan \ - options:remote_ip=${node_ip} \ - options:key=${vni} \ - options:local_ip=${host_ip} - # Now complete the vxlan tunnel setup for the Compute Node: - # Similarly this establishes the tunnel in the reverse direction - remote_command $node_ip "$install_ovs_deps" - remote_command $node_ip sudo ovs-vsctl --may-exist add-br $bridge_name - remote_command $node_ip sudo ip link set mtu $mtu dev $bridge_name - remote_command $node_ip sudo ovs-vsctl --may-exist add-port $bridge_name \ - ${bridge_name}_${host_ip} \ - -- set interface ${bridge_name}_${host_ip} type=vxlan \ - options:remote_ip=${host_ip} \ - options:key=${vni} \ - options:local_ip=${node_ip} - if [[ "$set_ips" == "True" ]] ; then - if ! remote_command $node_ip sudo ip addr show dev ${bridge_name} | \ - grep -q ${pub_addr_prefix}.${offset}/${pub_addr_mask} ; then - remote_command $node_ip sudo ip addr add \ - ${pub_addr_prefix}.${offset}/${pub_addr_mask} \ - dev ${bridge_name} - fi - fi - remote_command $node_ip sudo ip link set dev $bridge_name up - done -} - -function multinode_setup { - - log "Multinode Setup" - - clone openstack-dev/devstack - clone openstack-infra/devstack-gate - - # $BASE is expected by devstack/functions-common - # which is sourced by devstack-gate/functions.sh - # It should be the parent directory of the "new" directory where - # zuul-cloner has checked out the repositories - export BASE - export TRIPLEO_ROOT - - log "Sourcing devstack-gate/functions.sh" - set +u - source $TRIPLEO_ROOT/devstack-gate/functions.sh - set -u - - PUB_BRIDGE_NAME=${PUB_BRIDGE_NAME:-"br-ex"} - - local primary_node - primary_node=$(cat /etc/nodepool/primary_node_private) - local sub_nodes - sub_nodes=$(cat /etc/nodepool/sub_nodes_private) - - for ip in $sub_nodes; do - # Do repo setup so openvswitch package is available on subnodes. Will - # be installed by ovs_vxlan_bridge function below. - log "Running --repo-setup on $ip" - ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \ - TRIPLEO_ROOT=$TRIPLEO_ROOT \ - $TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --repo-setup - done - - # Create OVS vxlan bridges - # If br-ctlplane already exists on this node, we need to bring it down - # first, then bring it back up after calling ovs_vxlan_bridge. This ensures - # that the route added to br-ex by ovs_vxlan_bridge will be preferred over - # the br-ctlplane route. If it's not preferred, multinode connectivity - # across the vxlan bridge will not work. - if [ -f /etc/sysconfig/network-scripts/ifcfg-br-ctlplane ]; then - sudo ifdown br-ctlplane - fi - set +u - log "Running ovs_vxlan_bridge" - ovs_vxlan_bridge $PUB_BRIDGE_NAME $primary_node "True" 2 192.168.24 24 $sub_nodes - set -u - - log "Setting $PUB_BRIDGE_NAME up on $primary_node" - sudo ip link set dev $PUB_BRIDGE_NAME up - sudo ip link set dev $PUB_BRIDGE_NAME mtu $MTU - - if [ -f /etc/sysconfig/network-scripts/ifcfg-br-ctlplane ]; then - sudo ifup br-ctlplane - fi - # Restart neutron-openvswitch-agent if it's enabled, since it may have - # terminated when br-ctlplane was down - if [ "$(sudo systemctl is-enabled neutron-openvswitch-agent)" = 'enabled' ]; then - sudo systemctl reset-failed neutron-openvswitch-agent - sudo systemctl restart neutron-openvswitch-agent - fi - - local ping_command="ping -c 6 -W 3 192.168.24.2" - - for ip in $sub_nodes; do - log "Setting $PUB_BRIDGE_NAME up on $ip" - ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \ - sudo ip link set dev $PUB_BRIDGE_NAME up - ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \ - sudo ip link set dev $PUB_BRIDGE_NAME mtu $MTU - log "Pinging from $ip" - if ! remote_command $ip $ping_command; then - log "Pinging from $ip failed, restarting openvswitch" - remote_command $ip sudo systemctl restart openvswitch - if ! remote_command $ip $ping_command; then - log "Pinging from $ip still failed after restarting openvswitch" - exit 1 - fi - fi - done - - log "Multinode Setup - DONE". -} - -function undercloud_sanity_check { - set -x - stackrc_check - openstack user list - openstack catalog list - nova service-list - glance image-list - neutron subnet-list - neutron net-list - neutron agent-list - if [[ ! "${STABLE_RELEASE}" =~ ^(newton|ocata) ]]; then - # This verifies that at least one conductor comes up, and at least one - # IPMI-based driver was successfully enabled. - ipmi_drivers="$(grep -c ipmi <(ironic driver-list))" - if [[ $ipmi_drivers -eq 0 ]]; then - log "ERROR: Check ironic driver-list" - exit 1 - fi - else - ironic node-list - fi - openstack stack list - ui_sanity_check - set +x -} - -function bootstrap_subnodes { - log "WARNING: Bootstrap subnodes is deprecated and will be removed. " - - local sub_nodes - sub_nodes=$(cat /etc/nodepool/sub_nodes_private) - - bootstrap_subnodes_repos - - local bootstrap_script - if [ "$BOOTSTRAP_SUBNODES_MINIMAL" = "1" ]; then - bootstrap_script=bootstrap-overcloud-full-minimal.sh - else - bootstrap_script=bootstrap-overcloud-full.sh - fi - - for ip in $sub_nodes; do - log "Bootstrapping $ip" - # Run overcloud full bootstrap script - log "Running bootstrap-overcloud-full.sh on $ip" - ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \ - TRIPLEO_ROOT=$TRIPLEO_ROOT \ - $TRIPLEO_ROOT/tripleo-ci/scripts/$bootstrap_script - done - - log "Bootstrap subnodes - DONE". -} - - -function setup_nodepool_files { - log "Setup nodepool files" - - clone openstack-dev/devstack - clone openstack-infra/devstack-gate - clone openstack-infra/tripleo-ci - - if [ ! -d $BASE/new ]; then - ln -s $TRIPLEO_ROOT $BASE/new - fi - - sudo mkdir -p /etc/nodepool - sudo chown -R $(whoami): /etc/nodepool - - if [ ! -f /etc/nodepool/id_rsa ]; then - ssh-keygen -N "" -t rsa -f /etc/nodepool/id_rsa - cat /etc/nodepool/id_rsa.pub >> ~/.ssh/authorized_keys - fi - - if [ -z $PRIMARY_NODE_IP ]; then - echo '$PRIMARY_NODE_IP must be defined. Exiting.' - exit 1 - fi - - echo $PRIMARY_NODE_IP > /etc/nodepool/primary_node - echo $PRIMARY_NODE_IP > /etc/nodepool/primary_node_private - - echo -n > /etc/nodepool/sub_nodes - echo -n > /etc/nodepool/sub_nodes_private - for sub_node_ip in $SUB_NODE_IPS; do - echo $sub_node_ip >> /etc/nodepool/sub_nodes - echo $sub_node_ip >> /etc/nodepool/sub_nodes_private - done - - for sub_node_ip in $SUB_NODE_IPS; do - echo $sub_node_ip > /etc/nodepool/node - echo $sub_node_ip > /etc/nodepool/node_private - ssh $SSH_OPTIONS -tt $sub_node_ip sudo mkdir -p $TRIPLEO_ROOT - ssh $SSH_OPTIONS -tt $sub_node_ip sudo chown -R $(whoami): $TRIPLEO_ROOT - rsync -e "ssh $SSH_OPTIONS" -avhP $TRIPLEO_ROOT $sub_node_ip:$TRIPLEO_ROOT/.. - rsync -e "ssh $SSH_OPTIONS" -avhP /etc/nodepool $sub_node_ip: - ssh $SSH_OPTIONS -tt $sub_node_ip sudo cp -r nodepool /etc - ssh $SSH_OPTIONS $sub_node_ip \ - "/bin/bash -c 'cat /etc/nodepool/id_rsa.pub >> ~/.ssh/authorized_keys'" - done - - echo $PRIMARY_NODE_IP > /etc/nodepool/node - echo $PRIMARY_NODE_IP > /etc/nodepool/node_private - - log "Setup nodepool files - DONE" -} - - -function bootstrap_subnodes_repos { - log "Bootstrap subnodes repos" - - local sub_nodes - sub_nodes=$(cat /etc/nodepool/sub_nodes_private) - - for ip in $sub_nodes; do - log "Bootstrapping $ip" - log "Running --repo-setup on $ip" - # Do repo setup - # if UPGRADE_RELEASE is set, then we are making an upgrade, so - # we need to set the stable_release. - if [ ! -z $UPGRADE_RELEASE ]; then - log "Stable release $UPGRADE_RELEASE" - ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \ - "TRIPLEO_ROOT=$TRIPLEO_ROOT; \ - unset STABLE_RELEASE; \ - export STABLE_RELEASE=$UPGRADE_RELEASE; \ - $TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --repo-setup" - else - ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \ - TRIPLEO_ROOT=$TRIPLEO_ROOT \ - $TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --repo-setup - fi - done - - log "Bootstrap subnodes repos - DONE". -} - - -if [ "$REPO_SETUP" = 1 ]; then - repo_setup -fi - -if [ "$DELOREAN_SETUP" = 1 ]; then - delorean_setup -fi - -if [ "$DELOREAN_BUILD" = 1 ]; then - export DELOREAN_BUILD_REFS="${DELOREAN_BUILD_REFS:-$@}" - if [ -z "$DELOREAN_BUILD_REFS" ]; then - echo "Usage: $0 --delorean-build openstack/heat openstack/nova" - exit 1 - fi - delorean_build -fi - -if [ "$UNDERCLOUD" = 1 ]; then - undercloud - if [ "$UNDERCLOUD_SANITY_CHECK" = 1 ]; then - undercloud_sanity_check - fi -fi - -if [ "$OVERCLOUD_IMAGES" = 1 ]; then - overcloud_images -fi - -if [ "$REGISTER_NODES" = 1 ]; then - register_nodes -fi - -if [ "$INTROSPECT_NODES" = 1 ]; then - introspect_nodes -fi - -if [ "$OVERCLOUD_DEPLOY" = 1 ]; then - overcloud_deploy -fi - -if [ "$OVERCLOUD_UPDATE" = 1 ]; then - overcloud_update -fi - -if [ "$OVERCLOUD_UPGRADE" = 1 ]; then - overcloud_upgrade -fi - -if [ "$OVERCLOUD_UPGRADE_CONVERGE" = 1 ]; then - overcloud_upgrade_converge -fi - -if [ "$OVERCLOUD_DELETE" = 1 ]; then - overcloud_delete -fi - -if [[ "$USE_CONTAINERS" == 1 && "$OVERCLOUD_DEPLOY" != 1 ]]; then - echo "Error: --overcloud-deploy flag is required with the flag --use-containers" - exit 1 -fi - -if [ "$OVERCLOUD_SANITYTEST" = 1 ]; then - overcloud_sanitytest -fi - -if [ "$TEMPEST_RUN" = 1 ]; then - tempest_run -fi - -if [ "$UNDERCLOUD_UPGRADE" = 1 ]; then - undercloud_upgrade - if [ "$UNDERCLOUD_SANITY_CHECK" = 1 ]; then - undercloud_sanity_check - fi -fi - -if [ "$MULTINODE_SETUP" = 1 ]; then - multinode_setup -fi - -if [ "$BOOTSTRAP_SUBNODES" = 1 ]; then - bootstrap_subnodes -fi - -if [ "$SETUP_NODEPOOL_FILES" = 1 ]; then - setup_nodepool_files -fi - -if [ "$ALL" = 1 ]; then - repo_setup - undercloud - overcloud_images - register_nodes - introspect_nodes - overcloud_deploy -fi diff --git a/scripts/vexxhost.env b/scripts/vexxhost.env deleted file mode 100644 index 1ac650929..000000000 --- a/scripts/vexxhost.env +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -export PUBLIC_IP_NET=public - -# The total number of testenv-workers running, to allow for timeouts -# Should be slightly higher then the max number of CI slaves running. -export TOTALOVBENVS=2 - -export QUOTA_RAM=100000 -export QUOTA_FIPS=3 -export QUOTA_NETS=100 -export QUOTA_PORTS=1000 - -export UNDERCLOUD_FLAVOR="ci.m1.nodepool" -export BAREMETAL_FLAVOR="ci.m1.large" -export BMC_FLAVOR="ci.m1.small" -export EXTRA_NODE_FLAVOR="ci.m1.small" -export BAREMETAL_IMAGE="CentOS-7-x86_64-GenericCloud" - -export TEBROKERIP=192.168.100.250 diff --git a/scripts/website/README.md b/scripts/website/README.md deleted file mode 100644 index 023bfb191..000000000 --- a/scripts/website/README.md +++ /dev/null @@ -1,40 +0,0 @@ -tripleo.org -=========== - -Description ------------ - -This directory contains scripts and config files used to generate the -tripleo.org website. - -The following projects are used: - -* tripleo-docs (our tripleo documentation) -* tripleosphinx (currently hosted on https://github.com/dprince/tripleosphinx.git) -* reviewday (provides an HTML report of reviews along with LP ticket priorities) -* tripleo-ci (HTML CI reports and other misc scripts.) - -Building the site ------------------ - -Tripleo.org is currently a static HTML website that is regenerated by scripts -or via a cron job. - -To build the entire site run the following: - - cd tripleo-ci/scripts/website - OUT\_HTML='out\_html' bash generate\_site.sh - -NOTE: This will take some time to run reviewday (which makes remote Gerrit -and Lauchpad API connections) and generate the CI reports which contact -the API of the upstream Jenkins servers. - -If you want to do a quick build to test out new HTML formatting, etc. you -can disable the reviewday and CI reports by running the following: - - cd tripleo-ci/scripts/website - SKIP\_REVIEWDAY="Y" SKIP\_CI\_REPORTS="Y" OUT\_HTML='out\_html' bash generate\_site.sh - -Once you executed either of the above commands the HTML website would be -in your local out\_html directory and can be viewed with any webrower -by pointing it to the local filesystem. diff --git a/scripts/website/generate_site.sh b/scripts/website/generate_site.sh deleted file mode 100755 index c5f9b6634..000000000 --- a/scripts/website/generate_site.sh +++ /dev/null @@ -1,158 +0,0 @@ -#!/bin/bash -# Copyright 2016 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -SCRIPT_DIR=${SCRIPT_DIR:-$(dirname $0)} -SUDO_CP=${SUDO_CP:-''} # useful if you'd like to inject a SUDO command for cp -OUT_HTML=${OUT_HTML:-'out_html'} -REVIEWDAY_INPUT_FILE=${REVIEWDAY_INPUT_FILE:-"${SCRIPT_DIR}/tripleo-reviewday.yaml"} -SKIP_REVIEWDAY=${SKIP_REVIEWDAY:-''} -SKIP_CI_REPORTS=${SKIP_CI_REPORTS:-''} -SKIP_BLOG=${SKIP_BLOG:-''} - -# TRIPLEO-DOCS -if [ ! -d tripleo-docs ]; then - git clone https://opendev.org/openstack/tripleo-docs - pushd tripleo-docs - tox -edocs #initial run - popd -else - pushd tripleo-docs - git reset --hard origin/master - git pull - # NOTE(bnemec): We need to rebuild this venv each time or changes to - # tripleosphinx won't be picked up. - tox -re docs - popd -fi - -# TRIPLEO SPHINX -if [ ! -d tripleosphinx ]; then - git clone https://github.com/dprince/tripleosphinx.git - pushd tripleosphinx - tox -edocs #creates the blank.html - popd -else - pushd tripleosphinx - git reset --hard origin/master - git pull - tox -edocs #creates the blank.html - popd -fi - -# swap in custom tripleosphinx -pushd tripleo-docs -sed -e "s|openstackdocstheme|tripleosphinx|g" -i doc/source/conf.py -sed -e "s|html_theme.*||g" -i doc/source/conf.py -popd - -#REVIEWDAY -if [ ! -d reviewday ]; then - git clone https://opendev.org/openstack/reviewday -else - pushd reviewday - git reset --hard origin/master - git pull - popd -fi - -#TRIPLEO CI -if [ ! -d tripleo-ci ]; then - git clone https://opendev.org/openstack/tripleo-ci -else - pushd tripleo-ci - git reset --hard origin/master - git pull - popd -fi - -#Planet (Blog Feed Aggregator) -PLANET_DIR='planet-venus' -if [ ! -d '$PLANET_DIR' ]; then - git clone https://github.com/rubys/venus.git $PLANET_DIR -else - pushd $PLANET_DIR - git reset --hard origin/master - git pull - popd -fi - -#----------------------------------------- -source tripleo-docs/.tox/docs/bin/activate -pushd tripleosphinx -python setup.py install -popd -deactivate - -pushd tripleo-docs -tox -edocs -popd - -$SUDO_CP mkdir -p $OUT_HTML - -# Reviewday -if [ -z "$SKIP_REVIEWDAY" ]; then - pushd reviewday - tox -erun -- "-p$REVIEWDAY_INPUT_FILE" - $SUDO_CP cp -a arrow* out_report/*.png out_report/*.js out_report/*.css $OUT_HTML - DATA=$(cat out_report/data_table.html) - popd - OUT_FILE=$SCRIPT_DIR/tripleo-docs/doc/build/html/reviews.html - TEMPLATE_FILE=$SCRIPT_DIR/tripleosphinx/doc/build/html/blank.html - sed -n '1,/.*Custom Content Here/p' $TEMPLATE_FILE > $OUT_FILE #first half - echo "

TripleO Reviews

" >> $OUT_FILE - sed -e "s|.*|<title>TripleO: Reviews|" -i $OUT_FILE # custom title - sed -e "s|.*|<title>TripleO: Reviews|" -i $OUT_FILE # custom title - echo "$DATA" >> $OUT_FILE - sed -n '/.*Custom Content Here/,$p' $TEMPLATE_FILE >> $OUT_FILE #second half -fi - -# TripleO CI -if [ -z "$SKIP_CI_REPORTS" ]; then - pushd tripleo-ci - - # jobs report - tox -ecireport -- -b '^.*' - DATA=$(cat tripleo-jobs.html-table) - popd - OUT_FILE=$SCRIPT_DIR/tripleo-docs/doc/build/html/cistatus.html - TEMPLATE_FILE=$SCRIPT_DIR/tripleosphinx/doc/build/html/blank.html - sed -n '1,/.*Custom Content Here/p' $TEMPLATE_FILE > $OUT_FILE #first half - echo "

TripleO CI Status

" >> $OUT_FILE - sed -e "s|.*|<title>TripleO: CI Status|" -i $OUT_FILE # custom title - echo "$DATA" >> $OUT_FILE - sed -n '/.*Custom Content Here/,$p' $TEMPLATE_FILE >> $OUT_FILE #second half -fi - -# Planet -if [ -z "$SKIP_BLOG" ]; then - cp $SCRIPT_DIR/tripleo-ci/scripts/website/planet* $SCRIPT_DIR/$PLANET_DIR - pushd $SCRIPT_DIR/$PLANET_DIR - mkdir output - rm planet.html.tmplc # cleanup from previous runs - python planet.py planet.config.ini - popd - DATA=$(cat $PLANET_DIR/output/planet.html) - OUT_FILE=$SCRIPT_DIR/tripleo-docs/doc/build/html/planet.html - TEMPLATE_FILE=$SCRIPT_DIR/tripleosphinx/doc/build/html/blank.html - sed -n '1,/.*Custom Content Here/p' $TEMPLATE_FILE > $OUT_FILE #first half - echo "

Planet TripleO

" >> $OUT_FILE - sed -e "s|.*|<title>Planet TripleO|" -i $OUT_FILE # custom title - echo "$DATA" >> $OUT_FILE - sed -n '/.*Custom Content Here/,$p' $TEMPLATE_FILE >> $OUT_FILE #second half -fi - -# Copy in the new web pages -$SUDO_CP cp -a $SCRIPT_DIR/tripleo-docs/doc/build/html/* $OUT_HTML diff --git a/scripts/website/planet.config.ini b/scripts/website/planet.config.ini deleted file mode 100644 index 23b015587..000000000 --- a/scripts/website/planet.config.ini +++ /dev/null @@ -1,114 +0,0 @@ -# Planet configuration file - -# Every planet needs a [Planet] section -[Planet] -# name: Your planet's name -# link: Link to the main page -# owner_name: Your name -# owner_email: Your e-mail address -name = TripleO -link = http://www.tripleo.org/ -owner_name = Fatty Owl -owner_email = devnull@tripleo.org - -# cache_directory: Where cached feeds are stored -# new_feed_items: Number of items to take from new feeds -# log_level: One of DEBUG, INFO, WARNING, ERROR or CRITICAL -cache_directory = cache -new_feed_items = 2 -log_level = DEBUG - -# template_files: Space-separated list of output template files -#template_files = examples/basic/index.html.tmpl examples/atom.xml.tmpl examples/rss20.xml.tmpl examples/rss10.xml.tmpl examples/opml.xml.tmpl examples/foafroll.xml.tmpl -template_files = planet.html.tmpl - -# The following provide defaults for each template: -# output_dir: Directory to place output files -# items_per_page: How many items to put on each page -# days_per_page: How many complete days of posts to put on each page -# This is the absolute, hard limit (over the item limit) -# date_format: strftime format for the default 'date' template variable -# new_date_format: strftime format for the 'new_date' template variable -# encoding: output encoding for the file, Python 2.3+ users can use the -# special "xml" value to output ASCII with XML character references -# locale: locale to use for (e.g.) strings in dates, default is taken from your -# system. You can specify more locales separated by ':', planet will -# use the first available one -output_dir = output -items_per_page = 20 -days_per_page = 0 -date_format = %B %d, %Y %I:%M %p -new_date_format = %B %d, %Y -encoding = utf-8 -# locale = C - - -# To define a different value for a particular template you may create -# a section with the same name as the template file's filename (as given -# in template_files). -# -# [examples/rss10.xml.tmpl] -# items_per_page = 30 -# encoding = xml - - -# Any other section defines a feed to subscribe to. The section title -# (in the []s) is the URI of the feed itself. A section can also be -# have any of the following options: -# -# name: Name of the feed (defaults to the title found in the feed) -# -# Additionally any other option placed here will be available in -# the template (prefixed with channel_ for the Items loop). You can -# define defaults for these in a [DEFAULT] section, for example -# Planet Debian uses the following to define faces: -# -# [DEFAULT] -# facewidth = 64 -# faceheight = 64 -# -# [http://www.blog.com/rss] -# face = foo.png -# faceheight = 32 -# -# The facewidth of the defined blog defaults to 64. - -# NOTE: Feeds here should also get added to planet.openstack.org. -# This section is just to slice out the TripleO topics to highlight -# on tripleo.org. - -[https://blogslagle.wordpress.com/tag/tripleo/feed/] -name = James Slagle - -[http://blog.nemebean.com/taxonomy/term/5/feed] -name = Ben Nemec - -[http://hardysteven.blogspot.com/feeds/posts/default/-/tripleo?alt=rss] -name = Steven Hardy - -[http://giuliofidente.com/feeds/tag/tripleo.atom.xml] -name = Giulio Fidente - -[http://my1.fr/blog/category/virtualization/openstack/tripleo/feed/atom/] -name = Emilien Macchi - -[http://mariosandreou.com/tripleo.xml] -name = Marios Andreou - -[https://dprince.github.io/feeds/tripleo.atom.xml] -name = Dan Prince - -[http://www.anstack.com/tripleo.xml] -name = Carlos Camacho - -[http://jaormx.github.io/tripleo-feed.xml] -name = Juan Antonio Osorio - -[http://www.dougalmatthews.com/feeds/tag/tripleo.atom.xml] -name = Dougal Matthews - -[https://www.jpichon.net/feeds/tag-tripleo.rss.xml] -name = Julie Pichon - -[https://cjeanner.github.io/tripleo-feed.xml] -name = Cedric Jeanneret diff --git a/scripts/website/planet.html.tmpl b/scripts/website/planet.html.tmpl deleted file mode 100644 index c3ca2cb06..000000000 --- a/scripts/website/planet.html.tmpl +++ /dev/null @@ -1,47 +0,0 @@ - - -
-Subscriptions - -
- -### The other loop is the Items loop, which will get iterated for each -### news item. - - - -### Visually distinguish articles from different days by checking for -### the new_date flag. This demonstrates the ... -### check. - - -

-
- -### Group consecutive articles by the same author together by checking -### for the new_channel flag. - - -

" title="">

-
- - - -

">

-
-

- -

-

-">by at -

-
- -
-

-Last updated: -

diff --git a/scripts/website/tripleo-reviewday.yaml b/scripts/website/tripleo-reviewday.yaml deleted file mode 100644 index 28892536e..000000000 --- a/scripts/website/tripleo-reviewday.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -projects: - - name: os-apply-config - - name: os-collect-config - - name: os-net-config - - name: os-refresh-config - - name: python-tripleoclient - launchpad_project: tripleo - - name: tripleo-common - launchpad_project: tripleo - - name: tripleo-docs - launchpad_project: tripleo - - name: tripleo-heat-templates - launchpad_project: tripleo - - name: tripleo-image-elements - launchpad_project: tripleo - - name: tripleo-puppet-elements - launchpad_project: tripleo - - name: tripleo-specs - launchpad_project: tripleo - - name: tripleo-validations - launchpad_project: tripleo - - name: tripleo-ha-utils - launchpad_project: tripleo - - name: openstack-infra/tripleo-ci - launchpad_project: tripleo - - name: paunch - launchpad_project: tripleo - - name: puppet-tripleo - launchpad_project: tripleo - - name: puppet-pacemaker - - name: tripleo-ipsec - launchpad_project: tripleo - - name: tripleo-quickstart - launchpad_project: tripleo - - name: tripleo-quickstart-extras - launchpad_project: tripleo - - name: tripleo-upgrade - launchpad_project: tripleo - - name: tripleo-repos - launchpad_project: tripleo - - name: tripleo-ansible - launchpad_project: tripleo diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index b67ee6be6..000000000 --- a/setup.cfg +++ /dev/null @@ -1,48 +0,0 @@ -[metadata] -name = tripleo-ci -summary = TripleO documentation -description_file = - README.rst -author = OpenStack -author_email = openstack-discuss@lists.openstack.org -home_page = http://opendev.org/openstack/tripleo-ci -classifier = - Environment :: OpenStack - Intended Audience :: Information Technology - Intended Audience :: System Administrators - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 -python_requires = >= 3.6 - -[files] -data_files = - usr/local/share/ansible/roles = roles/* - - -[egg_info] -tag_build = -tag_date = 0 -tag_svn_revision = 0 - -[wheel] -universal = 1 - -[pbr] -warnerrors = False - -[tool:pytest] -norecursedirs = .git .tox dist .eggs -# do not set log_cli to true by default as it would display misleading -# exception during normal test execution. -# log_cli = true - -[flake8] -# based on https://github.com/psf/black -ignore = E203,E501,W503,W504,D -# "D" added because we do not use docstrings checks, yet diff --git a/setup.py b/setup.py deleted file mode 100644 index dca5e3663..000000000 --- a/setup.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. -# -# 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 MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT -import setuptools - -setuptools.setup(setup_requires=['pbr'], pbr=True, py_modules=[]) diff --git a/test-environments/overcloud-cacert.pem b/test-environments/overcloud-cacert.pem deleted file mode 100644 index fe6206e70..000000000 --- a/test-environments/overcloud-cacert.pem +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDhTCCAm2gAwIBAgIJAI8wrqY4AYnnMA0GCSqGSIb3DQEBCwUAMFkxCzAJBgNV -BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg -Q29tcGFueSBMdGQxFTATBgNVBAMMDDE5Mi4xNjguMjQuNjAeFw0xNjExMDkxNTIx -NDhaFw0xNzExMDkxNTIxNDhaMFkxCzAJBgNVBAYTAlhYMRUwEwYDVQQHDAxEZWZh -dWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQxFTATBgNVBAMM -DDE5Mi4xNjguMjQuNjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOo1 -4ECMx3cWSIIxo6wmvLINZyyUqdhEp3yEZT4KM38wDui+Sw52uVhd2WzyM6ywkFDz -ePs4X64P5KbbOJz5k5mR/4QzGDREmF9vvmzIiQ1URVxOAxGvNoc2LwHDJyYBoIF0 -s6uRwXfL6zyxc4sYsWVejDmk1JyHFcf1pSTg3pz6wsfhgnG3J/zW3kGK85TwqF3a -Fz34yNSJF9y7muRjg0K0hW392sU2xgAkjYrpk6mKweWDcEa3MU38RMrOfEw0ORGJ -MYJZjGDN7Fah12k95sUZ8Xbjnp476i63PBVpB+/rQtGsZK7AFWy/MtBRPfvNkpm+ -DqAOip2Y4WG08rgEuqsCAwEAAaNQME4wHQYDVR0OBBYEFHNIz4VamTAoAR176ZU5 -3zGPZSR1MB8GA1UdIwQYMBaAFHNIz4VamTAoAR176ZU53zGPZSR1MAwGA1UdEwQF -MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAOU2MShnCtj3F1EqoCsx84x+fPajjy/i -Rbd+FIcGKOOBlUxLNMLQeJyB8utui1uXa0LWuun4Vc0JLdri7qSXfbOqgEi/Dkj7 -fvLPACSxLzBdHr4atIEP+WkPAL31obcuKshm0TxaMui4ymR6gIMem/uHR/rg5l6L -I6Y9hNS/A2k6HohhbIVRuT0abxmDZ9RNjJxxm0RydMwxMTtzJGJrc/t/SznFpKRf -FQ2CFh3O5w14mJaKJZPuOM8g8q/PVHSZkMO7A+2BoxDKjF/P2fPvGPQSV3AoYleu -72dAUied9SXghzgyx5BYCJTwRL9poSG39okq+/zl4c+JVyFxweamlSI= ------END CERTIFICATE----- diff --git a/test-environments/worker-config.yaml b/test-environments/worker-config.yaml deleted file mode 100644 index bb6dd3afb..000000000 --- a/test-environments/worker-config.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# TODO(bnemec): Should these settings be moved to low-memory-usage.yaml -# in tripleo-heat-templates? -parameter_defaults: - ControllerExtraConfig: - heat::api_cloudwatch::enabled: false - heat::api_cfn::enabled: false - heat::rpc_response_timeout: 600 - NovaComputeExtraConfig: - # Required for Centos 7.3 and Qemu 2.6.0 - nova::compute::libvirt::libvirt_cpu_mode: 'none' diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index bf6777ac9..000000000 --- a/test-requirements.txt +++ /dev/null @@ -1,86 +0,0 @@ -ansi2html==1.6.0 -ansible==4.10.0 -ansible-compat==1.0.0 -ansible-core==2.11.7 -arrow==1.2.1 -attrs==21.4.0 -bcrypt==3.2.0 -binaryornot==0.4.4 -cached-property==1.5.2 -Cerberus==1.3.2 -certifi==2021.10.8 -cffi==1.15.0 -cfgv==3.3.1 -chardet==4.0.0 -charset-normalizer==2.0.10 -click==8.0.3 -click-help-colors==0.9.1 -colorama==0.4.4 -commonmark==0.9.1 -cookiecutter==1.7.3 -coverage==6.2 -cryptography==36.0.1 -dataclasses==0.8; python_version < '3.7' -distlib==0.3.4 -distro==1.6.0 -docker==5.0.3 -enrich==1.2.7 -execnet==1.9.0 -filelock==3.4.1 -greenlet==1.1.2 -identify==2.4.2 -idna==3.3 -importlib-metadata==4.8.3 -importlib-resources==5.2.3 -iniconfig==1.1.1 -jenkinsapi==0.3.11 -Jinja2==3.0.3 -jinja2-time==0.2.0 -MarkupSafe==2.0.1 -molecule==3.5.2 -molecule-docker==1.1.0 -more-itertools==8.12.0 -nodeenv==1.6.0 -packaging==21.3 -paramiko==2.9.2 -pbr==5.8.0 -pexpect==4.8.0 -platformdirs==2.4.0 -pluggy==1.0.0 -poyo==0.5.0 -pre-commit==2.16.0 -ptyprocess==0.7.0 -py==1.11.0 -pycparser==2.21 -Pygments==2.11.2 -PyNaCl==1.5.0 -pyparsing==3.0.6 -pytest==6.2.5 -pytest-cov==3.0.0 -pytest-forked==1.4.0 -pytest-html==3.1.1 -pytest-metadata==1.11.0 -pytest-mock==3.6.1 -pytest-molecule==1.3.6 -pytest-plus==0.2 -pytest-testinfra==6.5.0 -pytest-xdist==2.5.0 -python-dateutil==2.8.2 -python-slugify==5.0.2 -pytz==2021.3 -PyYAML==5.4.1 -requests==2.27.1 -resolvelib==0.5.4 -rich==11.0.0 -selinux==0.2.1 -six==1.16.0 -SQLAlchemy==1.4.29 -subprocess-tee==0.3.5 -text-unidecode==1.3 -toml==0.10.2 -tomli==1.2.3 -typing_extensions==4.0.1 -urllib3==1.26.8 -virtualenv==20.13.0 -websocket-client==1.2.3 -zipp==3.6.0 diff --git a/testenv-client b/testenv-client deleted file mode 100755 index c1cbe1619..000000000 --- a/testenv-client +++ /dev/null @@ -1,265 +0,0 @@ -#!/usr/bin/python -# -# Runs a tripleo-ci test-client -# -# Copyright 2013 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -import argparse -import json -import logging -import os -import subprocess -import sys -import tempfile -import textwrap -import threading -import time -import uuid - -import gear - -logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') -logger = logging.getLogger('testenv-client') -logger.setLevel(logging.INFO) - - -class TestCallback(object): - def __init__(self, servers, name, command): - self.servers = servers - self.name = name - self.command = command - self.created = time.time() - # Default the return value to None, this may end up being - # used if the gearman worker goes down before the job finishes - self.rv = None - - def __call__(self): - self.worker = gear.Worker('testenv-client-%s' % self.name) - add_servers(self.worker, self.servers) - self.worker.waitForServer() - - self.worker.registerFunction(self.name) - - try: - job = self.worker.getJob() - except gear.InterruptedError: - return - - logger.info('Received job : %s', job.arguments.strip()) - time_waiting = time.time() - self.created - if time_waiting > 90: - logger.warn('%.1f seconds waiting for a worker.' % (time_waiting)) - - if ( - "Couldn't retrieve env" in job.arguments - or "Failed creating OVB stack" in job.arguments - ): - logger.error(job.arguments) - self.rv = 2 - job.sendWorkComplete("") - return - - logger.info('Running command "%s"', ' '.join(self.command)) - - with tempfile.NamedTemporaryFile('w') as fp: - fp.write(job.arguments) - fp.flush() - os.environ["TE_DATAFILE"] = fp.name - - try: - self.rv = subprocess.call(self.command) - except Exception: - logger.exception("Error calling command") - self.rv = 2 - - job.sendWorkComplete("") - - -class TestEnvClient(gear.Client): - def __init__(self): - super(TestEnvClient, self).__init__() - self.event = threading.Event() - - def handleWorkComplete(self, packet): - super(TestEnvClient, self).handleWorkComplete(packet) - self.event.set() - - def handleWorkException(self, packet): - super(TestEnvClient, self).handleWorkException(packet) - self.event.set() - - def handleWorkFail(self, packet): - super(TestEnvClient, self).handleWorkFail(packet) - self.event.set() - - def wait(self, timeout=None): - """Wait for notification of completion, error or failure. - - :param timeout: a timeout for the operation in seconds - :type timeout: float - :returns: True if a notification was received, False on timeout - """ - self.event.wait(timeout) - return self.event.is_set() - - -def add_servers(client, servers): - for server in servers.split(','): - server = server.rsplit(':', 1) - if len(server) == 1: - server.append('4730') - client.addServer(server[0], int(server[1])) - - -def main(args=sys.argv[1:]): - parser = argparse.ArgumentParser( - description=( - textwrap.dedent( - """ - Starts up a gearman worker and then calls the job "lockenv" over - gearman, then waits for the worker to be called, once the worker - is called it will place the provided data in a datafile (indicated - by the TE_DATAFILE environment variable) and run the "command" - provided, the exit code will be the exit code of the command that - was run. Essentially this allows a command to be run while the - worker is holding a test environment in a locked state e.g. to - simply output the data provided one could run the command: - $ echo 'cat $TE_DATAFILE' | %s -- bash - """ - % sys.argv[0] - ) - ), - formatter_class=argparse.RawTextHelpFormatter, - ) - parser.add_argument( - 'command', nargs="+", help='A command to run once the test env is locked' - ) - parser.add_argument( - '--geard', - '-b', - default='127.0.0.1:4730', - help='A comma separated list of gearman brokers to ' 'connect to.', - ) - parser.add_argument( - '--jobnum', - '-n', - default=uuid.uuid4().hex, - help='A unique identifier identifing this job.', - ) - parser.add_argument( - '--timeout', - '-t', - default='10800', - help='Set a timeout, after which the command will ' 'be killed.', - ) - parser.add_argument( - '--envsize', default="2", help='Number of baremetal nodes to request' - ) - parser.add_argument( - '--compute-envsize', - default='0', - help='Number of compute baremetal nodes to request. ' - 'When this is set to a value > 0, the primary ' - 'nodes will be tagged with the controller ' - 'profile and the extra nodes with compute. The ' - 'compute nodes will be a smaller flavor in order ' - 'to use less resources.', - ) - parser.add_argument( - '--ucinstance', - help='uuid for the undercloud instance (where an ' - 'interface on the provisioning net is attached', - ) - parser.add_argument( - '--create-undercloud', action='store_true', help='deploy the undercloud node.' - ) - parser.add_argument( - '--ssh-key', default='', help='ssh key for the ovb nodes to be deployed.' - ) - parser.add_argument( - '--net-iso', - default="multi-nic", - choices=['none', 'multi-nic', 'public-bond'], - help='"none" requests an environment without network ' - 'isolation, "multi-nic" requests one with a ' - 'basic multiple nic configuration, and ' - '"public-bond" requests one like "multi-nic" ' - 'but with two public nics for use with bonded ' - 'nic-configs.', - ) - parser.add_argument( - '--extra-nodes', - default='0', - help='Number of extra undercloud-like nodes to ' 'request', - ) - parser.add_argument('--debug', '-d', action='store_true', help='Set to debug mode.') - opts = parser.parse_args(args) - if opts.debug: - logger.setLevel(logging.DEBUG) - - callback_name = "callback_" + opts.jobnum - cb = TestCallback(opts.geard, callback_name, opts.command) - threading.Thread(target=cb).start() - - client = TestEnvClient() - add_servers(client, opts.geard) - client.waitForServer() - - job_identifier = '%s: %s' % ( - os.environ.get('ZUUL_CHANGE', 'No change'), - os.environ['TOCI_JOBTYPE'], - ) - job_params = { - "callback_name": callback_name, - "timeout": opts.timeout, - "envsize": opts.envsize, - "compute_envsize": opts.compute_envsize, - "ucinstance": opts.ucinstance, - "create_undercloud": "true" if opts.create_undercloud else "", - "ssh_key": opts.ssh_key, - "net_iso": opts.net_iso, - "extra_nodes": opts.extra_nodes, - "job_identifier": job_identifier, - } - job = gear.Job('lockenv', json.dumps(job_params)) - client.submitJob(job) - - # No timeout here as there will be a timeout on the jenkins jobs, which is - # also passed to the testenv-worker, lets not second guess them. - client.wait() - if job.failure: - # This signals an error with the gearman connection to the worker - # we log it, but still return cb.rv the command may have succeeded - logger.error("The gearman Job has failed") - - cb.worker.stopWaitingForJobs() - - # If the testenv worker releases the environment before our command - # completes we kill this process and all its children, to immediately - # stop the running job - if cb.rv is None: - logger.error( - "The command hasn't completed but the testenv worker has " - "released the environment. Killing all processes." - ) - subprocess.call(["sudo", "kill", "-9", "-%d" % os.getpgrp()]) - logger.debug("Exiting with status : %d", cb.rv) - return cb.rv - - -if __name__ == '__main__': - exit(main()) diff --git a/toci-quickstart/config/collect-logs.yml b/toci-quickstart/config/collect-logs.yml deleted file mode 100644 index e8287723f..000000000 --- a/toci-quickstart/config/collect-logs.yml +++ /dev/null @@ -1,338 +0,0 @@ ---- -# Collect logs settings - -artcl_txt_rename: true -artcl_publish: true -artcl_rsync_logs: false -artcl_collect_list: - - /var/lib/container-puppet/ - - /var/lib/config-data/ansible-generated/ - - /var/lib/config-data/puppet-generated/ - - /var/lib/docker-puppet/ - - /var/lib/heat-config/ - - /var/lib/kolla/config_files/ - - /var/log/libvirt/ - - /var/lib/mistral/ - - /var/lib/neutron/ - - /var/lib/nova/instances/*/console.log - - /var/lib/tripleo-config/ - - /var/lib/unbound/unbound.log - - /var/lib/certmonger/ - - /var/lib/pki/ - - /home/{{ undercloud_user }}/.instack/install-undercloud.log - - /home/{{ undercloud_user }}/.config/openstack/ - - /home/{{ undercloud_user }}/.tripleo/ - - /home/{{ undercloud_user }}/stackrc - - /home/{{ undercloud_user }}/overcloudrc - - /home/{{ undercloud_user }}/99-standalone-vars - - /home/*/*.log - - /home/*/*.txt - - /home/*/*.json - - /home/*/*.conf - - /home/*/*.cfg - - /home/*/*.y*ml* - - /home/*/*.sh - - /home/*/delorean.repo.md5 - - /home/*/undercloud-ansible-* - - /home/{{ undercloud_user }}/config-download/ - - /home/{{ undercloud_user }}/container-builds/ - - /home/{{ undercloud_user }}/deploy-overcloudrc - - /home/{{ undercloud_user }}/network-environment.yaml - - /home/{{ undercloud_user }}/workspace/ovb/*.y*ml - - /home/{{ undercloud_user }}/workspace/*.log - - /home/{{ undercloud_user }}/workspace/*.sh - - /home/{{ undercloud_user }}/skip_file - - /home/{{ undercloud_user }}/*.subunit - - /home/{{ undercloud_user }}/tempest/ - - /home/{{ undercloud_user }}/tripleo-heat-installer-templates/ - - /home/{{ undercloud_user }}/local_tht/ - - /home/{{ undercloud_user }}/inventory - - /home/{{ undercloud_user }}/tripleo-config-download/ - - /home/{{ undercloud_user }}/tripleo-*-config/ - - /home/{{ undercloud_user }}/tripleo-config/ - - /home/{{ undercloud_user }}/tripleo-config-generated-env-files/ - - /home/{{ undercloud_user }}/tripleo-deploy/ - - /home/{{ undercloud_user }}/tripleo-upgrade/ - - /home/{{ undercloud_user }}/*-ansible-*/ - - /home/{{ undercloud_user }}/*-install-* - - /home/{{ undercloud_user }}/browbeat/log/* - - /home/{{ undercloud_user }}/.config/ - - /home/{{ undercloud_user }}/.tobiko/ - - /home/{{ undercloud_user }}/overcloud-deploy/ - - /home/{{ undercloud_user }}/validations/ - - /tmp/ansible-*/ - - /tmp/ansible-* - - /etc/ansible/ - - /etc/aodh/ - - /etc/audit/ - - /etc/autofs* - - /etc/auto.master* - - /etc/barbican/ - - /etc/ceilometer/ - - /etc/centos-release* - - /etc/ceph/ - - /etc/chrony.conf - - /etc/ci/ - - /etc/cinder/ - - /etc/cloud/ - - /etc/cni/ - - /etc/collectd.conf* - - /etc/collectd.d/ - - /etc/congress/ - - /etc/containers/ - - /etc/corosync/ - - /etc/default/ - - /etc/dib-*/ - - /etc/dib-* - - /etc/dnsmasq* - - /etc/docker/ - - /etc/docker-distribution/ - - /etc/ec2api/ - - /etc/etcd/ - - /etc/exports* - - /etc/exports*/ - - /etc/facter/ - - /etc/firewalld/ - - /etc/fluentd/ - - /etc/fstab - - /etc/glance/ - - /etc/gnocchi/ - - /etc/group* - - /etc/ha.d/ - - /etc/haproxy/ - - /etc/heat/ - - /etc/hiera.* - - /etc/host.conf - - /etc/hostname - - /etc/hosts - - /etc/httpd/conf*/ - - /etc/idmapd.conf - - /etc/image-hostname - - /etc/ipa/ - - /etc/iproute2/ - - /etc/ironic/ - - /etc/ironic-inspector/ - - /etc/iscsi/ - - /etc/issue - - /etc/issue.net - - /etc/keepalived/ - - /etc/keystone/ - - /etc/kolla/ - - /etc/krb5.conf* - - /etc/krb5.conf*/ - - /etc/kubernetes/ - - /etc/libvirt/ - - /etc/lsb-release.d/ - - /etc/lvm/ - - /etc/machine-id - - /etc/manila/ - - /etc/mistral/ - - /etc/modprobe.d/ - - /etc/modules-load.d/ - - /etc/mongo* - - /etc/motd - - /etc/multipath* - - /etc/my.cnf* - - /etc/my.cnf.d/ - - /etc/named* - - /etc/named/ - - /etc/NetworkManager/ - - /etc/networks* - - /etc/neutron/ - - /etc/nftables/ - - /etc/nodepool/ - - /etc/nova* - - /etc/nova*/ - - /etc/nsswitch.conf* - - /etc/ntp/ - - /etc/ntp.conf - - /etc/numad.conf - - /etc/oci-register-machine.conf - - /etc/octavia/ - - /etc/openldap/ - - /etc/openstack/ - - /etc/openstack-dashboard/ - - /etc/openvswitch/ - - /etc/origin/ - - /etc/os-* - - /etc/os-net-config/ - - /etc/pacemaker/ - - /etc/passwd - - /etc/panko/ - - /etc/pip.conf - - /etc/pki/ - - /etc/polkit-1/ - - /etc/protocols* - - /etc/puppet/ - - /etc/pycadf/ - - /etc/python/ - - /etc/qemu-kvm/ - - /etc/qpid-dispatch/ - - /etc/rear/ - - /etc/rabbitmq/ - - /etc/radvd.conf - - /etc/redhat-lsb/ - - /etc/redhat-release* - - /etc/redis* - - /etc/redis*/ - - /etc/resolv.* - - /etc/rootwrap.d/ - - /etc/rsyncd.conf - - /etc/rsyslog.* - - /etc/rsyslog.d/ - - /etc/ryu/ - - /etc/sahara/ - - /etc/sasl2/ - - /etc/security/ - - /etc/selinux/config - - /etc/sensu/ - - /etc/sestatus.conf - - /etc/shadow* - - /etc/snmp/ - - /etc/skydive/ - - /etc/sos.conf - - /etc/ssl/ - - /etc/ssh/ - - /etc/sssd/ - - /etc/sudo.conf - - /etc/sudoers* - - /etc/sudoers.d/ - - /etc/swift/ - - /etc/sysconfig/ - - /etc/sysctl.* - - /etc/sysctl.d/ - - /etc/systemd/*.conf - - /etc/systemd/system/ceph* - - /etc/systemd/system/*tripleo* - - /etc/systemd/system/*paunch* - - /etc/systemd/system/*netns* - - /etc/tacker/ - - /etc/target/ - - /etc/tempest/ - - /etc/trove/ - - /etc/trusted-* - - /etc/tuna/ - - /etc/unbound/unbound.conf - - /etc/unbound/forwarding.conf - - /etc/unbound/conf.d/ttl.conf - - /etc/unbound/conf.d/unbound-logging.conf - - /etc/vconsole.conf - - /etc/yum/ - - /etc/dnf/ - - /etc/yum.conf - - /etc/yum.repos.d/ - - /etc/zaqar/ - - /tmp/tripleo-container-image-prepare-ansible.log - - /usr/share/ansible/tripleo-inventory/ - - /var/log/atop* - - /var/log/dmesg.txt - - /var/log/host_info.txt - - /var/log/journal.txt - - /var/log/postci.txt - - /var/log/secure - - /var/log/unbound.log - - /var/log/yum.log - - /var/log/dnf.log - - /var/log/cloud-init*.log - - /var/log/aodh/ - - /var/log/audit/ - - /var/log/barbican/ - - /var/log/bmlogs/ - - /var/log/ceilometer/ - - /var/log/ceph/ - - /var/log/cinder/ - - /var/log/cloudkitty/ - - /var/log/cluster/ - - /var/log/config-data/ - - /var/log/congress/ - - /var/log/containers/ - - /var/log/deployed-server-enable-ssh-admin.log - - /var/log/deployed-server-os-collect-config.log - - /var/log/designate/ - - /var/log/dirsrv/ - - /var/log/dmesg/ - - /var/log/extra/ - - /var/log/ec2api/ - - /var/log/glance/ - - /var/log/gnocchi/ - - /var/log/heat/ - - /var/log/heat-launcher/ - - /var/log/horizon/ - - /var/log/httpd/ - - /var/log/ipaclient-install.log - - /var/log/ipaserver-install.log - - /var/log/ironic/ - - /var/log/ironic-inspector/ - - /var/log/krb5*.log - - /var/log/libvirt/ - - /var/log/keystone/ - - /var/log/manila/ - - /var/log/mariadb/ - - /var/log/mistral/ - - /var/log/monasca/ - - /var/log/murano/ - - /var/log/netstat*.log - - /var/log/neutron/ - - /var/log/nova/ - - /var/log/novajoin/ - - /var/log/octavia/ - - /var/log/openvswitch/ - - /var/log/ovn/ - - /var/log/os-apply-config.log - - /var/log/pacemaker/ - - /var/log/pacemaker.log* - - /var/log/panko/ - - /var/log/paunch.log - - /var/log/pcsd/ - - /var/log/pki/ - - /var/log/qdr/ - - /var/log/rabbitmq/ - - /var/log/redis/ - - /var/log/sahara/ - - /var/log/sensu/ - - /var/log/setup-ipa-client.log - - /var/log/setup-ipa-client-ansible.log - - /var/log/sssd/ - - /var/log/swift/ - - /var/log/tacker/ - - /var/log/tempest/ - - /var/log/tripleo-container-image-prepare.*.log - - /var/log/trove/ - - /var/log/vitrage/ - - /var/log/validations/ - - /var/log/watcher/ - - /var/log/zaqar/ - - /var/named/ - -# the above list was created from -# https://raw.githubusercontent.com/openstack/puppet-openstack-integration/master/openstack_modules.txt -artcl_exclude_list: - - /etc/puppet/modules/ - - /var/log/journal/* - - /var/log/extra/lsof* - - /home/{{ undercloud_user }}/tempest/etc/cirros* - - /home/{{ undercloud_user }}/tempest/.stackviz - - /home/{{ undercloud_user }}/tempest/.stestr - - /home/{{ undercloud_user }}/tempest/etc/*.sample - - /home/{{ undercloud_user }}/.tobiko/cache/ - - /home/{{ undercloud_user }}/.tobiko/*.subunit - - /home/{{ undercloud_user }}/instackenv.json - - /etc/pki/rhui/ - - overlay* - - root - - console*primary.log - - anaconda* - - standalone-install-* - - undercloud-install-* - # Another list discovered after POST_FAILURES - - home/{{ undercloud_user }}/src - - /lib/rpm/ - - /lib64/pcsd - - /opt/git - - /tmp - - /usr/lib/rpm - - /usr/lib64/pcsd - - /var/lib/texmf/ - - /usr/tmp - - /usr/share/texlive - - /var/tmp diff --git a/toci-quickstart/config/testenv/baremetal_hosts b/toci-quickstart/config/testenv/baremetal_hosts deleted file mode 100644 index e69de29bb..000000000 diff --git a/toci-quickstart/config/testenv/multinode-ibm.yml b/toci-quickstart/config/testenv/multinode-ibm.yml deleted file mode 100644 index 53e7f7470..000000000 --- a/toci-quickstart/config/testenv/multinode-ibm.yml +++ /dev/null @@ -1,72 +0,0 @@ ---- -# TRIPLEO-CI environment settings -cloudenv: "ibm" -undercloud_user: "{{ lookup('env','USER') }}" -non_root_user: "{{ undercloud_user }}" -workers_args: > - -e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml - -e /usr/share/openstack-tripleo-heat-templates/environments/debug.yaml - --overcloud-ssh-user {{ undercloud_user }} -# ara install and config -undercloud_ansible_cfg: false - -toci_vxlan_networking: true -toci_vxlan_networking_multinode: true -vxlan_mtu: 1350 -hostname_correction: true # workaround restriction on toci images - -mtu: "{{ vxlan_mtu }}" -undercloud_local_mtu: "{{ mtu }}" -overcloud_neutron_global_physnet_mtu: "{{ mtu }}" - -ceph_use_fqdn: true - -# environment settings, not TRIPLEO-CI specific -undercloud_local_interface: "br-ex" # related to osinfra network configuration -flavor_args: "" -undercloud_conf_extras: "net_config_override = /opt/stack/new/tripleo-ci/undercloud-configs/net-config-multinode.json.template" -# Images settings -image_cache_dir_cleanup: true -# user home (working_dir default) is the base dir for all images operations -# if it's changed, nothing will work -build_image_isolated: false -build_undercloud: false - -# Rely on RDO registry instead of docker.io due to rate limit -# job.build_container_images is defined in zuul as a -# direct var. adding build_container_images as tqe -# var so that we can turn this on/off per release w/o -# changing zuul and breaking jobs via inheritance. -docker_registry_host: >- - {% if job is defined and - job.build_container_images is defined and - job.build_container_images|default(false)|bool or - build_container_images|default(false)|bool -%} - 127.0.0.1:5001 - {%- elif job.consumer_job | default(false) | bool -%} - {{ job.registry_ip_address_branch[release] }}:5001 - {%- else -%} - quay.rdoproject.org - {%- endif -%} - -# Container update settings -update_containers: >- - {% if containerized_overcloud|bool or containerized_undercloud|bool -%} - true - {%- endif -%} - -# build-test packages -artg_repos_dir: "{{ tripleo_root }}" - -# disable disk cleaning before starting installation -undercloud_clean_nodes: false -# InfluxDB module settings -influxdb_only_successful_tasks: true -influxdb_measurement: job -influxdb_url: https://influxdb.review.rdoproject.org -influxdb_port: 8086 -influxdb_user: tripleo_ci -influxdb_password: -influxdb_dbname: tripleo_ci -influxdb_data_file_path: "{{ artcl_collect_dir }}/influxdb_data" -influxdb_create_data_file: true diff --git a/toci-quickstart/config/testenv/multinode-psi.yml b/toci-quickstart/config/testenv/multinode-psi.yml deleted file mode 100644 index 3060890b8..000000000 --- a/toci-quickstart/config/testenv/multinode-psi.yml +++ /dev/null @@ -1,74 +0,0 @@ ---- -# TRIPLEO-CI environment settings -cloudenv: "psi" -undercloud_user: "{{ lookup('env','USER') }}" -non_root_user: "{{ undercloud_user }}" -workers_args: > - -e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml - -e /usr/share/openstack-tripleo-heat-templates/environments/debug.yaml - --overcloud-ssh-user {{ undercloud_user }} -# ara install and config -undercloud_ansible_cfg: false - -toci_vxlan_networking: true -toci_vxlan_networking_multinode: true -vxlan_mtu: 1350 -hostname_correction: true # workaround restriction on toci images - -mtu: "{{ vxlan_mtu }}" -undercloud_local_mtu: "{{ mtu }}" -minion_local_mtu: "{{ mtu }}" -overcloud_neutron_global_physnet_mtu: "{{ mtu }}" - -ceph_use_fqdn: true - -# environment settings, not TRIPLEO-CI specific -undercloud_local_interface: "br-ex" # related to osinfra network configuration -minion_local_interface: "br-ex" # related to osinfra network configuration -flavor_args: "" -undercloud_conf_extras: "net_config_override = /opt/stack/new/tripleo-ci/undercloud-configs/net-config-multinode.json.template" -# Images settings -image_cache_dir_cleanup: true -# user home (working_dir default) is the base dir for all images operations -# if it's changed, nothing will work -build_image_isolated: false -build_undercloud: false - -# Rely on RDO registry instead of docker.io due to rate limit -# job.build_container_images is defined in zuul as a -# direct var. adding build_container_images as tqe -# var so that we can turn this on/off per release w/o -# changing zuul and breaking jobs via inheritance. -docker_registry_host: >- - {% if job is defined and - job.build_container_images is defined and - job.build_container_images|default(false)|bool or - build_container_images|default(false)|bool -%} - 127.0.0.1:5001 - {%- elif job.consumer_job | default(false) | bool -%} - {{ job.registry_ip_address_branch[release] }}:5001 - {%- else -%} - quay.rdoproject.org - {%- endif -%} - -# Container update settings -update_containers: >- - {% if containerized_overcloud|bool or containerized_undercloud|bool -%} - true - {%- endif -%} - -# build-test packages -artg_repos_dir: "{{ tripleo_root }}" - -# disable disk cleaning before starting installation -undercloud_clean_nodes: false -# InfluxDB module settings -influxdb_only_successful_tasks: true -influxdb_measurement: job -influxdb_url: https://influxdb.review.rdoproject.org -influxdb_port: 8086 -influxdb_user: tripleo_ci -influxdb_password: -influxdb_dbname: tripleo_ci -influxdb_data_file_path: "{{ artcl_collect_dir }}/influxdb_data" -influxdb_create_data_file: true diff --git a/toci-quickstart/config/testenv/multinode-rdocloud.yml b/toci-quickstart/config/testenv/multinode-rdocloud.yml deleted file mode 100644 index 93b821117..000000000 --- a/toci-quickstart/config/testenv/multinode-rdocloud.yml +++ /dev/null @@ -1,80 +0,0 @@ ---- -# TRIPLEO-CI environment settings -cloudenv: "rdo" -undercloud_user: "{{ lookup('env','USER') }}" -non_root_user: "{{ undercloud_user }}" -workers_args: > - -e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml - -e /usr/share/openstack-tripleo-heat-templates/environments/debug.yaml - --overcloud-ssh-user {{ undercloud_user }} - -# ara install and config -undercloud_ansible_cfg: false - -toci_vxlan_networking: true -toci_vxlan_networking_multinode: true -vxlan_mtu: 1350 -hostname_correction: true # workaround restriction on toci images - -mtu: "{{ vxlan_mtu }}" -undercloud_local_mtu: "{{ mtu }}" -minion_local_mtu: "{{ mtu }}" -overcloud_neutron_global_physnet_mtu: "{{ mtu }}" - -ceph_use_fqdn: true - -# environment settings, not TRIPLEO-CI specific -undercloud_local_interface: "br-ex" # related to osinfra network configuration -minion_local_interface: "br-ex" # related to osinfra network configuration -flavor_args: "" -undercloud_conf_extras: "net_config_override = /opt/stack/new/tripleo-ci/undercloud-configs/net-config-multinode.json.template" -# Images settings -image_cache_dir_cleanup: true -# user home (working_dir default) is the base dir for all images operations -# if it's changed, nothing will work -build_image_isolated: false -build_undercloud: false - -# Rely on RDO registry instead of docker.io due to rate limit -# job.build_container_images is defined in zuul as a -# direct var. adding build_container_images as tqe -# var so that we can turn this on/off per release w/o -# changing zuul and breaking jobs via inheritance. -docker_registry_host: >- - {% if job is defined and - job.build_container_images is defined and - job.build_container_images|default(false)|bool or - build_container_images|default(false)|bool -%} - 127.0.0.1:5001 - {%- elif job.consumer_job | default(false) | bool -%} - {{ job.registry_ip_address_branch[release] }}:5001 - {%- else -%} - quay.rdoproject.org - {%- endif -%} - -# Container settings are set in release files -# Container update settings -update_containers: >- - {% if containerized_overcloud|bool or containerized_undercloud|bool -%} - true - {%- endif -%} - -# Deployment metrics -ara_graphite_prefix: "test.tripleo.{{ lookup('env', 'STABLE_RELEASE')|default('master', true) }}.{{ lookup('env', 'TOCI_JOBTYPE') }}." -ara_graphite_server: 66.187.229.172 - -# build-test packages -artg_repos_dir: "{{ tripleo_root }}" - -# InfluxDB module settings -influxdb_only_successful_tasks: true -influxdb_measurement: job -influxdb_url: https://influxdb.review.rdoproject.org -influxdb_port: 8086 -influxdb_user: tripleo_ci -influxdb_password: -influxdb_dbname: tripleo_ci -influxdb_data_file_path: "{{ artcl_collect_dir }}/influxdb_data" -influxdb_create_data_file: true -atop_command: atop -R -w /var/log/atop.bin -artcl_gzip: true diff --git a/toci-quickstart/config/testenv/multinode-vexxhost.yml b/toci-quickstart/config/testenv/multinode-vexxhost.yml deleted file mode 100644 index 42ad0a857..000000000 --- a/toci-quickstart/config/testenv/multinode-vexxhost.yml +++ /dev/null @@ -1,91 +0,0 @@ ---- -# TRIPLEO-CI environment settings -cloudenv: "vexxhost" -undercloud_user: "{{ lookup('env','USER') }}" -non_root_user: "{{ undercloud_user }}" -workers_args: > - -e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml - -e /usr/share/openstack-tripleo-heat-templates/environments/debug.yaml - --overcloud-ssh-user {{ undercloud_user }} -# ara install and config -undercloud_ansible_cfg: false - -toci_vxlan_networking: true -toci_vxlan_networking_multinode: true -vxlan_mtu: 1350 -hostname_correction: true # workaround restriction on toci images - -mtu: "{{ vxlan_mtu }}" -undercloud_local_mtu: "{{ mtu }}" -minion_local_mtu: "{{ mtu }}" -overcloud_neutron_global_physnet_mtu: "{{ mtu }}" - -ceph_use_fqdn: true - -# TODO(ysandeep): Remove once https://bugs.launchpad.net/bugs/1983718 is fixed. -# This override the value `undercloud_undercloud_nameservers:` we have in multinode.yml -# for RDO jobs(running on Vexxhost), In upstream we have 127.0.0.1 entry in -# nameserver because in Upstream we have unbound service running -# on the node, The images we use in RDO don't have unbound installed. -# There are differene in ways how we built images in rdo(virt-customize) -# vs upstream(dib). -undercloud_undercloud_nameservers: - - 1.1.1.1 - - 8.8.8.8 - -# environment settings, not TRIPLEO-CI specific -undercloud_local_interface: "br-ex" # related to osinfra network configuration -minion_local_interface: "br-ex" # related to osinfra network configuration -flavor_args: "" -undercloud_conf_extras: "net_config_override = /opt/stack/new/tripleo-ci/undercloud-configs/net-config-multinode.json.template" -# Images settings -image_cache_dir_cleanup: true -# user home (working_dir default) is the base dir for all images operations -# if it's changed, nothing will work -build_image_isolated: false -build_undercloud: false - -# Rely on RDO registry instead of docker.io due to rate limit -# job.build_container_images is defined in zuul as a -# direct var. adding build_container_images as tqe -# var so that we can turn this on/off per release w/o -# changing zuul and breaking jobs via inheritance. -docker_registry_host: >- - {% if job is defined and - job.build_container_images is defined and - job.build_container_images|default(false)|bool or - build_container_images|default(false)|bool -%} - 127.0.0.1:5001 - {%- elif job.consumer_job | default(false) | bool -%} - {{ job.registry_ip_address_branch[release] }}:5001 - {%- else -%} - quay.rdoproject.org - {%- endif -%} - -# Container update settings -update_containers: >- - {% if containerized_overcloud|bool or containerized_undercloud|bool -%} - true - {%- endif -%} - -# build-test packages -artg_repos_dir: "{{ tripleo_root }}" - -# disable disk cleaning before starting installation -undercloud_clean_nodes: false -# InfluxDB module settings -influxdb_only_successful_tasks: true -influxdb_measurement: job -influxdb_url: https://influxdb.review.rdoproject.org -influxdb_port: 8086 -influxdb_user: tripleo_ci -influxdb_password: -influxdb_dbname: tripleo_ci -influxdb_data_file_path: "{{ artcl_collect_dir }}/influxdb_data" -influxdb_create_data_file: true - -# Browbeat settings -cloud_name: vexxhost -elastic_host: browbeat.test.com -grafana_host: browbeat.test.com -artcl_gzip: true diff --git a/toci-quickstart/config/testenv/multinode.yml b/toci-quickstart/config/testenv/multinode.yml deleted file mode 100644 index a55ef642f..000000000 --- a/toci-quickstart/config/testenv/multinode.yml +++ /dev/null @@ -1,73 +0,0 @@ ---- -# TRIPLEO-CI environment settings -cloudenv: "upstream" -undercloud_user: "{{ lookup('env','USER') }}" -non_root_user: "{{ undercloud_user }}" -ssh_user: "{{ undercloud_user }}" -workers_args: >- - -e {{ overcloud_templates_path }}/environments/low-memory-usage.yaml - -e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml - -e {{ overcloud_templates_path }}/environments/debug.yaml -# undercloud deployment -# NOTE(mwhahaha): removed until we can sort out the docker.io issues LP#1889122 -# undercloud_docker_registry_mirror: "{{ lookup('env','NODEPOOL_DOCKER_REGISTRY_V2_PROXY') }}" - -dlrn_use_local_mirrors: true - -# ara install and config -undercloud_ansible_cfg: false - -vxlan_networking: true -hostname_correction: true # workaround restriction on toci images - -vxlan_mtu: 1350 -mtu: "{{ vxlan_mtu }}" -undercloud_local_mtu: "{{ mtu }}" -minion_local_mtu: "{{ mtu }}" -overcloud_neutron_global_physnet_mtu: "{{ mtu }}" - -# environment settings, not TRIPLEO-CI specific -undercloud_local_interface: "br-ex" # related to osinfra network configuration -minion_local_interface: "br-ex" # related to osinfra network configuration -flavor_args: "" -undercloud_conf_extras: "net_config_override = /opt/stack/new/tripleo-ci/undercloud-configs/net-config-multinode.json.template" -undercloud_undercloud_nameservers: - - 127.0.0.1 - - 1.1.1.1 -undercloud_undercloud_cleanup: false - -# Container update settings -update_containers: >- - {% if registry_distro is defined and registry_distro|default('') is version('8', '==') and - job is defined and job.component is defined -%} - false - {%- elif containerized_overcloud|bool or containerized_undercloud|bool -%} - true - {%- endif -%} - -# build-test packages -artg_repos_dir: "{{ ansible_user_dir }}/src/opendev.org/openstack" -# InfluxDB module settings -influxdb_only_successful_tasks: true -influxdb_measurement: job -influxdb_url: -influxdb_port: 8086 -influxdb_user: tripleo_ci -influxdb_password: -influxdb_dbname: tripleo_ci -influxdb_data_file_path: "{{ artcl_collect_dir }}/influxdb_data" -influxdb_create_data_file: true - -run_tripleo_validations: false -run_tripleo_validations_negative_tests: false -run_tripleo_validations_setup: false - -# https://bugs.launchpad.net/tripleo/+bug/1817600 -# turn off performance monitoring. -# REENABLED(gcerami) 20190917 as zuul disabled ara reports -ara_generate_html: true -# run atop with interval (-i) of 180 seconds instead of default 10 -atop_command: atop -i 180 -R -w /var/log/atop.bin -artcl_gzip: false -# override any featureset file.. doc creation should not run upstream -artcl_gen_docs: false diff --git a/toci-quickstart/config/testenv/osinfra_hosts b/toci-quickstart/config/testenv/osinfra_hosts deleted file mode 100644 index 502c1e292..000000000 --- a/toci-quickstart/config/testenv/osinfra_hosts +++ /dev/null @@ -1,11 +0,0 @@ -localhost ansible_connection=local - -127.0.0.2 ansible_host=127.0.0.2 ansible_user="{{ undercloud_user }}" ansible_private_key_file="{{ lookup('env','HOME') }}"/.ssh/id_rsa undercloud_ip=127.0.0.2 - -undercloud ansible_host=127.0.0.2 ansible_user="{{ undercloud_user }}" ansible_private_key_file="{{ lookup('env','HOME') }}"/.ssh/id_rsa undercloud_ip=127.0.0.2 - -[virthost] -127.0.0.2 - -[undercloud] -undercloud diff --git a/toci-quickstart/config/testenv/ovb-ibm.yml b/toci-quickstart/config/testenv/ovb-ibm.yml deleted file mode 100644 index 51d31fed1..000000000 --- a/toci-quickstart/config/testenv/ovb-ibm.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -# This file contains settings that are specific to IBM -# These settings will override the ovb default settings - -cloudenv: "ibm" -custom_nameserver: - - 1.1.1.1 - - 1.0.0.1 -external_net: 'public' -ntp_server: '0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org' -workers_args: >- - -e {{ overcloud_templates_path }}/environments/low-memory-usage.yaml - -e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml - -e {{ overcloud_templates_path }}/environments/debug.yaml - -# Container update settings -update_containers: >- - {% if containerized_overcloud|bool or containerized_undercloud|bool -%} - true - {%- endif -%} - -# Rely on RDO registry instead of docker.io due to rate limit -# job.build_container_images is defined in zuul as a -# direct var. adding build_container_images as tqe -# var so that we can turn this on/off per release w/o -# changing zuul and breaking jobs via inheritance. -docker_registry_host: >- - {% if job is defined and - job.build_container_images is defined and - job.build_container_images|default(false)|bool or - build_container_images|default(false)|bool -%} - 127.0.0.1:5001 - {%- elif job.consumer_job | default(false) | bool -%} - {{ job.registry_ip_address_branch[release] }}:5001 - {%- else -%} - quay.rdoproject.org - {%- endif -%} - -# build-test packages -artg_repos_dir: "{{ tripleo_root }}" - -# disable disk cleaning before starting installation -undercloud_clean_nodes: false - -# InfluxDB module settings -influxdb_only_successful_tasks: true -influxdb_measurement: job -influxdb_url: https://influxdb.review.rdoproject.org -influxdb_port: 8086 -influxdb_user: tripleo_ci -influxdb_password: -influxdb_dbname: tripleo_ci -influxdb_data_file_path: "{{ artcl_collect_dir }}/influxdb_data" -influxdb_create_data_file: true - -# Browbeat settings -cloud_name: ibm -elastic_host: browbeat.test.com -grafana_host: browbeat.test.com - -# Ironic debug -# https://bugs.launchpad.net/tripleo/+bug/1797526 -step_introspect_debug: true - -# Ensure logs are gzipped -artcl_gzip: true diff --git a/toci-quickstart/config/testenv/ovb-psi.yml b/toci-quickstart/config/testenv/ovb-psi.yml deleted file mode 100644 index ffa309274..000000000 --- a/toci-quickstart/config/testenv/ovb-psi.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -# This file contains settings that are specific to Psi -# These settings will override the ovb default settings - -cloudenv: "psi" -custom_nameserver: - - 1.1.1.1 - - 1.0.0.1 -external_net: 'public' -ntp_server: '0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org' -workers_args: >- - -e {{ overcloud_templates_path }}/environments/low-memory-usage.yaml - -e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml - -e {{ overcloud_templates_path }}/environments/debug.yaml - -# Container update settings -update_containers: >- - {% if containerized_overcloud|bool or containerized_undercloud|bool -%} - true - {%- endif -%} - -# Rely on RDO registry instead of docker.io due to rate limit -# job.build_container_images is defined in zuul as a -# direct var. adding build_container_images as tqe -# var so that we can turn this on/off per release w/o -# changing zuul and breaking jobs via inheritance. -docker_registry_host: >- - {% if job is defined and - job.build_container_images is defined and - job.build_container_images|default(false)|bool or - build_container_images|default(false)|bool -%} - 127.0.0.1:5001 - {%- elif job.consumer_job | default(false) | bool -%} - {{ job.registry_ip_address_branch[release] }}:5001 - {%- else -%} - quay.rdoproject.org - {%- endif -%} - -# build-test packages -artg_repos_dir: "{{ tripleo_root }}" - -# disable disk cleaning before starting installation -undercloud_clean_nodes: false - -# InfluxDB module settings -influxdb_only_successful_tasks: true -influxdb_measurement: job -influxdb_url: https://influxdb.review.rdoproject.org -influxdb_port: 8086 -influxdb_user: tripleo_ci -influxdb_password: -influxdb_dbname: tripleo_ci -influxdb_data_file_path: "{{ artcl_collect_dir }}/influxdb_data" -influxdb_create_data_file: true - -# Browbeat settings -cloud_name: psi -elastic_host: browbeat.test.com -grafana_host: browbeat.test.com - -# Ironic debug -# https://bugs.launchpad.net/tripleo/+bug/1797526 -step_introspect_debug: true - -# Ensure logs are gzipped -artcl_gzip: true diff --git a/toci-quickstart/config/testenv/ovb-rdocloud.yml b/toci-quickstart/config/testenv/ovb-rdocloud.yml deleted file mode 100644 index 28caab83d..000000000 --- a/toci-quickstart/config/testenv/ovb-rdocloud.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -# This file contains settings that are specific to RDO Cloud. -# These settings will override the ovb default settings - -cloudenv: "rdo" -custom_nameserver: - - 1.1.1.1 - - 1.0.0.1 - - 38.145.33.91 -external_net: '38.145.32.0/22' -ntp_server: '0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org' -workers_args: >- - -e {{ overcloud_templates_path }}/environments/low-memory-usage.yaml - -e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml - -e {{ overcloud_templates_path }}/environments/debug.yaml - -# Container update settings -update_containers: >- - {% if containerized_overcloud|bool or containerized_undercloud|bool -%} - true - {%- endif -%} - -# Rely on RDO registry instead of docker.io due to rate limit -# job.build_container_images is defined in zuul as a -# direct var. adding build_container_images as tqe -# var so that we can turn this on/off per release w/o -# changing zuul and breaking jobs via inheritance. -docker_registry_host: >- - {% if job is defined and - job.build_container_images is defined and - job.build_container_images|default(false)|bool or - build_container_images|default(false)|bool -%} - 127.0.0.1:5001 - {%- elif job.consumer_job | default(false) | bool -%} - {{ job.registry_ip_address_branch[release] }}:5001 - {%- else -%} - quay.rdoproject.org - {%- endif -%} - -# build-test packages -artg_repos_dir: "{{ tripleo_root }}" - -# InfluxDB module settings -influxdb_only_successful_tasks: true -influxdb_measurement: job -influxdb_url: https://influxdb.review.rdoproject.org -influxdb_port: 8086 -influxdb_user: tripleo_ci -influxdb_password: -influxdb_dbname: tripleo_ci -influxdb_data_file_path: "{{ artcl_collect_dir }}/influxdb_data" -influxdb_create_data_file: true - -# Browbeat settings -cloud_name: rdocloud -elastic_host: browbeat.test.com -grafana_host: browbeat.test.com - -# Ironic debug -# https://bugs.launchpad.net/tripleo/+bug/1797526 -step_introspect_debug: true - -# Ensure logs are gzipped -artcl_gzip: true diff --git a/toci-quickstart/config/testenv/ovb-vexxhost.yml b/toci-quickstart/config/testenv/ovb-vexxhost.yml deleted file mode 100644 index 63e78b979..000000000 --- a/toci-quickstart/config/testenv/ovb-vexxhost.yml +++ /dev/null @@ -1,67 +0,0 @@ ---- -# This file contains settings that are specific to Vexxhost -# These settings will override the ovb default settings - -cloudenv: "vexxhost" -custom_nameserver: - - 1.1.1.1 - - 208.67.222.222 - - 208.67.220.220 -external_net: 'public' -ntp_server: '0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org' -workers_args: >- - -e {{ overcloud_templates_path }}/environments/low-memory-usage.yaml - -e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml - -e {{ overcloud_templates_path }}/environments/debug.yaml - -# Container update settings -update_containers: >- - {% if containerized_overcloud|bool or containerized_undercloud|bool -%} - true - {%- endif -%} - -# Rely on RDO registry instead of docker.io due to rate limit -# job.build_container_images is defined in zuul as a -# direct var. adding build_container_images as tqe -# var so that we can turn this on/off per release w/o -# changing zuul and breaking jobs via inheritance. -docker_registry_host: >- - {% if job is defined and - job.build_container_images is defined and - job.build_container_images|default(false)|bool or - build_container_images|default(false)|bool -%} - 127.0.0.1:5001 - {%- elif job.consumer_job | default(false) | bool -%} - {{ job.registry_ip_address_branch[release] }}:5001 - {%- else -%} - quay.rdoproject.org - {%- endif -%} - -# build-test packages -artg_repos_dir: "{{ tripleo_root }}" - -# disable disk cleaning before starting installation -undercloud_clean_nodes: false - -# InfluxDB module settings -influxdb_only_successful_tasks: true -influxdb_measurement: job -influxdb_url: https://influxdb.review.rdoproject.org -influxdb_port: 8086 -influxdb_user: tripleo_ci -influxdb_password: -influxdb_dbname: tripleo_ci -influxdb_data_file_path: "{{ artcl_collect_dir }}/influxdb_data" -influxdb_create_data_file: true - -# Browbeat settings -cloud_name: vexxhost -elastic_host: browbeat.test.com -grafana_host: browbeat.test.com - -# Ironic debug -# https://bugs.launchpad.net/tripleo/+bug/1797526 -step_introspect_debug: true - -# Ensure logs are gzipped -artcl_gzip: true diff --git a/toci-quickstart/config/testenv/ovb.yml b/toci-quickstart/config/testenv/ovb.yml deleted file mode 100644 index bade17dfb..000000000 --- a/toci-quickstart/config/testenv/ovb.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- -undercloud_type: ovb -use_testenv_broker: true -build_test_packages: true -undercloud_user: "{{ lookup('env','USER') }}" -non_root_user: "{{ undercloud_user }}" -ssh_user: "{{ undercloud_user }}" -existing_key_location: "/etc/nodepool/id_rsa" -enable_vbmc: false -gating_repo_enabled: true - -workers_args: >- - -e {{ overcloud_templates_path }}/environments/low-memory-usage.yaml - -e {{ tripleo_root }}/tripleo-ci/test-environments/worker-config.yaml - -e {{ overcloud_templates_path }}/environments/debug.yaml - -# Undercloud setup -undercloud_ironic_ipxe_port: 3816 -# set power state timeout to 180s in train, 60s will remain the default -# for more details, see https://bugs.launchpad.net/tripleo/+bug/1947403 -undercloud_ironic_power_state_change_timeout: "{{ '180' if release is defined and release in ['train'] else '60' }}" -non_root_user_setup: false -step_set_undercloud_hostname: true -undercloud_hostname: undercloud -# NOTE(mwhahaha): removed until we can sort out the docker.io issues LP#1889122 -# undercloud_docker_registry_mirror: "{{ lookup('env','NODEPOOL_DOCKER_REGISTRY_V2_PROXY') }}" -dlrn_use_local_mirrors: true -run_validate_undercloud: true -step_overcloud_prep_flavors: false - -# Overcloud deploy -overcloud_templates_path: /usr/share/openstack-tripleo-heat-templates - -# Network -# Deploy args -flavor_args: "" -# Images settings -image_cache_dir: "{{ working_dir }}/images-cache" -image_cache_dir_cleanup: true -# user home (working_dir default) is the base dir for all images operations -# if it's changed, nothing will work -images_working_dir: "{{ working_dir }}" -build_image_isolated: false -build_undercloud: false -images_destroy_working_dir: false -libguestfs_mode: false -# Network settings -step_adjust_mtu: true -mtu: 1350 -host_network_interfaces: - - eth0 - - eth1 - - "{% if network_isolation|default(true)|bool %}eth2{% endif %}" -mtu_interface: "{{ host_network_interfaces|select()|list }}" -undercloud_local_mtu: "{{ mtu }}" -overcloud_neutron_global_physnet_mtu: "{{ mtu }}" -floating_ip_cidr: >- - {%- if network_isolation|default(true)|bool %}10.0.0.0/24 - {%- else %}192.168.24.0/24 - {%- endif %} -undercloud_undercloud_cleanup: false - -# Deployment metrics -ara_graphite_prefix: "tripleo.{{ lookup('env', 'STABLE_RELEASE')|default('master', true) }}.{{ lookup('env', 'TOCI_JOBTYPE') }}." -ara_graphite_server: 66.187.229.172 - -# build-test packages -artg_repos_dir: "{{ ansible_user_dir }}/src/opendev.org/openstack" - -# https://bugs.launchpad.net/tripleo/+bug/1799895 -undercloud_workers: 1 - -# Ironic debug -# https://bugs.launchpad.net/tripleo/+bug/1797526 -step_introspect_debug: true -# Remove ContainerCli once this scenario is tested on CentOS8 -overcloud_container_cli: >- - {%- if ansible_distribution in ["RedHat", "CentOS"] and ansible_distribution_major_version|int >= 8 %}podman - {%- else %}docker{% endif -%} -ara_generate_html: false - -# overrides default timeout of 90min -deploy_timeout: 120 - -# OVB logs are far too big not to be compressed -artcl_gzip: true -# override any featureset file.. doc creation should not run in 3rd party -artcl_gen_docs: false diff --git a/toci-quickstart/config/testenv/ovb_hosts b/toci-quickstart/config/testenv/ovb_hosts deleted file mode 100644 index e5fc4fba8..000000000 --- a/toci-quickstart/config/testenv/ovb_hosts +++ /dev/null @@ -1,11 +0,0 @@ -localhost ansible_connection=local - -127.0.0.2 ansible_host=127.0.0.2 ansible_user="{{ undercloud_user }}" ansible_private_key_file="{{ lookup('env','HOME') }}"/.ssh/id_rsa undercloud_ip=127.0.0.2 - -undercloud ansible_host=undercloud ansible_user="{{ undercloud_user }}" ansible_private_key_file="{{ lookup('env','HOME') }}"/.ssh/id_rsa undercloud_ip=127.0.0.2 - -[virthost] -127.0.0.2 - -[undercloud] -undercloud diff --git a/toci-quickstart/config/testenv/singlenode-ibm.yml b/toci-quickstart/config/testenv/singlenode-ibm.yml deleted file mode 120000 index 0331c0b05..000000000 --- a/toci-quickstart/config/testenv/singlenode-ibm.yml +++ /dev/null @@ -1 +0,0 @@ -multinode-ibm.yml \ No newline at end of file diff --git a/toci-quickstart/config/testenv/singlenode-psi.yml b/toci-quickstart/config/testenv/singlenode-psi.yml deleted file mode 120000 index 1c9750508..000000000 --- a/toci-quickstart/config/testenv/singlenode-psi.yml +++ /dev/null @@ -1 +0,0 @@ -multinode-psi.yml \ No newline at end of file diff --git a/toci-quickstart/config/testenv/singlenode-rdocloud.yml b/toci-quickstart/config/testenv/singlenode-rdocloud.yml deleted file mode 120000 index 634bbfbae..000000000 --- a/toci-quickstart/config/testenv/singlenode-rdocloud.yml +++ /dev/null @@ -1 +0,0 @@ -multinode-rdocloud.yml \ No newline at end of file diff --git a/toci-quickstart/config/testenv/singlenode-vexxhost.yml b/toci-quickstart/config/testenv/singlenode-vexxhost.yml deleted file mode 120000 index 4981bb8b7..000000000 --- a/toci-quickstart/config/testenv/singlenode-vexxhost.yml +++ /dev/null @@ -1 +0,0 @@ -multinode-vexxhost.yml \ No newline at end of file diff --git a/toci-quickstart/config/testenv/singlenode.yml b/toci-quickstart/config/testenv/singlenode.yml deleted file mode 120000 index bf08a640a..000000000 --- a/toci-quickstart/config/testenv/singlenode.yml +++ /dev/null @@ -1 +0,0 @@ -multinode.yml \ No newline at end of file diff --git a/toci-quickstart/config/testenv/standalone-ibm.yml b/toci-quickstart/config/testenv/standalone-ibm.yml deleted file mode 120000 index 0331c0b05..000000000 --- a/toci-quickstart/config/testenv/standalone-ibm.yml +++ /dev/null @@ -1 +0,0 @@ -multinode-ibm.yml \ No newline at end of file diff --git a/toci-quickstart/config/testenv/standalone-psi.yml b/toci-quickstart/config/testenv/standalone-psi.yml deleted file mode 120000 index 1c9750508..000000000 --- a/toci-quickstart/config/testenv/standalone-psi.yml +++ /dev/null @@ -1 +0,0 @@ -multinode-psi.yml \ No newline at end of file diff --git a/toci-quickstart/config/testenv/standalone-rdocloud.yml b/toci-quickstart/config/testenv/standalone-rdocloud.yml deleted file mode 120000 index 634bbfbae..000000000 --- a/toci-quickstart/config/testenv/standalone-rdocloud.yml +++ /dev/null @@ -1 +0,0 @@ -multinode-rdocloud.yml \ No newline at end of file diff --git a/toci-quickstart/config/testenv/standalone-vexxhost.yml b/toci-quickstart/config/testenv/standalone-vexxhost.yml deleted file mode 120000 index 4981bb8b7..000000000 --- a/toci-quickstart/config/testenv/standalone-vexxhost.yml +++ /dev/null @@ -1 +0,0 @@ -multinode-vexxhost.yml \ No newline at end of file diff --git a/toci-quickstart/config/testenv/standalone.yml b/toci-quickstart/config/testenv/standalone.yml deleted file mode 120000 index bf08a640a..000000000 --- a/toci-quickstart/config/testenv/standalone.yml +++ /dev/null @@ -1 +0,0 @@ -multinode.yml \ No newline at end of file diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 3cb2b79eb..000000000 --- a/tox.ini +++ /dev/null @@ -1,63 +0,0 @@ -[tox] -# keep py3 before py2 to assure they are preffered for envs like linters: -envlist = linters,py,molecule -minversion = 3.18.0 -ignore_basepython_conflict = True -skip_missing_interpreters = True - -[testenv] -usedevelop = True -setenv = - ANSIBLE_FORCE_COLOR=1 - ANSIBLE_INVENTORY={toxinidir}/test/hosts.ini - ANSIBLE_NOCOWS=1 - ANSIBLE_RETRY_FILES_ENABLED=0 - ANSIBLE_STDOUT_CALLBACK=debug - PY_COLORS=1 - VIRTUAL_ENV={envdir} - # Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207 - PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command - PIP_DISABLE_PIP_VERSION_CHECK=1 - TEST_PARAMS=--cov=emit_releases_file -k "not molecule" - molecule: TEST_PARAMS=-ra -k molecule --ignore=roles/build-containers/files -passenv = - ANSIBLE_* - CURL_CA_BUNDLE - DOCKER_* - MOLECULE_* - PIP_CONSTRAINT={env:PIP_CONSTRAINT:constraints.txt} - REQUESTS_CA_BUNDLE - SSH_AUTH_SOCK - SSL_CERT_FILE - TERM -deps = -r{toxinidir}/test-requirements.txt - -r{toxinidir}/requirements.txt -allowlist_externals = - bash -commands_pre = - pip install -q bindep - bindep test -commands = - python -m pytest --html={envlogdir}/reports.html --self-contained-html {tty:-s} {env:TEST_PARAMS} {posargs} - -[testenv:deps] -description = Bump all test dependencies -basepython = python3 -deps = - pre-commit>=2.6.0 - pip-tools>=5.4.0 - setuptools>=51.1.1 -skip_install = true -commands = - pip-compile --upgrade --output-file=constraints.txt --pip-args "-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}" setup.py test-requirements.txt requirements.txt - -[testenv:venv] -commands = {posargs} - -[testenv:linters] -deps = - pre-commit>=1.20.0 - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/requirements.txt -commands = - python -m pre_commit run -a diff --git a/zuul.d/README.rst b/zuul.d/README.rst deleted file mode 100644 index 060911e94..000000000 --- a/zuul.d/README.rst +++ /dev/null @@ -1,43 +0,0 @@ -Override config -=============== - -featureset override -------------------- - -Take advantage of zuul job config to override featureset settings like -tempest tests that should run. The following settings from the featureset -config can be overriden: - - - `run_tempest`: To run tempest or not (true|false). - - `tempest_whitelist`: List of tests you want to be executed. - - `test_exclude_regex`: Set of tempest tests to skip. - - `tempest_format`: Installing tempest from venv, packages or containers - - `tempest_extra_config`: A dict values in order to override the tempest.conf - - `tempest_plugins`: List of tempest plugins needs to be installed - - `standalone_environment_files`: List of environment files to be overriden - by the featureset configuration on standalone deployment. The environment - file should exist in tripleo-heat-templates repo. - - `test_white_regex`: Regex to be used by tempest - - `tempest_workers`: Numbers of parallel workers to run - -Example:: - - - job: - name: tripleo-ci-centos-7-scenario001-multinode-oooq-container - parent: tripleo-ci-multinode - ... - vars: - featureset_override: - run_tempest: true - tempest_whitelist: - - 'tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern' - tempest_exclude_regex: 'tempest.api.network|tempest.api.compute' - tempest_format: 'containers' - tempest_extra_config: {'telemetry.alarm_granularity': '60'} - tempest_workers: 1 - tempest_plugins: - - 'python-keystone-tests-tempest' - - 'python-cinder-tests-tempest' - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario003-standalone.yaml' diff --git a/zuul.d/ansible.yaml b/zuul.d/ansible.yaml deleted file mode 100644 index e26b0e582..000000000 --- a/zuul.d/ansible.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# zuul.d/ansible.yaml -# Zuul layout for TripleO Ansible jobs. - -- project-template: - name: tripleo-ansible-role-jobs - description: | - Run default tests for ansible-role repositories: Run - tox based linters. - check: - jobs: - - openstack-tox-linters - gate: - jobs: - - openstack-tox-linters diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml deleted file mode 100644 index e002f0982..000000000 --- a/zuul.d/base.yaml +++ /dev/null @@ -1,360 +0,0 @@ ---- -# zuul.d/base.yaml -# This file contains parent layouts for all TripleO jobs. -# Do not add children specific layout here. - -# tripleo-ci base common required projects -# It contains a minimum set of common projects which needs to be -# clonned in upstream, rdo and downstream to perform the deployment -- job: - name: tripleo-ci-base-common-required-projects - description: | - Base abstract job to add common required-projects for tripleo-ci-base - abstract: true - parent: multinode-fips - required-projects: - - opendev.org/openstack/tripleo-ci - - opendev.org/openstack/tripleo-quickstart - - opendev.org/openstack/tripleo-quickstart-extras - - opendev.org/openstack/tripleo-upgrade - - opendev.org/x/browbeat - - opendev.org/openstack/tripleo-ha-utils - - opendev.org/openstack/openstack-tempest-skiplist - - name: opendev.org/openstack/openstack-virtual-baremetal - override-checkout: stable/2.0 - - name: opendev.org/openstack/openstack-ansible-os_tempest - override-checkout: master - - name: opendev.org/openstack/ansible-role-python_venv_build - override-checkout: master - - opendev.org/openstack/ansible-role-collect-logs - - opendev.org/openstack/tripleo-repos - # Ansible collections for quickstart - - name: github.com/ansible-collections/ansible.utils - override-checkout: 2.4.2 - - name: github.com/ansible-collections/ansible.posix - override-checkout: 1.3.0 - - name: github.com/ansible-collections/ansible.netcommon - override-checkout: 2.4.0 - - name: github.com/ansible-collections/community.general - override-checkout: 4.0.2 - - name: github.com/ansible-collections/community.libvirt - override-checkout: 1.0.2 - - name: github.com/ansible-collections/openvswitch.openvswitch - override-checkout: 2.0.2 - roles: - - zuul: opendev.org/openstack/tripleo-quickstart - - zuul: opendev.org/openstack/tripleo-quickstart-extras - -# This Job holds the base vars and playbook needed in all -# jobs. - -- job: - name: tripleo-ci-base-standard - abstract: true - parent: tripleo-ci-base-common-required-projects - description: | - Base abstract job for all TripleO CI zuulv3 jobs - timeout: 10800 - post-timeout: 3600 - vars: - unbound_cache_min_ttl: 900 - ara_generate_html: true - bridge_name: br-ex - bridge_address_prefix: 192.168.24 - bridge_address_subnet: 24 - bridge_address_offset: 2 - bridge_mtu: 1350 - # Disable fips role for all jobs, and select the ones that we want to enable - enable_fips: false - roles: - - zuul: opendev.org/zuul/zuul-jobs - - zuul: opendev.org/openstack/openstack-zuul-jobs - pre-run: - - playbooks/nodepool-provider/pre.yaml - - playbooks/openstack-zuul-jobs/legacy/pre.yaml - - playbooks/tripleo-ci/centos-compose-repos.yml - - playbooks/tripleo-ci/ceph.yaml - - playbooks/tripleo-ci/pre.yaml - run: playbooks/tripleo-ci/run-v3.yaml - post-run: playbooks/tripleo-ci/post.yaml - irrelevant-files: &irrelevant_files - - .*molecule.* - - ^.*\.md$ - - ^.*\.rst$ - - ^doc/.*$ - - ^etc/.*$ - - ^metadata.json$ - - ^releasenotes/.*$ - # do not put requirements.txt here, as it can have a huge impact - - ^test-requirements.txt$ - - ^spec/.*$ - - ^Puppetfile.*$ - - tox.ini - - ^setup.*$ - - ^vars/sova-patterns.yml$ - - ^.ansible-lint$ - - ^.pre-commit-config.yaml$ - - ^.yamllint$ - - ^tripleoclient/tests/.*$ - - ^tripleo_common/tests/.*$ - -# The base standard job for Multinode jobs -- job: - name: tripleo-ci-base-multinode-standard - abstract: true - description: | - Base abstract job for multinode TripleO CI zuulv3 jobs - parent: tripleo-ci-base-standard - pre-run: playbooks/tripleo-ci/install-built-repo.yml - vars: - undercloud: 127.0.0.2 - environment_infra: osinfra - environment_type: multinode - common_featureset: featureset-multinode-common.yml - playbooks: - - quickstart.yml - - multinode-undercloud.yml - - multinode-overcloud-prep.yml - - multinode-overcloud.yml - - multinode-overcloud-update.yml - - multinode-overcloud-upgrade.yml - - multinode-validate.yml - tags: &multinode_tags - - build - - undercloud-setup - - undercloud-scripts - - undercloud-install - - undercloud-post-install - - tripleo-validations - - overcloud-scripts - - overcloud-prep-config - - overcloud-prep-containers - - overcloud-deploy - - overcloud-post-deploy - - overcloud-validate - -# The base standard job for Multinode Mixed OS jobs -- job: - name: tripleo-ci-base-multinode-mixed-os-standard - abstract: true - description: | - Base abstract job for multinode TripleO CI zuulv3 jobs - parent: tripleo-ci-base-standard - pre-run: playbooks/tripleo-ci/install-built-repo.yml - vars: - undercloud: 127.0.0.2 - environment_infra: osinfra - environment_type: multinode - common_featureset: featureset-multinode-common.yml - playbooks: - - quickstart.yml - - multinode-overcloud-mixed-os-repos-compute.yml - - multinode-undercloud-mixed-os.yml - - multinode-overcloud-prep.yml - - multinode-overcloud-mixed-os-deploy.yml - - multinode-overcloud-update.yml - - multinode-validate.yml - tags: *multinode_tags - -# EDPM base job -- job: - name: tripleo-ci-base-multinode-edpm-standard - abstract: true - description: | - Base abstract job for multinode TripleO CI zuulv3 jobs - parent: tripleo-ci-base-multinode-standard - vars: - featureset: '053' - bridge_address_offset: 4 - playbooks: - - quickstart.yml - - deploy-standalone-compute.yml - tags: - - build - - standalone - -# Singlenode Standard Job -- job: - name: tripleo-ci-base-singlenode-standard - abstract: true - description: | - Base abstract job for singlenode TripleO CI zuulv3 jobs - parent: tripleo-ci-base-standard - pre-run: playbooks/tripleo-ci/install-built-repo.yml - vars: - undercloud: 127.0.0.2 - environment_infra: osinfra - environment_type: singlenode - common_featureset: featureset-multinode-common.yml - playbooks: - - quickstart.yml - - multinode-undercloud.yml - - multinode-undercloud-upgrade.yml - - multinode-overcloud-prep.yml - - multinode-overcloud.yml - - multinode-overcloud-upgrade.yml - - multinode-validate.yml - tags: - - build - - undercloud-setup - - undercloud-scripts - - undercloud-install - - undercloud-validate - - images - -- job: - name: tripleo-ci-base-standalone-standard - abstract: true - description: | - Base abstract job for standalone TripleO CI zuulv3 jobs - parent: tripleo-ci-base-standard - pre-run: playbooks/tripleo-ci/install-built-repo.yml - vars: - # for standalone we don't need the multinode network configuration but - # we do want the interface to be created. So let's create br-ex but - # configure it with a different network than what we use for standalone. - # any jobs that need this network configuration for multinode need to - # adjust their configuration to us 172.16.1.0/24 - bridge_name: br-ex - bridge_address_prefix: 172.16.1 - bridge_address_subnet: 24 - bridge_address_offset: 2 - bridge_mtu: 1350 - undercloud: 127.0.0.2 - environment_infra: osinfra - environment_type: standalone - common_featureset: featureset-multinode-common.yml - playbooks: - - quickstart.yml - - multinode-standalone.yml - tags: - - build - - standalone - irrelevant-files: *irrelevant_files - -- job: - name: tripleo-ci-base-standalone-upgrade-standard - abstract: true - description: | - Base abstract job for standalone upgrade TripleO CI zuulv3 jobs - parent: tripleo-ci-base-standard - pre-run: playbooks/tripleo-ci/install-built-repo.yml - vars: - undercloud: 127.0.0.2 - # for standalone we don't need the multinode network configuration but - # we do want the interface to be created. So let's create br-ex but - # configure it with a different network than what we use for standalone. - # any jobs that need this network configuration for multinode need to - # adjust their configuration to us 172.16.1.0/24 - bridge_name: br-ex - bridge_address_prefix: 172.16.1 - bridge_address_subnet: 24 - bridge_address_offset: 2 - bridge_mtu: 1350 - environment_infra: osinfra - environment_type: standalone - common_featureset: featureset-multinode-common.yml - playbooks: - - quickstart.yml - - multinode-standalone.yml - - multinode-standalone-upgrade.yml - tags: - - build - - standalone - extra_tags: - - standalone-upgrade - irrelevant-files: *irrelevant_files - -# OVB -- job: - name: tripleo-ci-base-ovb-standard - abstract: true - description: | - Base abstract job for OVB TripleO CI zuulv3 jobs - parent: tripleo-ci-base-standard - vars: - undercloud: undercloud - environment_infra: ovb - environment_type: ovb - playbooks: - - ovb.yml - tags: - - all - -- job: - name: tripleo-ci-base-containers-standard - abstract: true - description: | - Base abstract job for container build TripleO CI zuulv3 jobs - parent: tripleo-ci-base-singlenode-standard - run: playbooks/tripleo-buildcontainers/run.yaml - post-run: playbooks/tripleo-buildcontainers/post.yaml - timeout: 7200 - -- job: - name: tripleo-ci-containers-rdo-upstream-pre - abstract: true - description: | - Base abstract job for container build TripleO CI zuulv3 jobs - to run pre playbook in RDO and Upstream - required-projects: - - opendev.org/openstack/tripleo-ansible - # Note: Remove ansible-role-container-registry reference - # on removal of CentOS 7 jobs - - opendev.org/openstack/ansible-role-container-registry - roles: - - zuul: opendev.org/openstack/tripleo-ansible - - zuul: opendev.org/openstack/ansible-role-container-registry - parent: tripleo-ci-base-containers-standard - pre-run: playbooks/tripleo-buildcontainers/pre.yaml - -- job: - name: tripleo-ci-base-images-standard - abstract: true - description: | - Base abstract job for Image build TripleO CI zuulv3 jobs - parent: tripleo-ci-base-singlenode-standard - pre-run: playbooks/tripleo-buildimages/pre.yaml - run: playbooks/tripleo-buildimages/run-v3.yaml - post-run: playbooks/tripleo-buildimages/post.yaml - timeout: 5400 - -# Content provider -- job: - name: tripleo-ci-content-provider-standard - parent: tripleo-ci-base-standalone-standard - abstract: true - run: - - playbooks/tripleo-ci/run-v3.yaml - - playbooks/tripleo-ci/run-provider.yml - description: | - Base abstract conent provider job - vars: - featureset: '052' - provider_job: true - build_container_images: true - ib_create_web_repo: true - playbooks: - - quickstart.yml - - multinode-standalone-pre.yml - -# Molecule jobs base -- job: - name: tripleo-tox-molecule - # should `parent: openstack-tox-molecule` but we cannot because - # rdo zuul cannot load jobs from openstack-zuul-jobs. - # https://opendev.org/openstack/openstack-zuul-jobs/src/branch/master/zuul.d/jobs.yaml#L206 - # https://github.com/rdo-infra/review.rdoproject.org-config/blob/master/zuul/rdo.yaml#L942-L943 - description: | - TripleO own version of openstack-tox-molecule which adds - required-projects. These are used in order to allow testing change - requests with Depends-On, like below - openstack/tripleo-ci/roles/tripleo-repos -> openstack/tripleo-repos - parent: tox-molecule - success-url: "tox/reports.html" - failure-url: "tox/reports.html" - vars: - bindep_profile: test molecule - nodeset: single-centos-8-node - required-projects: - - opendev.org/openstack/tripleo-repos diff --git a/zuul.d/build-containers.yaml b/zuul.d/build-containers.yaml deleted file mode 100644 index 781cd41e7..000000000 --- a/zuul.d/build-containers.yaml +++ /dev/null @@ -1,140 +0,0 @@ ---- -# zuul.d/build-containers.yaml - -################################################################# -# # -# UPSTREAM BUILD CONTAINER PARENTING # -# # -################################################################# - -- job: - name: tripleo-ci-build-containers-required-projects-upstream - abstract: true - description: | - Base job to provide required-projects for standalone TripleO CI build-containers jobs - parent: tripleo-ci-base-containers-standard - roles: - - zuul: opendev.org/openstack/ansible-role-container-registry - - zuul: opendev.org/openstack/tripleo-ansible - required-projects: - - opendev.org/openstack/ansible-role-container-registry - - opendev.org/openstack/kolla - - opendev.org/openstack/python-tripleoclient - - opendev.org/openstack/requirements - - opendev.org/openstack/tripleo-ansible - - opendev.org/openstack/tripleo-common - pre-run: playbooks/tripleo-buildcontainers/pre.yaml - irrelevant-files: - - ^.*\.rst$ - - ^releasenotes/.*$ - files: - # generic: - - ^bindep.txt$ - - ^requirements.txt$ - - ^setup.cfg$ - - ^setup.py$ - # kolla - - ^docker/.*$ - - kolla.*$ - # tripleo-ci - - ^playbooks/.*$ - - ^(playbooks|roles)/tripleo-buildcontainers/.*$ - - ^roles/build-containers/.*$ - - ^roles/prepare-node/.*$ - - ^roles/ci-common-vars/.*$ - - ^(playbooks|roles)/tripleo-repos/.*$ - - ^zuul.d/build-containers.yaml$ - - ^zuul.d/base.yaml$ - # tripleo-common - - ^container-images/.*$ - - ^healthcheck/.*$ - - ^tripleo_common/image/.*$ - # tripleo-repos - - ^tripleo_repos/.*$ - # python-tripleoclient - - ^tripleoclient/v1/container.*$ - -# Note: It merges tripleo-build-containers-base-with-files and -# tripleo-build-containers-base. - -# CentOS 8 Distro based Job -- job: - name: tripleo-build-containers-base-centos-8 - parent: tripleo-ci-build-containers-required-projects-upstream - nodeset: single-centos-8-node - vars: - use_buildah: true - kolla_base: centos - kolla_base_pull: true - buildcontainers_override_repos: current-tripleo - kolla_base_image: centos - kolla_base_tag: 8 - push_containers: false - push_containers_podman: false - -# CentOS 9 Distro based Job -- job: - name: tripleo-build-containers-base-centos-9 - parent: tripleo-ci-build-containers-required-projects-upstream - nodeset: single-centos-9-node - vars: - registry_namespace: tripleomastercentos9 - push_containers: false - push_containers_podman: false - use_kolla: false - use_buildah: true - -# Zuul layout for TripleO Build Containers jobs. - -- project-template: - name: tripleo-ci-build-containers-jobs - check: - jobs: - - tripleo-build-containers-centos-9: - files: - - ^playbooks/tripleo-buildcontainers/.*$ - - ^roles/build-containers/.*$ - - zuul.d/layout.yaml - - zuul.d/build-containers.yaml - - ^roles/tripleo-build-jobs-repos/.*$ - -# CentOS 8 -- job: - name: tripleo-build-containers-centos-8 - parent: tripleo-build-containers-base-centos-8 - branches: ^(?!stable/(pike|queens|stein)).*$ - voting: true -# Branchful job to run on CI branchless repos which have master only -- job: - name: tripleo-build-containers-centos-8-train - parent: tripleo-build-containers-centos-8 - branches: master - override-checkout: stable/train - vars: - branch_override: stable/train - -# CentOS 8 UBI jobs - -- job: - name: tripleo-build-containers-base-ubi-8 - parent: tripleo-build-containers-base-centos-8 - vars: - use_kolla: false - -# containers-ubi-8 is exercised via the content-provider jobs -# excluding train as tripleo-repos + train + current is blocked -- job: - name: tripleo-build-containers-ubi-8 - parent: tripleo-build-containers-base-ubi-8 - branches: master # only wired up for tripleo-repos - voting: true - - -# CentOS 9 jobs - -- job: - # TODO update branch after branching - name: tripleo-build-containers-centos-9 - parent: tripleo-build-containers-base-centos-9 - branches: master - voting: false diff --git a/zuul.d/build-image.yaml b/zuul.d/build-image.yaml deleted file mode 100644 index 010a2963b..000000000 --- a/zuul.d/build-image.yaml +++ /dev/null @@ -1,273 +0,0 @@ ---- -# zuul.d/build-image.yaml - -############################################################### -# # -# UPSTREAM BUILD IMAGES PARENTING # -# # -############################################################### - -# This job definition holds the required projects -# for upstream CI. The required projects are separated -# out to allow for this job to be shadowed in another repo -# and the required projects overwritten for other environments -- job: - name: tripleo-ci-build-images-required-projects-upstream - description: | - Base abstract job to add required-projects for Upstream - Build Images Jobs - abstract: true - parent: tripleo-ci-base-images-standard - required-projects: - - opendev.org/openstack/diskimage-builder - - opendev.org/openstack/heat-agents - - opendev.org/openstack/instack-undercloud - - opendev.org/openstack/ironic - - opendev.org/openstack/ironic-python-agent - - opendev.org/openstack/ironic-python-agent-builder - - opendev.org/openstack/python-tripleoclient - - opendev.org/openstack/tripleo-ansible - - opendev.org/openstack/tripleo-common - - opendev.org/openstack/tripleo-image-elements - - opendev.org/openstack/tripleo-puppet-elements - - opendev.org/openstack/requirements - irrelevant-files: &irrelevant_build_img - - ^zuul.d/build-containers.yaml - - ^zuul.d/deprecated-jobs.yaml - - ^zuul.d/multinode-jobs.yaml - - ^zuul.d/periodic.yaml - - ^zuul.d/standalone-jobs.yaml - - ^zuul.d/undercloud-jobs.yaml - -# CentOS 8 -- job: - name: tripleo-build-images-base-centos-8 - abstract: true - description: | - Base abstract job for tripleo-buildimage-* centos-8 jobs - parent: tripleo-ci-build-images-required-projects-upstream - nodeset: single-centos-8-node - pre-run: playbooks/tripleo-buildimages/tmpfiles.yaml - vars: - tripleo_image_os: centos8 - -# CentOS 9 -- job: - name: tripleo-build-images-base-centos-9 - abstract: true - description: | - Base abstract job for tripleo-buildimage-* centos-9 jobs - parent: tripleo-ci-build-images-required-projects-upstream - nodeset: single-centos-9-node - pre-run: playbooks/tripleo-buildimages/tmpfiles.yaml - vars: - tripleo_image_os: centos9 - -# Zuul layout for TripleO Build Image jobs. - -- project-template: - name: tripleo-ci-buildimage-jobs - check: - jobs: - - tripleo-buildimage-overcloud-full-centos-9: - files: &build_images_files - - ^playbooks/tripleo-buildimages/.*$ - - ^roles/oooci-build-images/.*$ - - zuul.d/build-image.yaml - - tripleoclient/v1/overcloud_image.py - - elements/.* - - ^image-yaml/.* - - tripleo-buildimage-overcloud-full-centos-9: - files: *build_images_files - - tripleo-buildimage-ironic-python-agent-centos-9: - files: *build_images_files - - tripleo-buildimage-overcloud-hardened-uefi-full-centos-9: - files: &build_images_hardened_uefi_files - - ^image-yaml/.*hardened-images-uefi.* - - ^elements/overcloud-secure - - ^elements/overcloud-partition-uefi - - ^diskimage_builder/elements/modprobe - - ^diskimage_builder/elements/bootloader - - ^diskimage_builder/elements/growvols - - ^roles/oooci-build-images/.*$ - gate: - jobs: - - tripleo-buildimage-overcloud-full-centos-9: - files: *build_images_files - - tripleo-buildimage-ironic-python-agent-centos-9: - files: *build_images_files - - tripleo-buildimage-overcloud-hardened-uefi-full-centos-9: - files: *build_images_hardened_uefi_files - -- project-template: - name: tripleo-buildimage-jobs - check: - jobs: - - tripleo-buildimage-overcloud-full-centos-9: - files: *build_images_files - - tripleo-buildimage-ironic-python-agent-centos-9: - files: *build_images_files - - tripleo-buildimage-overcloud-hardened-uefi-full-centos-9: - files: *build_images_hardened_uefi_files - gate: - jobs: - - tripleo-buildimage-overcloud-full-centos-9: - files: *build_images_files - - tripleo-buildimage-ironic-python-agent-centos-9: - files: *build_images_files - - tripleo-buildimage-overcloud-hardened-uefi-full-centos-9: - files: *build_images_hardened_uefi_files - -- project-template: - name: tripleo-buildimage-jobs-centos-8 - check: - jobs: - - tripleo-buildimage-overcloud-full-centos-8 - - tripleo-buildimage-ironic-python-agent-centos-8 - - tripleo-buildimage-overcloud-hardened-uefi-full-centos-8: - files: *build_images_hardened_uefi_files - gate: - jobs: - - tripleo-buildimage-overcloud-full-centos-8 - - tripleo-buildimage-ironic-python-agent-centos-8 - - tripleo-buildimage-overcloud-hardened-uefi-full-centos-8: - files: *build_images_hardened_uefi_files - experimental: - jobs: - - tripleo-buildimage-ironic-python-agent-centos-8 - -# CentOS 9 Image Build Jobs - -- job: - name: tripleo-buildimage-ironic-python-agent-centos-9 - parent: tripleo-build-images-base-centos-9 - branches: &c9_branches ^(stable/wallaby).*$ - vars: - tripleo_image_type: ironic-python-agent - irrelevant-files: &build_image_irrelevant - - ^.*\.rst$ - - ^releasenotes/.*$ - -- job: - name: tripleo-buildimage-overcloud-full-centos-9 - parent: tripleo-build-images-base-centos-9 - branches: *c9_branches - vars: - tripleo_image_type: overcloud-full - image_sanity: false # https://bugs.launchpad.net/tripleo/+bug/1950453 - irrelevant-files: *build_image_irrelevant - -- job: - name: tripleo-buildimage-overcloud-hardened-uefi-full-centos-9 - parent: tripleo-build-images-base-centos-9 - branches: *c9_branches - vars: - tripleo_image_type: overcloud-hardened-uefi-full - irrelevant-files: *build_image_irrelevant - -# Centos9 Branchful jobs for the CIP repos (branch always master) - -- job: - name: tripleo-buildimage-ironic-python-agent-centos-9-zed - parent: tripleo-buildimage-ironic-python-agent-centos-9 - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-buildimage-overcloud-full-centos-9-zed - parent: tripleo-buildimage-overcloud-full-centos-9 - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-buildimage-overcloud-hardened-uefi-full-centos-9-zed - parent: tripleo-buildimage-overcloud-hardened-uefi-full-centos-9 - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-buildimage-ironic-python-agent-centos-9-wallaby - parent: tripleo-buildimage-ironic-python-agent-centos-9 - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-buildimage-overcloud-full-centos-9-wallaby - parent: tripleo-buildimage-overcloud-full-centos-9 - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-buildimage-overcloud-hardened-uefi-full-centos-9-wallaby - parent: tripleo-buildimage-overcloud-hardened-uefi-full-centos-9 - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -# CentOS 8 Image Build Jobs -# Keep C8 ipa & overcloud-full on wallaby for now -- job: - name: tripleo-buildimage-ironic-python-agent-centos-8 - parent: tripleo-build-images-base-centos-8 - branches: stable/train - vars: - tripleo_image_type: ironic-python-agent - irrelevant-files: - - ^.*\.rst$ - - ^releasenotes/.*$ - -- job: - name: tripleo-buildimage-overcloud-full-centos-8 - parent: tripleo-build-images-base-centos-8 - branches: stable/train - vars: - tripleo_image_type: overcloud-full - irrelevant-files: - - ^.*\.rst$ - - ^releasenotes/.*$ - -- job: - name: tripleo-buildimage-overcloud-hardened-full-centos-8 - parent: tripleo-build-images-base-centos-8 - branches: ^(stable/train).*$ - vars: - tripleo_image_type: overcloud-hardened-full - irrelevant-files: - - ^.*\.rst$ - - ^releasenotes/.*$ - -# Branchful job to run on CI branchless repos which have master only -- job: - name: tripleo-buildimage-ironic-python-agent-centos-8-train - parent: tripleo-buildimage-ironic-python-agent-centos-8 - branches: master - override-checkout: stable/train - vars: - branch_override: stable/train - -# Branchful job to run on CI branchless repos which have master only -- job: - name: tripleo-buildimage-overcloud-full-centos-8-train - parent: tripleo-buildimage-overcloud-full-centos-8 - branches: master - override-checkout: stable/train - vars: - branch_override: stable/train - -# Branchful job to run on CI branchless repos which have master only -- job: - name: tripleo-buildimage-overcloud-hardened-full-centos-8-train - parent: tripleo-buildimage-overcloud-hardened-full-centos-8 - branches: master - override-checkout: stable/train - vars: - branch_override: stable/train diff --git a/zuul.d/content-provider.yaml b/zuul.d/content-provider.yaml deleted file mode 100644 index 652d2f661..000000000 --- a/zuul.d/content-provider.yaml +++ /dev/null @@ -1,81 +0,0 @@ ---- -# zuul.d/content-provider.yaml -# Zuul layout for TripleO content-provider jobs. - -# ATTENTION: Try to avoid adding irrelevant-files inside templates -# or project because it does override values defined at job level. -# An attempt to optimize at this level can have the exactly opposite effect, -# triggering the affected jobs on far more changes than needed. - -- job: - name: tripleo-ci-content-provider-required-projects-upstream - parent: tripleo-ci-content-provider-standard - abstract: true - required-projects: - - opendev.org/openstack/tripleo-ansible - - opendev.org/openstack/tripleo-operator-ansible - - name: opendev.org/openstack/ansible-config_template - override-checkout: master - -- job: - name: tripleo-ci-centos-8-content-provider - parent: tripleo-ci-content-provider-required-projects-upstream - branches: ^(stable/(train|wallaby)).*$ - nodeset: single-centos-8-node - - -- job: - name: tripleo-ci-centos-9-content-provider - parent: tripleo-ci-content-provider-required-projects-upstream - branches: ^(?!stable/train).*$ - nodeset: single-centos-9-node - vars: - containers_base_image: registry.access.redhat.com/ubi9:latest - -- job: - name: tripleo-ci-centos-9-content-provider-current - parent: tripleo-ci-centos-9-content-provider - vars: - buildcontainers_override_repos: current - featureset_override: - dlrn_hash_tag: current - promote_source: current - -- job: - name: tripleo-ci-centos-9-content-provider-wallaby - parent: tripleo-ci-centos-9-content-provider - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-9-content-provider-current-wallaby - parent: tripleo-ci-centos-9-content-provider-current - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - buildcontainers_override_repos: current - featureset_override: - dlrn_hash_tag: current - promote_source: current - -- job: - name: tripleo-ci-centos-9-content-provider-zed - parent: tripleo-ci-centos-9-content-provider - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-ci-centos-8-content-provider-wallaby - parent: tripleo-ci-centos-8-content-provider - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-8-content-provider-train - parent: tripleo-ci-centos-8-content-provider - override-checkout: stable/train - vars: - branch_override: stable/train diff --git a/zuul.d/deprecated-jobs.yaml b/zuul.d/deprecated-jobs.yaml deleted file mode 100644 index 3cb86e0c4..000000000 --- a/zuul.d/deprecated-jobs.yaml +++ /dev/null @@ -1,946 +0,0 @@ ---- -# zuul.d/deprecated-jobs.yaml -# Zuul layout for TripleO deprecated jobs. -# It contains all the deprecated jobs that should be removed from Zuul. - -- job: - name: tripleo-ci-deprecated-standalone - description: | - Deprecated TripleO Job - Job no longer supported that should be removed from Zuul config. - parent: tripleo-ci-base-standalone-standard - pre-run: playbooks/deprecated/pre.yaml - -- job: - name: tripleo-ci-deprecated - description: | - Deprecated TripleO Job - Job no longer supported that should be removed from Zuul config. - parent: tripleo-ci-base-multinode-standard - pre-run: playbooks/deprecated/pre.yaml - -# TODO(rfolco): non-containeirized (nc) scenarios are no longer supported. -# These (nc) scenario jobs ran until ocata release and should be removed -# or replaced by containerized scenario jobs *-container. -- job: - name: tripleo-ci-centos-7-scenario001-multinode-oooq - parent: tripleo-ci-deprecated - branches: none/deprecated - vars: - nodes: 1ctlr - featureset: '005' - -- job: - name: tripleo-ci-centos-7-scenario002-multinode-oooq - parent: tripleo-ci-deprecated - branches: none/deprecated - vars: - nodes: 1ctlr - featureset: '006' - -- job: - name: tripleo-ci-centos-7-scenario003-multinode-oooq - parent: tripleo-ci-deprecated - branches: none/deprecated - vars: - nodes: 1ctlr - featureset: '007' - -- job: - name: tripleo-ci-centos-7-scenario004-multinode-oooq - parent: tripleo-ci-deprecated - branches: none/deprecated - vars: - nodes: 1ctlr - featureset: '008' - -- job: - name: tripleo-ci-centos-7-scenario007-multinode-oooq - parent: tripleo-ci-deprecated - branches: none/deprecated - vars: - nodes: 1ctlr - featureset: '028' - -- job: - name: tripleo-ci-centos-7-containers-multinode-queens - parent: tripleo-ci-base-multinode - voting: false - branches: master - override-checkout: 'stable/queens' - vars: - branch_override: 'stable/queens' - nodes: 1ctlr - featureset: '010' - playbooks: - - multinode.yml - -- job: - name: tripleo-ci-centos-7-containers-multinode-train - parent: tripleo-ci-base-multinode - timeout: 10800 - voting: false - branches: master - override-checkout: 'stable/train' - vars: - branch_override: 'stable/train' - nodes: 1ctlr - featureset: '010' - playbooks: - - multinode.yml - -- job: - name: tripleo-ci-centos-7-nonha-multinode-oooq - parent: tripleo-ci-deprecated - branches: none/deprecated - vars: - nodes: 1ctlr - featureset: '004' - -# TODO(rfolco): scen00{6,9} are containeirized, remove this when -# all projects using them rename to the *-container (dup) jobs -- job: - name: tripleo-ci-centos-7-scenario006-multinode-oooq - parent: tripleo-ci-deprecated - voting: false - branches: ^(?!stable/(newton|ocata)).*$ - vars: - nodes: 1ctlr - featureset: '026' - -- job: - name: tripleo-ci-centos-7-containers-multinode-pike - parent: tripleo-ci-deprecated - branches: master - override-checkout: 'stable/pike' - vars: - branch_override: 'stable/pike' - nodes: 1ctlr - featureset: '010' - playbooks: - - multinode.yml - -- job: - name: tripleo-ci-centos-8-standalone-upgrade - parent: tripleo-ci-base-standalone-upgrade-standard - voting: false - branches: ^master$ - vars: - featureset: '056' - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'environments/docker-ha.yaml' - - 'environments/podman.yaml' - irrelevant-files: - - .*molecule.* - - ^.*\.md$ - - ^.*\.rst$ - - ^Puppetfile.*$ - - ^doc/.*$ - - ^etc/.*$ - - ^lower-constraints.txt$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^spec/.*$ - - ^test-requirements.txt$ - - ^vars/sova-patterns.yml$ - - tox.ini - - zuul.d/ansible.yaml - - zuul.d/build-containers.yaml - - zuul.d/build-image.yaml - - zuul.d/multinode-jobs.yaml - - zuul.d/undercloud-jobs.yaml - # like parent but with requirements.txt and setup.py removed - -- job: - name: tripleo-ci-centos-8-scenario000-multinode-oooq-container-upgrades - parent: tripleo-ci-base-multinode-centos-8 - voting: false - branches: ^master$ - vars: - nodes: 1ctlr - featureset: '051' - extra_tags: - - overcloud-upgrade - -- job: - name: tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates - description: | - Basic tripleo update job for centos-8, this is not an upgrade job. - parent: tripleo-ci-base-multinode-centos-8 - voting: true - branches: ^master$ - vars: - nodes: 1ctlr - featureset: '037' - # Note (dmsimard): This enforces a minimum TTL for DNS records, see - # https://review.opendev.org/#/c/523178/ for context - unbound_cache_min_ttl: 900 - extra_tags: - - overcloud-update - -- job: - name: tripleo-ci-centos-7-scenario001-multinode-oooq-container - parent: tripleo-ci-base-multinode - branches: ^(stable/queens).*$ - voting: false - vars: - nodes: 1ctlr - featureset: '016' -- job: - name: tripleo-ci-centos-7-scenario002-multinode-oooq-container - parent: tripleo-ci-base-multinode - branches: ^(stable/queens).*$ - voting: false - vars: - nodes: 1ctlr - featureset: '017' -- job: - name: tripleo-ci-centos-7-scenario003-multinode-oooq-container - parent: tripleo-ci-base-multinode - branches: ^(stable/queens).*$ - voting: false - vars: - nodes: 1ctlr - featureset: '018' -- job: - name: tripleo-ci-centos-7-scenario004-multinode-oooq-container - parent: tripleo-ci-base-multinode - branches: ^(stable/queens).*$ - voting: false - vars: - nodes: 1ctlr - featureset: '019' -- job: - name: tripleo-ci-centos-7-scenario006-multinode-oooq-container - parent: tripleo-ci-base-multinode - voting: false - branches: ^(stable/(queens|train)).*$ - vars: - nodes: 1ctlr - featureset: '026' -- job: - name: tripleo-ci-centos-7-scenario007-multinode-oooq-container - parent: tripleo-ci-base-multinode - voting: false - branches: ^stable/(queens).*$ - vars: - nodes: 1ctlr - featureset: '030' - -# (TODO) marios Centos 7 standalone scenarios still used in some repos eg -# https://review.opendev.org/c/openstack/tripleo-ci/+/838110/8#message-13f71f4e7c9d9d983a2dea50efad4a99ec87b688 -# Centos 7 base job -- job: - name: tripleo-ci-base-standalone-centos-7 - abstract: true - description: | - Base abstract job for standalone Tripleo CI Centos-8 zuulv3 jobs. - parent: tripleo-ci-base-required-projects-standalone-upstream - nodeset: single-centos-7-node - -- job: - name: tripleo-ci-centos-7-standalone - parent: tripleo-ci-base-standalone-centos-7 - branches: ^(stable/(stein)).*$ - vars: - featureset: '052' - irrelevant-files: - - .*molecule.* - - ^.*\.md$ - - ^.*\.rst$ - - ^Puppetfile.*$ - - ^doc/.*$ - - ^etc/.*$ - - ^lower-constraints.txt$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^spec/.*$ - - ^test-requirements.txt$ - - ^vars/sova-patterns.yml$ - - tox.ini - - ^setup.*$ - -# TODO(marios): used by aodh stable/stein & train -# https://review.opendev.org/c/openstack/tripleo-ci/+/838110/8#message-ba07c5505dcadd7b0943b96c7db180e1f1579483 -- job: - name: tripleo-ci-centos-7-scenario001-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-7 - branches: ^(stable/(stein)).*$ - vars: - featureset: '052' - standalone_ceph: true - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario001-standalone.yaml' - tempest_services: - - aodh - tempest_run_concurrency: 1 - tempest_tempest_conf_overrides: - 'telemetry.alarm_granularity': '60' - tempest_test_whitelist: - - 'tempest.api.identity.v3' - - 'tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern' - - 'tempest.scenario.test_snapshot_pattern.TestSnapshotPattern.test_snapshot_pattern' - - 'telemetry_tempest_plugin.scenario.test_telemetry_integration.TestTelemetryIntegration' - -# TODO(marios): used by aodh stable/stein -# https://review.opendev.org/c/openstack/tripleo-ci/+/838110/9#message-0ba0f11e598b89ea088ff4014c68d9201ebcd5b4 -- job: - name: tripleo-ci-centos-7-scenario002-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-7 - branches: ^(stable/(stein)).*$ - vars: - featureset: '052' - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario002-standalone.yaml' - tempest_services: - - barbican - - ceilometer - - aodh - tempest_tempest_conf_overrides: - auth.tempest_roles: "'Member, creator'" - telemetry.alarm_granularity: '60' - tempest_extra_config: - auth.tempest_roles: "'Member, creator'" - telemetry.alarm_granularity: '60' - tempest_test_whitelist: - - 'tempest.api.object_storage.test_object_services.ObjectTest' - - 'barbican_tempest_plugin.tests.scenario.test_volume_encryption.VolumeEncryptionTest' - - 'barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningSnapshotTest' - - 'barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningTest.test_signed_image_upload_and_boot' - - 'telemetry_tempest_plugin.scenario.test_telemetry_integration.TestTelemetryIntegration' - -# TODO(marios): used by openstack/sahara stable/ussuri -# https://review.opendev.org/c/openstack/tripleo-ci/+/838110/8#message-c775ca4b4fbc2d1ced632f162e8e54879dfff735 -- job: - name: tripleo-ci-centos-7-scenario003-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-7 - branches: ^(stable/(stein)).*$ - vars: - featureset: '052' - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario003-standalone.yaml' - tempest_services: - - mistral - - sahara - tempest_test_whitelist: - - 'tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops' - - 'sahara_tempest_plugin.tests.api.test_data_sources.DataSourceTest' - - 'mistral_tempest_tests.tests.api.v2.test_actions.ActionTestsV2' - -# TODO(pojadhav) used by openstack/tripleo-upgrade on stable/victoria -# https://review.opendev.org/c/openstack/tripleo-upgrade/+/836802/2#message-34eefaa88d2296ff439bed130ea69cebd6979559 -- job: - name: tripleo-ci-centos-8-content-provider-ussuri - parent: tripleo-ci-centos-8-content-provider - override-checkout: stable/ussuri - vars: - branch_override: stable/ussuri - -# TODO(pojadhav) used by openstack/puppet-tripleo on stable/train -# https://review.opendev.org/c/openstack/tripleo-ci/+/853931/8#message-546978d64c7dad6cadca89ba5c5395629fddb392 -- job: - name: tripleo-ci-centos-8-scenario007-multinode-oooq-container - parent: tripleo-ci-base-multinode-centos-8 - branches: &c8_branches ^(stable/train).*$ - vars: - nodes: 1ctlr - featureset: '030' - playbooks: - - multinode.yml - -# TODO(marios) used by openstack/manila on stable/stein -# https://review.opendev.org/c/openstack/tripleo-ci/+/838110/10#message-68c2e8290269a5fdceb4c122e57a563a54d68839 -- job: - name: tripleo-ci-centos-7-scenario004-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-7 - branches: ^(stable/(stein)).*$ - vars: - featureset: '052' - standalone_ceph: true - featureset_override: - standalone_container_cli: docker - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario004-standalone.yaml' - tempest_services: - - manila - tempest_test_whitelist: - - 'tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops' - - 'manila_tempest_tests.tests.api.test_shares.SharesCephFSTest.test_create_get_delete_share' - -# TODO(marios): used by ansible-role-python_venv_build on branch stable/stein. -# https://review.opendev.org/c/openstack/tripleo-ci/+/838110/8#message-db697f5274005c959b6005ac0999cc2bc0b23d61 -- job: - name: tripleo-ci-centos-7-standalone-os-tempest - parent: tripleo-ci-base-standalone-centos-7 - branches: ^stable/stein$ - vars: - featureset: '052' - featureset_override: - use_os_tempest: true - tempest_tempest_conf_overrides: - auth.use_dynamic_credentials: true - tempest_test_whitelist: - - 'tempest.api.identity.v3' - - 'tempest.scenario.test_server_basic_ops' - - 'tempest.api.volume.admin.test_multi_backend' - - 'tempest.scenario.test_object_storage_basic_ops' - -# -# DEPRECATED MULTINODE TEMPLATES: -# - -- project-template: - name: tripleo-multinode-container-minimal - queue: tripleo - check: - jobs: - - tripleo-ci-centos-8-containers-multinode: - irrelevant-files: &multinode_ignored - - ^.*\.md$ - - ^.*\.rst$ - - ^Puppetfile.*$ - - ^doc/.*$ - - ^docs/.*$ - - ^etc/.*$ - - ^lower-constraints.txt$ - - ^metadata.json$ - - ^playbooks/deprecated/.*$ - - ^playbooks/tripleo-buildcontainers/.*$ - - ^playbooks/tripleo-buildimages/.*$ - - ^releasenotes/.*$ - - ^roles/build-containers/.*$ - - ^roles/oooci-build-images/.*$ - - ^roles/tripleo-repos/.*$ - - ^spec/.*$ - - ^test-requirements.txt$ - - ^vars/sova-patterns.yml$ - - playbooks/quickstart-extras-standalone.yml # tripleo-quickstart-extras - - roles/standalone-upgrade/.* - - roles/standalone/.* - - tox.ini - - zuul.d/build-containers.yaml - - zuul.d/build-image.yaml - - zuul.d/layout.yaml - - zuul.d/standalone-jobs.yaml - - zuul.d/undercloud-jobs.yaml - - tripleo-ci-centos-7-undercloud-containers: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-7-containers-multinode: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates-train: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-standalone: - irrelevant-files: &standalone_ignored - - ^.*\.md$ - - ^.*\.rst$ - - ^Puppetfile.*$ - - ^doc/.*$ - - ^docs/.*$ - - ^etc/.*$ - - ^lower-constraints.txt$ - - ^metadata.json$ - - ^playbooks/deprecated/.*$ - - ^playbooks/tripleo-buildcontainers/.*$ - - ^playbooks/tripleo-buildimages/.*$ - - ^releasenotes/.*$ - - ^roles/build-containers/.*$ - - ^roles/oooci-build-images/.*$ - - ^roles/tripleo-repos/.*$ - - ^spec/.*$ - - ^test-requirements.txt$ - - ^vars/sova-patterns.yml$ - - tox.ini - - zuul.d/build-containers.yaml - - zuul.d/build-image.yaml - - zuul.d/layout.yaml - - zuul.d/undercloud-jobs.yaml - - zuul.d/multinode-jobs.yaml - - tripleo-ci-centos-7-standalone: - irrelevant-files: *standalone_ignored - - gate: - jobs: - - tripleo-ci-centos-7-containers-multinode: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-containers-multinode: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-7-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-8-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates-train: - irrelevant-files: *multinode_ignored - -- project-template: - name: tripleo-multinode-container-full - queue: tripleo - check: - jobs: - - tripleo-ci-centos-8-containers-multinode: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-7-containers-multinode: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-7-undercloud-containers: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-containers-undercloud-minion: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-scenario007-multinode-oooq-container: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates-train: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-7-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-7-scenario001-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-7-scenario002-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-7-scenario003-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-7-scenario004-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-8-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-8-scenario001-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-8-scenario002-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-8-scenario003-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-8-scenario004-standalone: - irrelevant-files: *standalone_ignored - - gate: - jobs: - - tripleo-ci-centos-7-containers-multinode: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-containers-multinode: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-containers-undercloud-minion: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-7-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-8-standalone: - irrelevant-files: *standalone_ignored - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates-train: - irrelevant-files: *multinode_ignored - -- project-template: - name: tripleo-multinode-tripleoci - check: - jobs: - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates: - files: - - ^scripts/emit_releases_file/.*$ - - ^roles/run-test/.*$ - - ^roles/common/.*$ - - ^roles/tripleo-repos/.*$ - dependencies: - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-8-scenario007-multinode-oooq-container: - files: - - ^playbooks/tripleo-ci/.*$ - dependencies: - - tripleo-ci-centos-8-content-provider - -# -# DEPRECATED STANDALONE TEMPLATES -# -- project-template: - name: tripleo-standalone-scenarios-full - queue: tripleo - check: - jobs: - - tripleo-ci-centos-8-scenario001-standalone: - files: &scen1_files - # tripleo-common - - ^container-images/.*$ - - tripleo_common/image/kolla_builder.py - - workbooks/ceph-ansible.yaml - - tripleo_common/actions/ansible.py - # tripleo-heat-templates - - ^((docker|puppet)/services|deployment)/.*aodh.*$ - - ^((docker|puppet)/services|deployment)/.*ceilometer.*$ - - ^((docker|puppet)/services|deployment)/.*ceph.*$ - - ^((docker|puppet)/services|deployment)/.*cinder.*$ - - ^((docker|puppet)/services|deployment)/.*glance.*$ - - ^((docker|puppet)/services|deployment)/.*gnocchi.*$ - - ^((docker|puppet)/services|deployment)/.*logging.*$ - - ^((docker|puppet)/services|deployment)/.*metrics.*$ - - ^((docker|puppet)/services|deployment)/.*monitoring.*$ - - ^((docker|puppet)/services|deployment)/.*panko.*$ - - ^((docker|puppet)/services|deployment)/database/redis.*$ - - ci/environments/scenario001-standalone.yaml - # tripleo-quickstart - - config/general_config/featureset052.yml - # puppet-tripleo - - ^manifests/certmonger/ceph.*$ # ceph dashboard - - ^manifests/haproxy.*$ - - ^manifests/profile/(base|pacemaker)/aodh.*$ - - ^manifests/profile/(base|pacemaker)/ceilometer.*$ - - ^manifests/profile/(base|pacemaker)/cinder.*$ - - ^manifests/profile/(base|pacemaker)/glance.*$ - - ^manifests/profile/(base|pacemaker)/gnocchi.*$ - - ^manifests/profile/(base|pacemaker)/logging.*$ - - ^manifests/profile/(base|pacemaker)/metrics.*$ - - ^manifests/profile/(base|pacemaker)/monitoring.*$ - - ^manifests/profile/(base|pacemaker)/panko.*$ - # tripleo-quickstart-extras - - roles/standalone/.* - - roles/validate-tempest/.* - # tripleo-ci - - roles/run-test/.* - - roles/common/.* - - roles/prepare-node/.* - - roles/ceph-loop-device/.* # scen1/4 ceph - - tripleo-ci-centos-8-scenario002-standalone: - files: &scen2_files - # tripleo-heat-templates - - ^((docker|puppet)/services|deployment)/.*aodh.*$ - - ^((docker|puppet)/services|deployment)/.*barbican.*$ - - ^((docker|puppet)/services|deployment)/.*ceilometer.*$ - - ^((docker|puppet)/services|deployment)/.*cinder.*$ - - ^((docker|puppet)/services|deployment)/.*ec2-api.*$ - - ^((docker|puppet)/services|deployment)/.*glance.*$ - - ^((docker|puppet)/services|deployment)/.*gnocchi.*$ - - ^((docker|puppet)/services|deployment)/.*panko.*$ - - ^((docker|puppet)/services|deployment)/.*swift.*$ - - ^((docker|puppet)/services|deployment)/.*zaqar.*$ - - ^((docker|puppet)/services|deployment)/database/redis.*$ - - ci/environments/scenario002-standalone.yaml - # puppet-tripleo - - ^manifests/profile/(base|pacemaker)/aodh.*$ - - ^manifests/profile/(base|pacemaker)/barbican.*$ - - ^manifests/profile/(base|pacemaker)/ceilometer.*$ - - ^manifests/profile/(base|pacemaker)/cinder.*$ - - ^manifests/profile/(base|pacemaker)/glance.*$ - - ^manifests/profile/(base|pacemaker)/gnocchi.*$ - - ^manifests/profile/(base|pacemaker)/nova/ec2.*$ - - ^manifests/profile/(base|pacemaker)/panko.*$ - - ^manifests/profile/(base|pacemaker)/swift.*$ - - ^manifests/profile/(base|pacemaker)/zaqar.*$ - - tripleo-ci-centos-8-scenario003-standalone: - files: &scen3_files - # tripleo-heat-templates - - ^((docker|puppet)/services|deployment)/.*designate.*$ - - ^((docker|puppet)/services|deployment)/.*glance.*$ - - ^((docker|puppet)/services|deployment)/.*mistral.*$ - - ^((docker|puppet)/services|deployment)/.*nova.*$ - - ^((docker|puppet)/services|deployment)/.*sahara.*$ - - ci/environments/scenario003-standalone.yaml - # puppet-tripleo - - ^manifests/haproxy.*$ - - ^manifests/profile/(base|pacemaker)/glance.*$ - - ^manifests/profile/(base|pacemaker)/mistral.*$ - - ^manifests/profile/(base|pacemaker)/sahara.*$ - - ^manifests/profile/(base|pacemaker)/designate.*$ - - tripleo-ci-centos-8-scenario004-standalone: - files: &scen4_files - # tripleo-heat-templates - - ^(docker/services|deployment)/ceph.*$ - - ^(docker/services|deployment)/glance.*$ - - ^(docker/services|deployment)/manila.*$ - - ^((docker|puppet)/services|deployment)/database/mysql.*$ - - ci/environments/scenario004-standalone.yaml - # puppet-tripleo - - ^manifests/haproxy.*$ - - ^manifests/profile/(base|pacemaker)/glance.*$ - - ^manifests/profile/(base|pacemaker)/manila.*$ - - ^manifests/profile/(base|pacemaker)/ceph.*$ # ceph_nfs / ganesha - - tripleo-ci-centos-8-scenario010-standalone: - files: &scen10_files - # tripleo-common - - workbooks/octavia_post.yaml - - playbooks/octavia-files.yaml - - playbooks/roles/octavia.*$ - - playbooks/roles/common/.*$ - # tripleo-quickstart - - config/general_config/featureset062.yml - # puppet-tripleo - - ^manifests/haproxy.*$ - - ^manifests/profile/base/database/mysql.*$ - - ^manifests/profile/base/octavia.*$ - # tripleo-quickstart-extras - - roles/octavia-amphora-download/.* - # tripleo-heat-templates - # TODO(beagles): octavia testing touches neutron, glance and nova. - # It may be sensible to expand this list after it has proven itself. - - ^(docker/services|deployment)/octavia.*$ - - ci/environments/scenario010-standalone.yaml - - ^environments\services/octavia.*.yaml - # python-tempestconf - - ^config_tempest/services/octavia.*$ - - - tripleo-ci-centos-7-scenario010-standalone: - files: *scen10_files - - - tripleo-ci-centos-7-scenario010-ovn-provider-standalone: - files: *scen10_files - - - tripleo-ci-centos-8-scenario010-ovn-provider-standalone: - files: *scen10_files - - - tripleo-ci-centos-8-scenario012-standalone: - files: &scen12_files - # tripleo-heat-templates - - ^(docker/services|deployment)/glance.*$ - - ^(docker/services|deployment)/ironic.*$ - - ci/environments/scenario012-standalone.yaml - # tripleo-quickstart - - config/general_config/featureset060.yml - # puppet-tripleo - - ^manifests/haproxy.*$ - - ^manifests/profile/(base|pacemaker)/glance.*$ - - tripleo-ci-centos-8-scenario007-standalone: - files: &scen7_files - # tripleo-heat-templates - - ^((docker|puppet)/services|deployment)/.*neutron.*$ - - ci/environments/scenario007-standalone.yaml - # puppet-tripleo - - ^manifests/haproxy.*$ - - tripleo-ci-centos-8-standalone - - tripleo-ci-centos-8-standalone-build - - tripleo-ci-centos-7-standalone - - tripleo-ci-centos-7-scenario001-standalone: - files: *scen1_files - - tripleo-ci-centos-7-scenario002-standalone: - files: *scen2_files - - tripleo-ci-centos-7-scenario003-standalone: - files: *scen3_files - - tripleo-ci-centos-7-scenario004-standalone: - files: *scen4_files - - gate: - jobs: - - tripleo-ci-centos-7-scenario001-standalone: - files: *scen1_files - - tripleo-ci-centos-7-scenario002-standalone: - files: *scen2_files - - tripleo-ci-centos-7-scenario003-standalone: - files: *scen3_files - - tripleo-ci-centos-7-scenario004-standalone: - files: *scen4_files - - tripleo-ci-centos-8-scenario001-standalone: - files: *scen1_files - - tripleo-ci-centos-8-scenario002-standalone: - files: *scen2_files - - tripleo-ci-centos-8-scenario003-standalone: - files: *scen3_files - - tripleo-ci-centos-8-scenario004-standalone: - files: *scen4_files - - tripleo-ci-centos-8-scenario007-standalone: - files: *scen7_files - - tripleo-ci-centos-7-standalone - - tripleo-ci-centos-8-standalone - - tripleo-ci-centos-7-standalone - - tripleo-ci-centos-8-standalone - - tripleo-ci-centos-8-standalone-build - - - tripleo-ci-centos-7-scenario010-standalone: - files: *scen10_files - - tripleo-ci-centos-8-scenario012-standalone: - files: *scen12_files - -- project-template: - name: tripleo-standalone-multinode-ipa - check: - jobs: - - tripleo-ci-centos-8-standalone-on-multinode-ipa: - files: &tls_ipa_files - # tripleo-quickstart-extras - - ^roles/.*multinode-ipa.*$ - - ^roles/standalone.*$ - - ^playbooks/multinode-standalone-ipa.yml.*$ - # tripleo-heat-templates - - environments/ssl/tls-everywhere-endpoints-dns.yaml - - environments/services/haproxy-public-tls-certmonger.yaml - - environments/services/haproxy-public-tls-inject.yaml - - environments/ssl/enable-internal-tls.yaml - - environments/ssl/enable-internal-tls.j2.yaml - - environments/ssl/enable-tls.yaml - - ci/environments/standalone-ipa.yaml - - deployment/ipa/ipaservices-baremetal-ansible.yaml - - deployment/apache/* - - deployment/ceph-ansible/* - - deployment/database/* - - deployment/etcd/* - - deployment/haproxy/* - - deployment/metrics/* - - deployment/neutron/* - - deployment/nova/* - - deployment/octavia/* - - deployment/ovn/* - - deployment/rabbitmq/* - # puppet - - manifests/profile/base/rabbitmq.pp - -# -# Deprecated Undercloud templates -# -- project-template: - name: tripleo-undercloud-jobs - queue: tripleo - check: - jobs: - - tripleo-ci-centos-7-undercloud-oooq: - irrelevant-files: &undercloud_ignored - - ^.*\.md$ - - ^.*\.rst$ - - ^doc/.*$ - - ^docs/.*$ - - ^etc/.*$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^test-requirements.txt$ - - ^spec/.*$ - - ^Puppetfile.*$ - - tox.ini - - ^roles/build-containers/.*$ - - ^roles/oooci-build-images/.*$ - - ^roles/tripleo-repos/.*$ - - ^playbooks/deprecated/.*$ - - ^playbooks/tripleo-buildcontainers/.*$ - - ^playbooks/tripleo-buildimages/.*$ - - ^vars/sova-patterns.yml$ - - zuul.d/layout.yaml - - zuul.d/build-containers.yaml - - zuul.d/build-image.yaml - - zuul.d/standalone-jobs.yaml - - zuul.d/multinode-jobs.yaml - - - tripleo-ci-centos-8-undercloud-containers: - irrelevant-files: *undercloud_ignored - gate: - jobs: - - tripleo-ci-centos-7-undercloud-oooq: - irrelevant-files: *undercloud_ignored - - tripleo-ci-centos-7-undercloud-containers: - irrelevant-files: *undercloud_ignored - - tripleo-ci-centos-8-undercloud-containers: - irrelevant-files: *undercloud_ignored - -# Deprecated Rocky jobs -# http://lists.openstack.org/pipermail/openstack-discuss/2021-March/020912.html - -- job: - name: tripleo-ci-centos-7-undercloud-containers - parent: tripleo-ci-base-singlenode-standard - nodeset: single-centos-7-node - branches: ^(stable/rocky).*$ - vars: - featureset: '027' - playbooks: - - quickstart.yml - - multinode-undercloud.yml - - multinode-validate.yml - -# Deprecated C8 jobs - -- job: - name: tripleo-ci-centos-8-scenario010-standalone-base - parent: tripleo-ci-base-standalone-centos-8 - nodeset: single-centos-8-node-nested-virt - abstract: true - -- job: - name: tripleo-ci-centos-8-scenario010-standalone - voting: true - parent: tripleo-ci-centos-8-scenario010-standalone-base - branches: ^(?!stable/(train|victoria|wallaby)).*$ - -# Centos8 jobs no longer running for tripleo/wallaby. This is used by DIB: -# https://opendev.org/openstack/diskimage-builder/src/commit/94fab70e5834a8deaa03ca32957e37586951743d/.zuul.d/project.yaml#L9 -- job: - name: tripleo-buildimage-overcloud-hardened-uefi-full-centos-8 - parent: tripleo-build-images-base-centos-8 - branches: ^stable/wallaby$ - vars: - tripleo_image_type: overcloud-hardened-uefi-full - irrelevant-files: - - ^.*\.rst$ - - ^releasenotes/.*$ - -# TODO(marios) tripleo-build-containers-centos-7 used by kolla stable/train -# https://opendev.org/openstack/kolla/src/commit/d967f400e2761e9022a6b2dedc2d307d32d1ea27/.zuul.d/centos.yaml#L26 -- job: - name: tripleo-build-containers-centos-7 - parent: tripleo-build-containers-base - branches: stable/train - voting: true -- job: - name: tripleo-build-containers-base - abstract: true - description: | - Base abstract job for standalone TripleO CI build-containers jobs running repo setup - parent: tripleo-ci-build-containers-required-projects-upstream - nodeset: single-centos-7-node - -# TODO(marios) tripleo-ci-centos-7-containers-multinode -> mistral stein/train/ussuri -# https://opendev.org/openstack/mistral/src/commit/2a1736f0709d7316ae9b7bf6fa9b488c7a342009/.zuul.yaml#L119 -- job: - name: tripleo-ci-centos-7-containers-multinode - parent: tripleo-ci-base-multinode - branches: stable/train - vars: - nodes: 1ctlr - featureset: '010' - playbooks: - - multinode.yml - -# TODO(marios) tripleo-ci-centos-7-content-provider-train -> openstack-ansible-os_tempest victoria/wallaby -# https://opendev.org/openstack/openstack-ansible-os_tempest/src/commit/1869a9f138bcbbdbb53f2686cd567f71e073472d/zuul.d/project.yaml#L50 -- job: - name: tripleo-ci-centos-7-content-provider-train - parent: tripleo-ci-centos-7-content-provider-base - branches: master - override-checkout: stable/train - vars: - branch_override: stable/train - use_buildah: true -- job: - name: tripleo-ci-centos-7-content-provider-base - parent: tripleo-ci-base-singlenode-standard - nodeset: single-centos-7-node - run: - - playbooks/tripleo-buildcontainers/docker.yaml - - playbooks/tripleo-ci/run-v3.yaml - - playbooks/tripleo-ci/run-provider.yml - post-run: playbooks/tripleo-buildcontainers/post.yaml - vars: - featureset: '027' - provider_job: true - ib_create_web_repo: true - playbooks: - - quickstart.yml - - multinode-standalone-pre.yml - tags: - - undercloud - - build - -# TODO(ChandanKumar): Once https://review.opendev.org/c/openstack/openstack-ansible-os_tempest/+/849973 and -# https://review.opendev.org/c/openstack/openstack-ansible-os_tempest/+/849861 merges remove this. -# It adds a temprory base to avoid zuul job error issue -- job: - name: tripleo-ci-base-standalone - parent: tripleo-ci-base-standard diff --git a/zuul.d/layout.yaml b/zuul.d/layout.yaml deleted file mode 100644 index 582d305e4..000000000 --- a/zuul.d/layout.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -# zuul.d/layout.yaml -# This file is the Zuul layout of openstack/tripleo-ci project -# It describes the jobs that will run when submitting a change in this -# repository. - -- project: - templates: - - tripleo-multinode-branchful - - tripleo-ceph-periodic-wallaby - queue: tripleo - check: - jobs: - - openstack-tox-linters - - tripleo-tox-molecule: - vars: - tox_environment: - PYTEST_REQPASS: 1 - - openstack-tox-py36: &tox-py - success-url: "tox/reports.html" - failure-url: "tox/reports.html" - files: &py_files - - ^bindep.txt$ - - ^requirements.txt$ - - ^scripts/emit_releases_file/.*$ - - ^setup.cfg$ - - ^setup.py$ - - ^tox.ini$ - vars: - tox_environment: - PYTEST_REQPASS: 84 - - openstack-tox-py39: *tox-py - - tripleo-ci-centos-9-content-provider-wallaby: - dependencies: - - openstack-tox-linters - gate: - jobs: - # Don't put a files section on the linters job, otherwise no - # jobs might be defined and nothing can merge in this repo. - - openstack-tox-linters - - tripleo-tox-molecule - - openstack-tox-py36: *tox-py - - openstack-tox-py39: *tox-py diff --git a/zuul.d/multinode-jobs.yaml b/zuul.d/multinode-jobs.yaml deleted file mode 100644 index be40703d9..000000000 --- a/zuul.d/multinode-jobs.yaml +++ /dev/null @@ -1,358 +0,0 @@ ---- -# zuul.d/multinode-jobs.yaml -# Zuul layout for TripleO multinode jobs. -# It contains all the jobs using deployed-servers in nodepool. - -########################################################### -# # -# UPSTREAM MULTINODE PARENTING # -# # -########################################################### - -# This job definition holds the required projects -# for upstream CI. The required projects are separated -# out to allow for this job to be shadowed in another repo -# and the required projects overwritten for other environments -- job: - name: tripleo-ci-base-required-projects-multinode-upstream - description: | - Base abstract job to add required-projects for Upstream Multinode Jobs - abstract: true - parent: tripleo-ci-base-multinode-standard - required-projects: &multinode_required_projects - - opendev.org/openstack/tripleo-ansible - - opendev.org/openstack/tripleo-common - - opendev.org/openstack/tripleo-operator-ansible - - name: opendev.org/openstack/ansible-config_template - override-checkout: master - -# CentOS 7 version -# Distro specific upstream base for multinode jobs - -- job: - name: tripleo-ci-base-multinode - abstract: true - description: | - Base abstract job for multinode TripleO CI C7 zuulv3 jobs - parent: tripleo-ci-base-required-projects-multinode-upstream - nodeset: two-centos-7-nodes - -# CentOS 8 version -- job: - name: tripleo-ci-base-multinode-centos-8 - abstract: true - description: | - Base abstract job for multinode TripleO CI centos-8 zuulv3 jobs - parent: tripleo-ci-base-required-projects-multinode-upstream - nodeset: two-centos-8-nodes - -# CentOS 9 version -- job: - name: tripleo-ci-base-multinode-centos-9 - abstract: true - description: | - Base abstract job for multinode TripleO CI centos-9 zuulv3 jobs - parent: tripleo-ci-base-required-projects-multinode-upstream - nodeset: two-centos-9-nodes - -# Centos 8/9 mixed os multinode base job -- job: - name: tripleo-ci-base-required-projects-multinode-mixed-os-upstream - description: | - Base abstract job to add required-projects for Upstream Mixed OS Multinode Jobs - abstract: true - parent: tripleo-ci-base-multinode-mixed-os-standard - required-projects: *multinode_required_projects - nodeset: two-centos-9-one-centos-8-nodes - -- project-template: - name: tripleo-multinode-container-minimal-pipeline - queue: tripleo - check: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-9-containers-multinode: - irrelevant-files: &multinode_ignored - - .*molecule.* - - ^.*\.md$ - - ^.*\.rst$ - - ^.ansible-lint$ - - ^.pre-commit-config.yaml$ - - ^lower-constraints.txt$ - - ^test-requirements.txt$ - - ^Puppetfile.*$ - - ^doc/.*$ - - ^docs/.*$ - - ^etc/.*$ - - ^metadata.json$ - - ^playbooks/deprecated/.*$ - - ^playbooks/tripleo-buildcontainers/.*$ - - ^playbooks/tripleo-buildimages/.*$ - - ^releasenotes/.*$ - - ^roles/build-containers/.*$ - - ^roles/oooci-build-images/.*$ - - ^roles/tripleo-repos/.*$ - - ^setup.*$ - - ^spec/.*$ - - ^vars/sova-patterns.yml$ - - playbooks/quickstart-extras-standalone.yml # tripleo-quickstart-extras - - roles/standalone-upgrade/.* - - roles/standalone/.* - # standalone featuresets - - ^config/general_config/featureset052.yml - - ^config/general_config/featureset056.yml - - ^config/general_config/featureset062.yml - - ^config/general_config/featureset060.yml - # ovb featuresets - - ^config/general_config/featureset001.yml - - ^config/general_config/featureset002.yml - - ^config/general_config/featureset024.yml - - ^config/general_config/featureset035.yml - - ^config/general_config/featureset039.yml - - ^config/general_config/featureset041.yml - - ^config/general_config/featureset042.yml - - ^config/general_config/featureset063.yml - # undercloud featuresets - - ^config/general_config/featureset003.yml - - ^config/general_config/featureset027.yml - - ^config/general_config/featureset050.yml - # upgrade/update featuresets - - ^config/general_config/featureset037.yml - - ^config/general_config/featureset051.yml - - ^config/general_config/featureset068.yml - - zuul.d/upgrades-jobs-templates.yaml - - zuul.d/build-containers.yaml - - zuul.d/build-image.yaml - - zuul.d/layout.yaml - - zuul.d/standalone-jobs.yaml - - zuul.d/undercloud-jobs.yaml - # tripleo-ansible - - ^_skeleton_role_/.* - - ^scripts/tripleo-critical-bugs/.* - - ^tox.ini$ - - ^tripleo_ansible/playbooks/docker-vfs-setup.yml$ - - ^tripleo_ansible/roles/.*/meta.* - - ^tripleo_ansible/roles/test_deps/.* - - ^zuul.d/base.yaml - # unit tests - - ^tripleoclient/tests/.*$ - - ^tripleo_common/tests/.*$ - vars: &multi_consumer_vars - consumer_job: true - build_container_images: false - remove_tags: - - build - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-8-9-multinode-mixed-os: &multinode_mixed_os - irrelevant-files: *multinode_ignored - vars: *multi_consumer_vars - dependencies: - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-scenario007-multinode-oooq-container: &cs9_multinode_all - irrelevant-files: *multinode_ignored - vars: *multi_consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider - gate: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-9-containers-multinode: *cs9_multinode_all - - tripleo-ci-centos-8-9-multinode-mixed-os: *multinode_mixed_os - -- project-template: - name: tripleo-multinode-container-full-pipeline - queue: tripleo - check: - jobs: - - tripleo-ci-centos-9-content-provider: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-content-provider: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-containers-multinode: - irrelevant-files: *multinode_ignored - vars: *multi_consumer_vars - dependencies: - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-8-containers-undercloud-minion: - irrelevant-files: *multinode_ignored - vars: *multi_consumer_vars - dependencies: - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-9-containers-multinode: *cs9_multinode_all - - tripleo-ci-centos-9-scenario007-multinode-oooq-container: *cs9_multinode_all - gate: - jobs: - - tripleo-ci-centos-9-content-provider: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-8-content-provider: - irrelevant-files: *multinode_ignored - - tripleo-ci-centos-9-containers-multinode: *cs9_multinode_all - - tripleo-ci-centos-9-scenario007-multinode-oooq-container: *cs9_multinode_all - - tripleo-ci-centos-8-containers-multinode: - irrelevant-files: *multinode_ignored - vars: *multi_consumer_vars - dependencies: - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-8-containers-undercloud-minion: - irrelevant-files: *multinode_ignored - vars: *multi_consumer_vars - dependencies: - - tripleo-ci-centos-8-content-provider - -# NOTE(rfolco): tripleo-multinode-branchful should be used in ci repos only -# Check where this template is used across openstack repos with the url below: -# http://codesearch.openstack.org/?q=tripleo-multinode-branchful -- project-template: - name: tripleo-multinode-branchful - check: - jobs: - - openstack-tox-linters - - tripleo-ci-centos-9-content-provider-wallaby: - irrelevant-files: &branchful_ignored - - ^.*\.md$ - - ^.*\.rst$ - - ^.ansible-lint$ - - ^doc/.*$ - - ^docs/.*$ - - ^etc/.*$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^test-requirements.txt$ - - ^spec/.*$ - - ^Puppetfile.*$ - - tox.ini - - ^roles/build-containers/.*$ - - ^roles/oooci-build-images/.*$ - - ^playbooks/deprecated/.*$ - - ^playbooks/tripleo-buildcontainers/.*$ - - ^playbooks/tripleo-buildimages/.*$ - - ^vars/sova-patterns.yml$ - - ^scripts/tripleo-critical-bugs/.* - - ^tripleoclient/tests/.*$ - - ^tripleo_common/tests/.*$ - dependencies: - - openstack-tox-linters - - tripleo-ci-centos-9-containers-multinode-wallaby: &multi_consumer_job_wallaby - irrelevant-files: *branchful_ignored - vars: *multi_consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider-wallaby - - gate: - jobs: - - tripleo-ci-centos-9-content-provider-wallaby: - irrelevant-files: *branchful_ignored - - tripleo-ci-centos-9-containers-multinode-wallaby: *multi_consumer_job_wallaby - -## CentOS 9 jobs -- job: - name: tripleo-ci-centos-9-containers-multinode - parent: tripleo-ci-base-multinode-centos-9 - branches: &c9_branches ^(?!stable/train).*$ - irrelevant-files: *multinode_ignored - voting: true - -- job: - name: tripleo-ci-containers-multinode-options - vars: - nodes: 1ctlr - featureset: '010' - playbooks: - - multinode.yml - -- job: - name: tripleo-ci-centos-9-containers-multinode - branches: *c9_branches - parent: tripleo-ci-containers-multinode-options - -- job: - name: tripleo-ci-centos-9-scenario007-multinode-oooq-container - parent: tripleo-ci-base-multinode-centos-9 - branches: *c9_branches - irrelevant-files: *multinode_ignored - vars: - nodes: 1ctlr - featureset: '030' - playbooks: - - multinode.yml - -## CentOS 8 jobs -- job: - name: tripleo-ci-centos-8-containers-multinode - parent: tripleo-ci-base-multinode-centos-8 - branches: &c8_branches ^(stable/train).*$ - voting: true - -- job: - name: tripleo-ci-centos-8-containers-multinode - branches: *c8_branches - parent: tripleo-ci-containers-multinode-options - -- job: - name: tripleo-ci-centos-8-containers-undercloud-minion - parent: tripleo-ci-base-multinode-centos-8 - branches: *c8_branches - vars: - nodes: 1minion - featureset: '061' - playbooks: - - multinode-minion.yml - extra_tags: - - undercloud-minion-setup - - undercloud-minion-deploy - -- job: - name: tripleo-ci-centos-9-containers-multinode-zed - parent: tripleo-ci-centos-9-containers-multinode - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-ci-centos-9-containers-multinode-wallaby - parent: tripleo-ci-centos-9-containers-multinode - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-8-containers-multinode-train - parent: tripleo-ci-centos-8-containers-multinode - branches: master - override-checkout: stable/train - vars: - branch_override: stable/train - -## Centos 8 9 mixed deployment -- job: - name: tripleo-ci-centos-8-9-multinode-mixed-os - parent: tripleo-ci-base-required-projects-multinode-mixed-os-upstream - branches: stable/wallaby - voting: true - vars: - featureset: '066' - nodes: 1ctlr_1comp_mixed_os - -- job: - name: tripleo-ci-centos-8-9-multinode-mixed-os-update - parent: tripleo-ci-base-required-projects-multinode-mixed-os-upstream - branches: stable/wallaby - voting: false - vars: - run_test_role_vars: - overcloud_deploy_script: "{{ ansible_user_dir }}/overcloud-deploy.sh" - overcloud_update: true - overcloud_ssh_user: "zuul" - tripleo_upgrade_validations_non_fatal: true - tripleo_upgrade_debug: false - tripleo_ci: true - featureset: '066' - nodes: 1ctlr_1comp_mixed_os - extra_tags: - - overcloud-update diff --git a/zuul.d/nodesets.yaml b/zuul.d/nodesets.yaml deleted file mode 100644 index 4cb5842cc..000000000 --- a/zuul.d/nodesets.yaml +++ /dev/null @@ -1,202 +0,0 @@ ---- -- nodeset: - name: two-centos-9-nodes - nodes: - - name: primary - label: centos-9-stream - - name: secondary - label: centos-9-stream - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: - - secondary - - name: subnodes - nodes: - - secondary - -- nodeset: - name: two-centos-8-nodes - nodes: - - name: primary - label: centos-8-stream - - name: secondary - label: centos-8-stream - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: - - secondary - - name: subnodes - nodes: - - secondary - -- nodeset: - name: two-centos-7-nodes - nodes: - - name: primary - label: centos-7 - - name: secondary - label: centos-7 - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: - - secondary - - name: subnodes - nodes: - - secondary - -- nodeset: - name: single-centos-8-node - nodes: - - name: primary - label: centos-8-stream - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: [] - -- nodeset: - name: single-centos-9-node - nodes: - - name: primary - label: centos-9-stream - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: [] - -- nodeset: - name: single-centos-8-node-nested-virt - nodes: - - name: primary - label: nested-virt-centos-8-stream - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: [] - -- nodeset: - name: single-centos-9-node-nested-virt - nodes: - - name: primary - label: nested-virt-centos-9-stream - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: [] - -- nodeset: - name: single-centos-7-node - nodes: - - name: primary - label: centos-7 - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: [] - -- nodeset: - name: three-centos-9-nodes - nodes: - - name: primary - label: centos-9-stream - - name: secondary-1 - label: centos-9-stream - - name: secondary-2 - label: centos-9-stream - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: - - secondary-1 - - secondary-2 - - name: subnodes - nodes: - - secondary-1 - - secondary-2 - -- nodeset: - name: three-centos-8-nodes - nodes: - - name: primary - label: centos-8-stream - - name: secondary-1 - label: centos-8-stream - - name: secondary-2 - label: centos-8-stream - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: - - secondary-1 - - secondary-2 - - name: subnodes - nodes: - - secondary-1 - - secondary-2 - -- nodeset: - name: three-centos-7-nodes - nodes: - - name: primary - label: centos-7 - - name: secondary-1 - label: centos-7 - - name: secondary-2 - label: centos-7 - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: - - secondary-1 - - secondary-2 - - name: subnodes - nodes: - - secondary-1 - - secondary-2 - -- nodeset: - name: two-centos-9-one-centos-8-nodes - nodes: - - name: primary - label: centos-9-stream - - name: secondary-1 - label: centos-9-stream - - name: secondary-2 - label: centos-8-stream - groups: - - name: switch - nodes: - - primary - - name: peers - nodes: - - secondary-1 - - secondary-2 - - name: subnodes - nodes: - - secondary-1 - - secondary-2 diff --git a/zuul.d/periodic.yaml b/zuul.d/periodic.yaml deleted file mode 100644 index 9d00ca928..000000000 --- a/zuul.d/periodic.yaml +++ /dev/null @@ -1,234 +0,0 @@ ---- -- project-template: - name: tripleo-periodic - periodic: - jobs: - - tripleo-ci-centos-9-content-provider: - irrelevant-files: &unbranched_content_provider_files - - .*molecule.* - - ^.*\.md$ - - ^.*\.rst$ - - ^Puppetfile.*$ - - ^doc/.*$ - - ^etc/.*$ - - ^lower-constraints.txt$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^spec/.*$ - - ^test-requirements.txt$ - - ^vars/sova-patterns.yml$ - - tox.ini - - ^setup.*$ - vars: - force_non_periodic: true - - tripleo-ci-centos-9-content-provider-current: - irrelevant-files: *unbranched_content_provider_files - vars: - force_non_periodic: true - buildcontainers_override_repos: current - featureset_override: - dlrn_hash_tag: current - promote_source: current - - - tripleo-ci-centos-9-containers-multinode: - vars: &unbranched_vars_periodic - force_non_periodic: true - consumer_job: true - build_container_images: false - remove_tags: - - build - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-standalone: - vars: *unbranched_vars_periodic - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates: - vars: *unbranched_vars_periodic - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-current - -- project-template: - name: tripleo-multinode-branchful - periodic: - jobs: - - tripleo-ci-centos-9-content-provider-wallaby: - vars: - force_non_periodic: true - - tripleo-ci-centos-9-containers-multinode-wallaby: - vars: &multi_consumer_vars_periodic - force_non_periodic: true - consumer_job: true - build_container_images: false - remove_tags: - - build - dependencies: - - tripleo-ci-centos-9-content-provider-wallaby - -- project-template: - name: tripleo-periodic-upgrades-master-pipeline - periodic: - jobs: - - tripleo-ci-centos-9-content-provider-wallaby: - vars: - force_non_periodic: true - - tripleo-ci-centos-9-content-provider: - vars: - force_non_periodic: true - - tripleo-ci-centos-9-undercloud-upgrade: - vars: &consumer_vars - force_non_periodic: true - consumer_job: true - build_container_images: false - remove_tags: - - build - irrelevant-files: &undercloud_ignored - - ^.*\.md$ - - ^.*\.rst$ - - ^doc/.*$ - - ^docs/.*$ - - ^etc/.*$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^test-requirements.txt$ - - ^spec/.*$ - - ^Puppetfile.*$ - - tox.ini - - ^roles/build-containers/.*$ - - ^roles/oooci-build-images/.*$ - - ^playbooks/deprecated/.*$ - - ^playbooks/tripleo-buildcontainers/.*$ - - ^playbooks/tripleo-buildimages/.*$ - - ^vars/sova-patterns.yml$ - - zuul.d/layout.yaml - - zuul.d/build-containers.yaml - - zuul.d/build-image.yaml - - zuul.d/standalone-jobs.yaml - - zuul.d/undercloud-jobs.yaml - - zuul.d/multinode-jobs.yaml - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-wallaby - - tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates: - irrelevant-files: &multinode_ignored - - ^.*\.md$ - - ^.*\.rst$ - - ^doc/.*$ - - ^docs/.*$ - - ^etc/.*$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^test-requirements.txt$ - - ^spec/.*$ - - ^Puppetfile.*$ - - tox.ini - - ^roles/build-containers/.*$ - - ^roles/oooci-build-images/.*$ - - ^playbooks/deprecated/.*$ - - ^playbooks/tripleo-buildcontainers/.*$ - - ^playbooks/tripleo-buildimages/.*$ - - ^vars/sova-patterns.yml$ - - zuul.d/layout.yaml - - zuul.d/build-containers.yaml - - zuul.d/build-image.yaml - - zuul.d/standalone-jobs.yaml - - zuul.d/undercloud-jobs.yaml - - zuul.d/multinode-jobs.yaml - # tripleo-quickstart-extras - - playbooks/quickstart-extras-standalone.yml - - roles/standalone/.* - - roles/standalone-upgrade/.* - vars: *consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider - -- project-template: - name: tripleo-periodic-upgrades-zed-pipeline - periodic: - jobs: - - tripleo-ci-centos-9-content-provider-zed: &force_non_periodic - vars: - force_non_periodic: true - - tripleo-ci-centos-9-content-provider-wallaby: *force_non_periodic - - tripleo-ci-centos-9-undercloud-upgrade-zed: - irrelevant-files: *undercloud_ignored - vars: *consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider-zed - - tripleo-ci-centos-9-content-provider-wallaby - - tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates: - irrelevant-files: *multinode_ignored - vars: *consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider-zed - -- project-template: - name: tripleo-periodic-upgrades-wallaby-pipeline - periodic: - jobs: - - tripleo-ci-centos-9-content-provider-wallaby: *force_non_periodic - - tripleo-ci-centos-8-content-provider-wallaby: *force_non_periodic - - tripleo-ci-centos-9-content-provider-current-wallaby: *force_non_periodic - - tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates: - irrelevant-files: *multinode_ignored - vars: *consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider-wallaby - - tripleo-ci-centos-9-content-provider-current-wallaby - -- project-template: - name: tripleo-ceph-periodic-wallaby - periodic: - jobs: - - tripleo-ci-centos-9-content-provider-wallaby: - vars: - force_non_periodic: true - - tripleo-ci-centos-9-scenario001-ceph-nightly-wallaby: &ceph_vars_periodic - vars: - force_non_periodic: true - consumer_job: true - build_container_images: false - remove_tags: - - build - dependencies: - - tripleo-ci-centos-9-content-provider-wallaby - - tripleo-ci-centos-9-scenario004-ceph-nightly-wallaby: *ceph_vars_periodic - -- project-template: - name: tripleo-periodic-fips - periodic: - jobs: - - tripleo-ci-centos-9-content-provider: &fips_force_non_periodic - vars: - force_non_periodic: true - - tripleo-ci-centos-9-content-provider-wallaby: *fips_force_non_periodic - - tripleo-ci-centos-9-standalone-fips: &fips_vars_periodic - vars: &fips_consumer_vars - force_non_periodic: true - consumer_job: true - build_container_images: false - remove_tags: - - build - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-scenario001-standalone-fips: *fips_vars_periodic - - tripleo-ci-centos-9-scenario002-standalone-fips: *fips_vars_periodic - - tripleo-ci-centos-9-scenario003-standalone-fips: *fips_vars_periodic - - tripleo-ci-centos-9-scenario004-standalone-fips: *fips_vars_periodic - - tripleo-ci-centos-9-scenario007-standalone-fips: *fips_vars_periodic - - tripleo-ci-centos-9-scenario010-standalone-fips: *fips_vars_periodic - - tripleo-ci-centos-9-scenario010-ovn-provider-standalone-fips: *fips_vars_periodic - - tripleo-ci-centos-9-scenario012-standalone-fips: *fips_vars_periodic - - tripleo-ci-centos-9-standalone-fips-wallaby: &fips_vars_periodic_wallaby - vars: *fips_consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider-wallaby - - tripleo-ci-centos-9-scenario001-standalone-fips-wallaby: *fips_vars_periodic_wallaby - - tripleo-ci-centos-9-scenario002-standalone-fips-wallaby: *fips_vars_periodic_wallaby - - tripleo-ci-centos-9-scenario003-standalone-fips-wallaby: *fips_vars_periodic_wallaby - - tripleo-ci-centos-9-scenario004-standalone-fips-wallaby: *fips_vars_periodic_wallaby - - tripleo-ci-centos-9-scenario007-standalone-fips-wallaby: *fips_vars_periodic_wallaby - - tripleo-ci-centos-9-scenario010-standalone-fips-wallaby: *fips_vars_periodic_wallaby - - tripleo-ci-centos-9-scenario010-ovn-provider-standalone-fips-wallaby: *fips_vars_periodic_wallaby - - tripleo-ci-centos-9-scenario012-standalone-fips-wallaby: *fips_vars_periodic_wallaby diff --git a/zuul.d/standalone-jobs.yaml b/zuul.d/standalone-jobs.yaml deleted file mode 100644 index f9e1df953..000000000 --- a/zuul.d/standalone-jobs.yaml +++ /dev/null @@ -1,1199 +0,0 @@ ---- -# zuul.d/standalone-jobs.yaml -# Zuul layout for TripleO standalone jobs. -# It contains all the jobs related to standalone installer testing. - -- job: - name: tripleo-ci-base-required-projects-standalone-upstream - description: | - Base abstract job to add required-projects for Upstream Standalone jobs - abstract: true - parent: tripleo-ci-base-standalone-standard - required-projects: &standalone_rq - - opendev.org/openstack/tripleo-ansible - - opendev.org/openstack/tripleo-operator-ansible - - name: opendev.org/openstack/ansible-config_template - override-checkout: master - -- job: - name: tripleo-ci-base-required-projects-edpm-upstream - description: | - Base abstract job to add required-projects for Upstream edpm jobs - abstract: true - parent: tripleo-ci-base-multinode-edpm-standard - required-projects: *standalone_rq - -# Centos 8 base jobs -- job: - name: tripleo-ci-base-standalone-centos-8 - abstract: true - description: | - Base abstract job for standalone TripleO CI Centos-8 zuulv3 jobs. - parent: tripleo-ci-base-required-projects-standalone-upstream - nodeset: single-centos-8-node - -# CentOS - 9 base jobs -- job: - name: tripleo-ci-base-standalone-centos-9 - abstract: true - description: | - Base abstract job for standalone TripleO CI Centos-9 zuulv3 jobs. - parent: tripleo-ci-base-required-projects-standalone-upstream - nodeset: single-centos-9-node - -- job: - name: tripleo-ci-base-edpm-centos-9 - abstract: true - description: | - Base abstract job for standalone TripleO CI Centos-9 zuulv3 jobs. - parent: tripleo-ci-base-required-projects-edpm-upstream - nodeset: two-centos-9-nodes - -# ATTENTION: Try to avoid adding irrelevant-files inside templates -# or project because it does override values defined at job level. -# An attempt to optimize at this level can have the exactly opposite effect, -# triggering the affected jobs on far more changes than needed. -# Keep vanilla standalone during c8/wallaby teardown -- job: - name: tripleo-ci-centos-8-standalone - parent: tripleo-ci-base-standalone-centos-8 - branches: ^(stable/(wallaby)).*$ - vars: - featureset: '052' - irrelevant-files: &irrelevant_files - - .*molecule.* - - ^.*\.md$ - - ^.*\.rst$ - - ^.ansible-lint$ - - ^.pre-commit-config.yaml$ - - ^Puppetfile.*$ - - ^doc/.*$ - - ^etc/.*$ - - ^lower-constraints.txt$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^spec/.*$ - - ^test-requirements.txt$ - - ^vars/sova-patterns.yml$ - - tox.ini - - ^setup.*$ - - ^tripleoclient/tests/.*$ - - ^tripleo_common/tests/.*$ - -- job: - name: tripleo-ci-centos-9-standalone - parent: tripleo-ci-base-standalone-centos-9 - branches: &c9_branches ^(stable/wallaby).*$ - vars: - containers_base_image: registry.access.redhat.com/ubi9:latest - featureset: '052' - irrelevant-files: *irrelevant_files - -- job: - name: tripleo-ci-centos-8-standalone-build - parent: tripleo-ci-centos-8-standalone - vars: - build_container_images: true - files: &sa_build_files - - config/release/tripleo-ci/.* - - roles/standalone/.* - - roles/build-containers/.* - - roles/container-build/.* - - roles/container-prep/.* - - roles/container-update/.* - - roles/extras-common/.* - -- job: - name: tripleo-ci-centos-9-standalone-build - parent: tripleo-ci-centos-9-standalone - vars: - build_container_images: true - files: *sa_build_files - -- project-template: - name: tripleo-standalone-scenarios-pipeline - queue: tripleo - check: - jobs: - - tripleo-ci-centos-9-content-provider: - irrelevant-files: *irrelevant_files - - tripleo-ci-centos-9-scenario001-standalone: &c9_scen1 - branches: *c9_branches - files: &scen1_files - # tripleo-common - - ^container-images/tcib/base/collectd.*$ - - ^container-images/tcib/base/os/aodh.*$ - - ^container-images/tcib/base/os/ceilometer.*$ - - ^container-images/tcib/base/os/cinder.*$ - - ^container-images/tcib/base/os/gnocchi.*$ - - ^container-images/tcib/base/os/heat.*$ - - ^container-images/tcib/base/os/horizon.*$ - - ^container-images/tcib/base/qdrouterd.*$ - - ^container-images/tcib/base/rabbitmq.*$ - - ^container-images/tcib/base/redis.*$ - - ^tripleo_common/image/.*$ - - workbooks/ceph-ansible.yaml - - tripleo_common/actions/ansible.py - # python-tripleoclient - - ^tripleoclient/utils.py$ - - ^tripleoclient/v2/overcloud_ceph.py$ - # tripleo-heat-templates - - ^((docker|puppet)/services|deployment)/.*aodh.*$ - - ^((docker|puppet)/services|deployment)/.*ceilometer.*$ - - ^((docker|puppet)/services|deployment)/.*ceph.*$ - - ^((docker|puppet)/services|deployment)/.*cinder.*$ - - ^((docker|puppet)/services|deployment)/.*glance.*$ - - ^((docker|puppet)/services|deployment)/.*gnocchi.*$ - - ^((docker|puppet)/services|deployment)/haproxy-(container|pacemaker)-.*$ - - ^((docker|puppet)/services|deployment)/.*heat.*$ - - ^((docker|puppet)/services|deployment)/.*horizon.*$ - - ^((docker|puppet)/services|deployment)/.*logging.*$ - - ^((docker|puppet)/services|deployment)/.*metrics.*$ - - ^((docker|puppet)/services|deployment)/.*monitoring.*$ - - ^((docker|puppet)/services|deployment)/.*panko.*$ - - ^((docker|puppet)/services|deployment)/.*placement.*$ - - ^((docker|puppet)/services|deployment)/database/redis.*$ - - ci/environments/scenario001-standalone.yaml - # tripleo-quickstart - - config/general_config/featureset052.yml - # puppet-tripleo - - ^manifests/certmonger/ceph.*$ # ceph dashboard - - ^manifests/haproxy.*$ - - ^manifests/profile/(base|pacemaker)/aodh.*$ - - ^manifests/profile/(base|pacemaker)/ceilometer.*$ - - ^manifests/profile/(base|pacemaker)/cinder.*$ - - ^manifests/profile/(base|pacemaker)/glance.*$ - - ^manifests/profile/(base|pacemaker)/gnocchi.*$ - - ^manifests/profile/(base|pacemaker)/heat.*$ - - ^manifests/profile/(base|pacemaker)/horizon.*$ - - ^manifests/profile/(base|pacemaker)/logging.*$ - - ^manifests/profile/(base|pacemaker)/metrics.*$ - - ^manifests/profile/(base|pacemaker)/monitoring.*$ - - ^manifests/profile/(base|pacemaker)/panko.*$ - - ^manifests/profile/(base|pacemaker)/placement.*$ - - ^manifests/profile/(base|pacemaker)/database/redis.*$ - # tripleo-quickstart-extras - - roles/standalone/.* - - roles/validate-tempest/.* - # tripleo-ci - - roles/run-test/.* - - roles/ci-common-vars/.* - - roles/prepare-node/.* - - roles/ceph-loop-device/.* # scen1/4 ceph - # tripleo-ansible - - ^tripleo_ansible/roles/tripleo_ceph.*/.* - - ^tripleo_ansible/roles/tripleo_hieradata/.* - - ^tripleo_ansible/roles/tripleo_podman/.* - - ^tripleo_ansible/roles/tripleo_upgrade_hiera/.* - - ^tripleo_ansible/roles/tripleo_lvmfilter/.* - - ^setup.* - vars: &consumer_vars - consumer_job: true - build_container_images: false - remove_tags: - - build - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-scenario002-standalone: &c9_scen2 - <<: *c9_scen1 - files: &scen2_files - # tripleo-heat-templates - - ^((docker|puppet)/services|deployment)/.*aodh.*$ - - ^((docker|puppet)/services|deployment)/.*barbican.*$ - - ^((docker|puppet)/services|deployment)/.*ceilometer.*$ - - ^((docker|puppet)/services|deployment)/.*cinder.*$ - - ^((docker|puppet)/services|deployment)/.*ec2-api.*$ - - ^((docker|puppet)/services|deployment)/.*glance.*$ - - ^((docker|puppet)/services|deployment)/.*gnocchi.*$ - - ^((docker|puppet)/services|deployment)/haproxy-(container|pacemaker)-.*$ - - ^((docker|puppet)/services|deployment)/.*iscsid.*$ - - ^((docker|puppet)/services|deployment)/.*panko.*$ - - ^((docker|puppet)/services|deployment)/.*swift.*$ - - ^((docker|puppet)/services|deployment)/.*zaqar.*$ - - ^((docker|puppet)/services|deployment)/database/redis.*$ - - ci/environments/scenario002-standalone.yaml - # puppet-tripleo - - ^manifests/haproxy.*$ - - ^manifests/profile/(base|pacemaker)/aodh.*$ - - ^manifests/profile/(base|pacemaker)/barbican.*$ - - ^manifests/profile/(base|pacemaker)/ceilometer.*$ - - ^manifests/profile/(base|pacemaker)/cinder.*$ - - ^manifests/profile/(base|pacemaker)/glance.*$ - - ^manifests/profile/(base|pacemaker)/gnocchi.*$ - - ^manifests/profile/(base|pacemaker)/iscsid.*$ - - ^manifests/profile/(base|pacemaker)/nova/ec2.*$ - - ^manifests/profile/(base|pacemaker)/panko.*$ - - ^manifests/profile/(base|pacemaker)/swift.*$ - - ^manifests/profile/(base|pacemaker)/zaqar.*$ - - ^manifests/profile/(base|pacemaker)/database/redis.*$ - # tripleo-ansible - - ^tripleo_ansible/roles/tripleo_hieradata/.* - - ^tripleo_ansible/roles/tripleo_upgrade_hiera/.* - - ^tripleo_ansible/roles/tripleo_lvmfilter/.* - - tripleo-ci-centos-9-scenario003-standalone: &c9_scen3 - <<: *c9_scen1 - files: &scen3_files - # tripleo-common - - ^container-images/tcib/base/os/designate.*$ - - ^container-images/tcib/base/os/mistral.*$ - # tripleo-heat-templates - - ^((docker|puppet)/services|deployment)/.*designate.*$ - - ^((docker|puppet)/services|deployment)/haproxy-(container|pacemaker)-.*$ - - ^((docker|puppet)/services|deployment)/.*unbound.*$ - - ^((docker|puppet)/services|deployment)/.*glance.*$ - - ^((docker|puppet)/services|deployment)/.*mistral.*$ - - ^((docker|puppet)/services|deployment)/.*nova.*$ - - ci/environments/scenario003-standalone.yaml - # puppet-tripleo - - ^manifests/haproxy.*$ - - ^manifests/profile/(base|pacemaker)/glance.*$ - - ^manifests/profile/(base|pacemaker)/mistral.*$ - - ^manifests/profile/(base|pacemaker)/designate.*$ - - ^manifests/profile/base/neutron/dhcp.pp - - ^manifests/profile/base/neutron/plugins/ml2/ovn.pp - # tripleo-ansible - - ^tripleo_ansible/roles/tripleo_create_admin/.* - - ^tripleo_ansible/roles/tripleo_hieradata/.* - - ^tripleo_ansible/roles/tripleo_upgrade_hiera/.* - - ^tripleo_ansible/roles/tripleo_unbound/.* - - ^tripleo_ansible/roles/.*designate.*$ - - ^tripleo_ansible/ansible_plugins/modules/tripleo_findif_for_ip.py - - tripleo-ci-centos-9-scenario004-standalone: &c9_scen4 - <<: *c9_scen1 - files: &scen4_files - # tripleo-common - - ^container-images/tcib/base/os/horizon.*$ - - ^container-images/tcib/base/os/manila.*$ - - ^tripleo_common/image/.*$ - # tripleo-heat-templates - - ^(docker/services|deployment)/ceph.*$ - - ^(docker/services|deployment)/glance.*$ - - ^(docker/services|deployment)/haproxy-(container|pacemaker)-.*$ - - ^(docker/services|deployment)/manila.*$ - - ^(docker/services|deployment)/horizon.*$ - - ^((docker|puppet)/services|deployment)/database/mysql.*$ - - ci/environments/scenario004-standalone.yaml - # puppet-tripleo - - ^manifests/haproxy.*$ - - ^manifests/profile/(base|pacemaker)/glance.*$ - - ^manifests/profile/(base|pacemaker)/horizon.*$ - - ^manifests/profile/(base|pacemaker)/manila.*$ - - ^manifests/profile/(base|pacemaker)/ceph.*$ # ceph_nfs / ganesha - # tripleo-ansible - - ^tripleo_ansible/roles/tripleo_ceph.*/.* - # tripleo-quickstart-extras (including standalone ceph) - - roles/standalone/tasks/.* - - tripleo-ci-centos-9-scenario007-standalone: &c9_scen7 - <<: *c9_scen1 - files: &scen7_files - # tripleo-common - - ^container-images/tcib/base/os/neutron.*$ - # tripleo-heat-templates - - ^((docker|puppet)/services|deployment)/haproxy-(container|pacemaker)-.*$ - - ^((docker|puppet)/services|deployment)/.*neutron.*$ - - ci/environments/scenario007-standalone.yaml - # puppet-tripleo - - ^manifests/haproxy.*$ - - tripleo-ci-centos-9-scenario010-standalone: &c9_scen10 - <<: *c9_scen1 - branches: stable/wallaby - files: &scen10_files - # tripleo-common - - ^container-images/tcib/base/os/horizon.*$ - - ^container-images/tcib/base/os/octavia.*$ - - workbooks/octavia_post.yaml - - playbooks/octavia-files.yaml - - playbooks/roles/octavia.*$ - - playbooks/roles/common/.*$ - # tripleo-quickstart - - config/general_config/featureset062.yml - # puppet-tripleo - - ^manifests/haproxy.*$ - - ^manifests/profile/base/database/mysql.*$ - - ^manifests/profile/base/horizon.*$ - - ^manifests/profile/base/octavia.*$ - # tripleo-quickstart-extras (including standalone ceph) - - roles/standalone/tasks/.* - - roles/octavia-amphora-download/.* - # tripleo-heat-templates - # TODO(beagles): octavia testing touches neutron, glance and nova. - # It may be sensible to expand this list after it has proven itself. - - ^(docker/services|deployment)/haproxy-(container|pacemaker)-.*$ - - ^(docker/services|deployment)/horizon.*$ - - ^(docker/services|deployment)/octavia.*$ - - ci/environments/scenario010-standalone.yaml - - ^environments/services/octavia.*.yaml - - ^deployment/ceph-ansible.*$ - # python-tempestconf - - ^config_tempest/services/octavia.*$ - # tripleo-ansible - - ^tripleo_ansible/roles/octavia_.*/.* - - ^tripleo_ansible/playbooks/octavia.*$ - - tripleo-ci-centos-9-scenario010-ovn-provider-standalone: *c9_scen10 - - tripleo-ci-centos-9-scenario012-standalone: &c9_scen12 - <<: *c9_scen1 - files: &scen12_files - # tripleo-heat-templates - - ^(docker/services|deployment)/glance.*$ - - ^(docker/services|deployment)/haproxy-(container|pacemaker)-.*$ - - ^(docker/services|deployment)/ironic.*$ - - ci/environments/scenario012-standalone.yaml - # tripleo-quickstart - - config/general_config/featureset060.yml - # puppet-tripleo - - ^manifests/haproxy.*$ - - ^manifests/profile/(base|pacemaker)/glance.*$ - - ^manifests/profile/(base|pacemaker)/ironic.*$ - - tripleo-ci-centos-9-standalone: &cs9_vars - vars: *consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-standalone-fips: - <<: *cs9_vars - voting: false - - gate: - jobs: - - tripleo-ci-centos-9-content-provider: - irrelevant-files: *irrelevant_files - - tripleo-ci-centos-9-scenario001-standalone: *c9_scen1 - - tripleo-ci-centos-9-scenario002-standalone: *c9_scen2 - - tripleo-ci-centos-9-scenario003-standalone: *c9_scen3 - - tripleo-ci-centos-9-scenario004-standalone: *c9_scen4 - - tripleo-ci-centos-9-scenario007-standalone: *c9_scen7 - - tripleo-ci-centos-9-scenario010-standalone: *c9_scen10 - - tripleo-ci-centos-9-scenario010-ovn-provider-standalone: *c9_scen10 - - tripleo-ci-centos-9-scenario012-standalone: *c9_scen12 - - tripleo-ci-centos-9-standalone: - vars: *consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider - -- job: - name: tripleo-ci-scenario012-standalone-options - vars: - featureset: '060' - standalone_ceph: false - featureset_override: - validate_services: false - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario012-standalone.yaml' - -- job: - name: tripleo-ci-centos-8-scenario012-standalone - parent: tripleo-ci-scenario012-standalone-options - -- job: - name: tripleo-ci-centos-8-scenario012-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-8 - branches: &c8_branches ^(stable/train).*$ - -- job: - name: tripleo-ci-centos-9-scenario012-standalone - parent: tripleo-ci-scenario012-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario012-standalone - parent: tripleo-ci-base-standalone-centos-9 - branches: *c9_branches - -# CentOS 8 Jobs -- job: - name: tripleo-ci-centos-8-scenario000-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-8 - branches: stable/train - -- job: - name: tripleo-ci-scenario000-standalone-options - vars: - featureset: '052' - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario000-standalone.yaml' - tempest_services: - - keystone - tempest_run_concurrency: 1 - tempest_tempest_conf_overrides: - 'auth.tempest_roles': "Member" - tempest_test_whitelist: - - 'keystone_tempest_plugin.tests.api.identity.v3' - -- job: - name: tripleo-ci-centos-8-scenario000-standalone - parent: tripleo-ci-scenario000-standalone-options - -- job: - name: tripleo-ci-centos-8-scenario001-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-8 - branches: *c8_branches - -- job: - name: tripleo-ci-scenario001-standalone-options - vars: - featureset: '052' - standalone_ceph: true - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario001-standalone.yaml' - tempest_services: - - aodh - tempest_run_concurrency: 1 - tempest_tempest_conf_overrides: - 'telemetry.alarm_granularity': '60' - 'auth.tempest_roles': "Member" - tempest_test_whitelist: - - 'tempest.api.identity.v3' - - 'tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern' - - 'tempest.scenario.test_snapshot_pattern.TestSnapshotPattern.test_snapshot_pattern' - - 'telemetry_tempest_plugin.scenario.test_telemetry_integration.TestTelemetryIntegration' - - 'tempest.scenario.test_dashboard_basic_ops' - -- job: - name: tripleo-ci-centos-8-scenario001-standalone - parent: tripleo-ci-scenario001-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario001-standalone - parent: tripleo-ci-scenario001-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario001-standalone - parent: tripleo-ci-base-standalone-centos-9 - branches: *c9_branches - files: *scen1_files - -- job: - name: tripleo-ci-centos-8-scenario002-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-8 - branches: *c8_branches - -- job: - name: tripleo-ci-scenario002-standalone-options - vars: - featureset: '052' - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario002-standalone.yaml' - tempest_services: - - barbican - - ceilometer - - aodh - tempest_tempest_conf_overrides: - auth.tempest_roles: "'Member, creator'" - telemetry.alarm_granularity: '60' - tempest_extra_config: - auth.tempest_roles: "'Member, creator'" - telemetry.alarm_granularity: '60' - tempest_test_whitelist: - - 'tempest.api.object_storage.test_object_services.ObjectTest' - - 'barbican_tempest_plugin.tests.scenario.test_volume_encryption.VolumeEncryptionTest' - - 'barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningSnapshotTest' - - 'barbican_tempest_plugin.tests.scenario.test_image_signing.ImageSigningTest.test_signed_image_upload_and_boot' - - 'telemetry_tempest_plugin.scenario.test_telemetry_integration.TestTelemetryIntegration' - -- job: - name: tripleo-ci-centos-8-scenario002-standalone - parent: tripleo-ci-scenario002-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario002-standalone - parent: tripleo-ci-scenario002-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario002-standalone - parent: tripleo-ci-base-standalone-centos-9 - branches: *c9_branches - files: *scen2_files - -- job: - name: tripleo-ci-centos-8-scenario003-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-8 - branches: *c8_branches - -- job: - name: tripleo-ci-scenario003-standalone-options - vars: - featureset: '052' - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario003-standalone.yaml' - tempest_services: - - mistral - - designate - tempest_tempest_conf_overrides: - auth.tempest_roles: "Member" - dns.nameservers: '1.1.1.1' - tempest_test_whitelist: - - 'tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops' - - 'mistral_tempest_tests.tests.api.v2.test_actions.ActionTestsV2' - - 'designate_tempest_plugin.tests.api.v2.test_recordset.RecordsetsTest' - - 'designate_tempest_plugin.tests.api.v2.test_zones.ZonesTest' - -- job: - name: tripleo-ci-centos-8-scenario003-standalone - parent: tripleo-ci-scenario003-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario003-standalone - parent: tripleo-ci-scenario003-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario003-standalone - parent: tripleo-ci-base-standalone-centos-9 - branches: *c9_branches - files: *scen3_files - -- job: - name: tripleo-ci-centos-8-scenario004-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-8 - -- job: - name: tripleo-ci-scenario004-standalone-options - vars: - featureset: '052' - standalone_ceph: true - featureset_override: - standalone_container_cli: podman - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario004-standalone.yaml' - - 'environments/podman.yaml' - tempest_services: - - manila - tempest_tempest_conf_overrides: - 'auth.tempest_roles': 'Member' - tempest_test_whitelist: - - 'tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops' - - 'manila_tempest_tests.tests.api.test_shares.SharesNFSTest.test_create_get_delete_share' - - 'tempest.scenario.test_object_storage_basic_ops' - -- job: - name: tripleo-ci-centos-8-scenario004-standalone - parent: tripleo-ci-scenario004-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario004-standalone - parent: tripleo-ci-scenario004-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario004-standalone - parent: tripleo-ci-base-standalone-centos-9 - branches: *c9_branches - files: *scen4_files - -- job: - name: tripleo-ci-centos-8-scenario007-standalone - voting: true - parent: tripleo-ci-base-standalone-centos-8 - branches: *c8_branches - -- job: - name: tripleo-ci-scenario007-standalone-options - vars: - featureset: '052' - featureset_override: - run_tempest: false - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario007-standalone.yaml' - tempest_services: - - neutron - tempest_test_whitelist: - - 'tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops' - - 'tempest.scenario.test_minimum_basic.TestMinimumBasicScenario.test_minimum_basic_scenario' - tempest_private_net_provider_type: 'vxlan' - use_os_tempest: true - -- job: - name: tripleo-ci-centos-8-scenario007-standalone - parent: tripleo-ci-scenario007-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario007-standalone - parent: tripleo-ci-base-standalone-centos-9 - branches: *c9_branches - files: *scen7_files - -- job: - name: tripleo-ci-centos-9-scenario007-standalone - parent: tripleo-ci-scenario007-standalone-options - -- job: - name: tripleo-ci-scenario010-standalone-options - vars: - # using featureset062 is tech debt and should be addressed at a future sprint - featureset: '062' - standalone_ceph: true - featureset_override: - validate_services: false - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario010-standalone.yaml' - - 'ci/environments/octavia-kvm.yaml' - -- job: - name: tripleo-ci-scenario010-ovn-provider-standalone-options - vars: - featureset: '062' - standalone_ceph: true - featureset_override: - validate_services: false - tempest_tempestconf_profile_overrides: - load_balancer.provider: 'ovn' - load_balancer.member_role: '"Member"' - load_balancer.test_reuse_connection: false - load_balancer.load_balancing_algorithm: 'SOURCE_IP_PORT' - load_balancer.test_flavors: false - loadbalancer-feature-enabled.health_monitor_enabled: false - loadbalancer-feature-enabled.pool_algorithms_enabled: false - loadbalancer-feature-enabled.l7_protocol_enabled: false - loadbalancer-feature-enabled.l4_protocol: 'TCP' - loadbalancer-feature-enabled.session_persistence_enabled: false - loadbalancer-feature-enabled.not_implemented_is_error: false - network-feature-enabled.port_security: true - load_balancer.test_server_path: >- - "/usr/lib/python{{ [ansible_python.version.major, ansible_python.version.minor] | join('.') }}/site-packages/octavia_tempest_plugin/contrib/test_server/test_server.bin" - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario010-standalone.yaml' - -- job: - name: tripleo-ci-centos-9-scenario010-standalone - parent: tripleo-ci-scenario010-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario010-standalone - parent: tripleo-ci-base-standalone-centos-9 - branches: *c9_branches - nodeset: single-centos-9-node-nested-virt - files: *scen10_files - vars: &sc010_vars - tags: - - build - - standalone - - octavia - - nested-virt - -- job: - name: tripleo-ci-centos-9-scenario010-ovn-provider-standalone - parent: tripleo-ci-scenario010-ovn-provider-standalone-options - -- job: - name: tripleo-ci-centos-9-scenario010-ovn-provider-standalone - parent: tripleo-ci-base-standalone-centos-9 - branches: *c9_branches - nodeset: single-centos-9-node - files: *scen10_files - vars: &sc010_ovn_vars - tags: - - build - - standalone - - octavia - -# branched scenario010 based jobs - this will enable the tripleo-ci team -# to enable voting / gating on scenario010 jobs on a per branch basis. - -- job: - name: tripleo-ci-centos-8-scenario010-standalone-train - parent: tripleo-ci-scenario010-standalone-options - -- job: - name: tripleo-ci-centos-8-scenario010-standalone-train - voting: true - parent: tripleo-ci-base-standalone-centos-8 - nodeset: single-centos-8-node-nested-virt - branches: stable/train - vars: *sc010_vars - -- job: - name: tripleo-ci-centos-8-scenario010-ovn-provider-standalone-train - parent: tripleo-ci-scenario010-ovn-provider-standalone-options - -- job: - name: tripleo-ci-centos-8-scenario010-ovn-provider-standalone-train - voting: true - parent: tripleo-ci-base-standalone-centos-8 - branches: stable/train - vars: *sc010_ovn_vars - -- project-template: - name: tripleo-standalone-multinode-ipa-pipeline - queue: tripleo - check: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-standalone-on-multinode-ipa: - files: &tls_ipa_files - # tripleo-quickstart-extras - - ^roles/.*multinode-ipa.*$ - - ^roles/standalone.*$ - - ^playbooks/multinode-standalone-ipa.yml.*$ - # tripleo-heat-templates - - environments/ssl/tls-everywhere-endpoints-dns.yaml - - environments/services/haproxy-public-tls-certmonger.yaml - - environments/services/haproxy-public-tls-inject.yaml - - environments/ssl/enable-internal-tls.yaml - - environments/ssl/enable-internal-tls.j2.yaml - - environments/ssl/enable-memcached-tls.yaml - - environments/ssl/enable-tls.yaml - - ci/environments/standalone-ipa.yaml - - deployment/ipa/ipaservices-baremetal-ansible.yaml - - deployment/apache/* - - deployment/cinder/* - - deployment/database/* - - deployment/glance/* - - deployment/haproxy/* - - deployment/horizon/* - - deployment/keystone/* - - deployment/memcached/* - - deployment/neutron/* - - deployment/nova/* - - deployment/ovn/* - - deployment/placement/* - - deployment/rabbitmq/* - - deployment/swift/* - - deployment/timesync/* - # puppet - - ^manifests/haproxy.*$ - - ^manifests/profile/(base|pacemaker)/database/mysql.*.pp$ - - ^manifests/profile/(base|pacemaker)/haproxy.*.pp$ - - ^manifests/profile/(base|pacemaker)/rabbitmq.*.pp$ - - tripleo_ipa - vars: &ipa_consumer_vars - consumer_job: true - build_container_images: false - remove_tags: - - build - dependencies: - - tripleo-ci-centos-9-content-provider - gate: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-standalone-on-multinode-ipa: - files: *tls_ipa_files - vars: *ipa_consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider - - -- job: - name: tripleo-ci-standalone-on-multinode-ipa-options - vars: &multinode_ipa_job_vars - featureset: '052' - enable_tls: true - playbooks: - - quickstart.yml - - multinode-standalone-ipa.yml - - multinode-standalone.yml - featureset_override: - standalone_environment_files: - - environments/ssl/tls-everywhere-endpoints-dns.yaml - - environments/services/haproxy-public-tls-certmonger.yaml - - environments/ssl/enable-internal-tls.yaml - - environments/ssl/enable-memcached-tls.yaml - - ci/environments/standalone-ipa.yaml - tempest_tempest_conf_overrides: - service-clients.http_timeout: '120' - -- job: - name: tripleo-ci-centos-9-standalone-on-multinode-ipa - parent: tripleo-ci-base-standalone-centos-9 - branches: *c9_branches - nodeset: two-centos-9-nodes - required-projects: - - opendev.org/x/tripleo-ipa - roles: - - zuul: opendev.org/x/tripleo-ipa - -- job: - name: tripleo-ci-centos-9-standalone-on-multinode-ipa - branches: *c9_branches - parent: tripleo-ci-standalone-on-multinode-ipa-options - - -- job: - name: tripleo-ci-centos-8-repoclosure - parent: tripleo-ci-base-standalone-centos-8 - branches: master # this is only wired up in t-q-e - vars: - featureset: '052' - repoclosure: true - playbooks: - - quickstart.yml - - multinode-standalone-repoclosure.yml - -# Ceph nightly jobs run periodically against -# pending bits -- job: - name: tripleo-ci-centos-9-scenario001-ceph-nightly - parent: tripleo-ci-centos-9-scenario001-standalone - files: *scen1_files - vars: &ceph_nightly_vars - standalone_container_ceph_updates: true - docker_ceph_namespace: quay.io/ceph - docker_ceph_image: daemon - docker_ceph_tag: latest-quincy - -- job: - name: tripleo-ci-centos-9-scenario004-ceph-nightly - parent: tripleo-ci-centos-9-scenario004-standalone - files: *scen4_files - vars: *ceph_nightly_vars - -- job: - name: tripleo-ci-centos-9-scenario001-ceph-nightly-wallaby - parent: tripleo-ci-centos-9-scenario001-ceph-nightly - branches: master - override-checkout: stable/wallaby - vars: &ceph_nightly_wallaby_vars - branch_override: stable/wallaby - docker_ceph_tag: latest-pacific - -- job: - name: tripleo-ci-centos-9-scenario004-ceph-nightly-wallaby - parent: tripleo-ci-centos-9-scenario004-ceph-nightly - branches: master - override-checkout: stable/wallaby - vars: *ceph_nightly_wallaby_vars - -################################## -# Standalone Upgrade distro jobs # -################################## - -- job: - name: tripleo-ci-standalone-upgrade-centos-8 - parent: tripleo-ci-base-standalone-upgrade-standard - nodeset: single-centos-8-node - branches: *c8_branches - -- job: - name: tripleo-ci-standalone-upgrade-centos-9 - parent: tripleo-ci-base-standalone-upgrade-standard - nodeset: single-centos-9-node - branches: *c9_branches - -######################################################## -# standalone-full-tempest-scenario & - api options job # -# ###################################################### - -- job: - name: tripleo-ci-standalone-full-tempest-scenario-options - vars: - featureset: '052' - featureset_override: - tempest_run_concurrency: 4 - tempest_services: &tempest_services - - cinder - - horizon - - neutron - tempest_test_whitelist: - - 'scenario' - -- job: - name: tripleo-ci-standalone-full-tempest-api-options - vars: - featureset: '052' - featureset_override: - tempest_run_concurrency: 4 - tempest_services: *tempest_services - tempest_test_whitelist: - - 'api' - -### CentOS-9 FIPS Jobs -- job: - name: tripleo-ci-centos-9-standalone-fips - parent: tripleo-ci-centos-9-standalone - vars: &fips_vars - enable_fips: true - nslookup_target: 'opendev.org' - featureset_override: - enable_fips: true - standalone_environment_files: - - 'environments/fips.yaml' - tempest_tempestconf_profile_overrides: - validation.ssh_key_type: 'ecdsa' - -- job: - name: tripleo-ci-centos-9-scenario001-standalone-fips - parent: tripleo-ci-centos-9-scenario001-standalone - vars: - <<: *fips_vars - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario001-standalone.yaml' - - 'environments/fips.yaml' - -- job: - name: tripleo-ci-centos-9-scenario002-standalone-fips - parent: tripleo-ci-centos-9-scenario002-standalone - vars: - <<: *fips_vars - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario002-standalone.yaml' - - 'environments/fips.yaml' - -- job: - name: tripleo-ci-centos-9-scenario003-standalone-fips - parent: tripleo-ci-centos-9-scenario003-standalone - vars: - <<: *fips_vars - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario003-standalone.yaml' - - 'environments/fips.yaml' - -- job: - name: tripleo-ci-centos-9-scenario004-standalone-fips - parent: tripleo-ci-centos-9-scenario004-standalone - vars: - <<: *fips_vars - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario004-standalone.yaml' - - 'environments/podman.yaml' - - 'environments/fips.yaml' - -- job: - name: tripleo-ci-centos-9-scenario007-standalone-fips - parent: tripleo-ci-centos-9-scenario007-standalone - vars: - <<: *fips_vars - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario007-standalone.yaml' - - 'environments/fips.yaml' - -- job: - name: tripleo-ci-centos-9-scenario010-standalone-fips - parent: tripleo-ci-centos-9-scenario010-standalone - vars: - <<: *fips_vars - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario010-standalone.yaml' - - 'ci/environments/octavia-kvm.yaml' - - 'environments/fips.yaml' - -- job: - name: tripleo-ci-centos-9-scenario010-ovn-provider-standalone-fips - parent: tripleo-ci-centos-9-scenario010-ovn-provider-standalone - vars: - <<: *fips_vars - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario010-standalone.yaml' - - 'environments/fips.yaml' - -- job: - name: tripleo-ci-centos-9-scenario012-standalone-fips - parent: tripleo-ci-centos-9-scenario012-standalone - vars: - <<: *fips_vars - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'ci/environments/scenario012-standalone.yaml' - - 'environments/fips.yaml' - -### CentOS-9 FIPS Jobs - stable/zed - -- job: - name: tripleo-ci-centos-9-standalone-fips-zed - parent: tripleo-ci-centos-9-standalone-fips - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-ci-centos-9-scenario001-standalone-fips-zed - parent: tripleo-ci-centos-9-scenario001-standalone-fips - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-ci-centos-9-scenario002-standalone-fips-zed - parent: tripleo-ci-centos-9-scenario002-standalone-fips - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-ci-centos-9-scenario003-standalone-fips-zed - parent: tripleo-ci-centos-9-scenario003-standalone-fips - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-ci-centos-9-scenario004-standalone-fips-zed - parent: tripleo-ci-centos-9-scenario004-standalone-fips - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-ci-centos-9-scenario007-standalone-fips-zed - parent: tripleo-ci-centos-9-scenario007-standalone-fips - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-ci-centos-9-scenario010-standalone-fips-zed - parent: tripleo-ci-centos-9-scenario010-standalone-fips - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-ci-centos-9-scenario010-ovn-provider-standalone-fips-zed - parent: tripleo-ci-centos-9-scenario010-ovn-provider-standalone-fips - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -- job: - name: tripleo-ci-centos-9-scenario012-standalone-fips-zed - parent: tripleo-ci-centos-9-scenario012-standalone-fips - branches: master - override-checkout: stable/zed - vars: - branch_override: stable/zed - -### CentOS-9 FIPS Jobs - stable/wallaby - -- job: - name: tripleo-ci-centos-9-standalone-fips-wallaby - parent: tripleo-ci-centos-9-standalone-fips - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-9-scenario001-standalone-fips-wallaby - parent: tripleo-ci-centos-9-scenario001-standalone-fips - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-9-scenario002-standalone-fips-wallaby - parent: tripleo-ci-centos-9-scenario002-standalone-fips - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-9-scenario003-standalone-fips-wallaby - parent: tripleo-ci-centos-9-scenario003-standalone-fips - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-9-scenario004-standalone-fips-wallaby - parent: tripleo-ci-centos-9-scenario004-standalone-fips - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-9-scenario007-standalone-fips-wallaby - parent: tripleo-ci-centos-9-scenario007-standalone-fips - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-9-scenario010-standalone-fips-wallaby - parent: tripleo-ci-centos-9-scenario010-standalone-fips - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-9-scenario010-ovn-provider-standalone-fips-wallaby - parent: tripleo-ci-centos-9-scenario010-ovn-provider-standalone-fips - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -- job: - name: tripleo-ci-centos-9-scenario012-standalone-fips-wallaby - parent: tripleo-ci-centos-9-scenario012-standalone-fips - branches: master - override-checkout: stable/wallaby - vars: - branch_override: stable/wallaby - -# Jobs for testing external data plane management - -- job: - name: tripleo-ci-centos-9-standalone-external-compute-target-host - parent: tripleo-ci-base-edpm-centos-9 - branches: - - master - - stable/zed - -- project-template: - name: tripleo-external-compute-deployment-pipeline - queue: tripleo - check: - jobs: - - tripleo-ci-centos-9-standalone-external-compute-target-host: &compute_vars - irrelevant-files: *irrelevant_files - files: &compute_files - # tripleo-ansible - - ^tripleo_ansible/roles/.* - - ^tripleo_ansible/playbooks/.* - - ^tripleo_ansible/inventory/.* - - scripts/tripleo-standalone-vars - # tripleo-quickstart-extras - - ^roles/external-data-plane-management/.* - - playbooks/deploy-standalone-compute.yml - # tripleo-quickstart - - config/general_config/featureset053.yml - vars: *consumer_vars - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider - gate: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-standalone-external-compute-target-host: *compute_vars diff --git a/zuul.d/undercloud-jobs.yaml b/zuul.d/undercloud-jobs.yaml deleted file mode 100644 index 465b88793..000000000 --- a/zuul.d/undercloud-jobs.yaml +++ /dev/null @@ -1,122 +0,0 @@ ---- -# zuul.d/undercloud-jobs.yaml -# Zuul layout for TripleO undercloud jobs. -# It contains all the jobs related to undercloud testing. - -- project-template: - name: tripleo-undercloud-jobs-pipeline - queue: tripleo - check: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-8-undercloud-containers: - irrelevant-files: &undercloud_ignored - - .*molecule.* - - ^.*\.md$ - - ^.*\.rst$ - - ^.ansible-lint$ - - ^.pre-commit-config.yaml$ - - ^doc/.*$ - - ^docs/.*$ - - ^etc/.*$ - - .*.txt$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^spec/.*$ - - ^Puppetfile.*$ - - tox.ini - - ^setup.*$ - - ^roles/build-containers/.*$ - - ^roles/oooci-build-images/.*$ - - ^roles/tripleo-repos/.*$ - - ^playbooks/deprecated/.*$ - - ^playbooks/tripleo-buildcontainers/.*$ - - ^playbooks/tripleo-buildimages/.*$ - - ^vars/sova-patterns.yml$ - - zuul.d/layout.yaml - - zuul.d/build-containers.yaml - - zuul.d/build-image.yaml - - zuul.d/standalone-jobs.yaml - - zuul.d/multinode-jobs.yaml - - zuul.d/upgrades-jobs-templates.yaml - # tripleo-ansible - - ^_skeleton_role_/.* - - ^tripleo_ansible/playbooks/docker-vfs-setup.yml$ - - ^tripleo_ansible/roles/.*/meta.* - - ^tripleo_ansible/roles/test_deps/.* - - ^zuul.d/base.yaml - # unit tests - - ^tripleoclient/tests/.*$ - - ^tripleo_common/tests/.*$ - vars: &undercloud_consumer_vars - consumer_job: true - remove_tags: - - build - dependencies: - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-9-undercloud-containers: &c9_vars - vars: *undercloud_consumer_vars - irrelevant-files: *undercloud_ignored - dependencies: - - tripleo-ci-centos-9-content-provider - - gate: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-8-undercloud-containers: - irrelevant-files: *undercloud_ignored - vars: *undercloud_consumer_vars - dependencies: - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-9-undercloud-containers: *c9_vars - - -# Undercloud Jobs - -- job: - name: tripleo-ci-undercloud-required-projects-upstream - abstract: true - description: | - Base abstract job for undercloud in TripleO CI zuulv3 jobs - parent: tripleo-ci-base-singlenode-standard - -# Distribution Jobs - -# Centos 8 base jobs -- job: - name: tripleo-ci-base-undercloud-centos-8 - abstract: true - description: | - Base abstract job for standalone TripleO CI CentOS 8 zuulv3 jobs. - parent: tripleo-ci-undercloud-required-projects-upstream - nodeset: single-centos-8-node - -# CentOS - 9 base jobs -- job: - name: tripleo-ci-base-undercloud-centos-9 - abstract: true - description: | - Base abstract job for standalone TripleO CI CentOS 9 zuulv3 jobs. - parent: tripleo-ci-undercloud-required-projects-upstream - nodeset: single-centos-9-node - -- job: - name: tripleo-ci-centos-8-undercloud-containers - parent: tripleo-ci-base-undercloud-centos-8 - branches: ^(stable/train).*$ - voting: true - vars: &undercloud_job_vars - featureset: '027' - playbooks: - - quickstart.yml - - multinode-undercloud.yml - - multinode-validate.yml - -- job: - name: tripleo-ci-centos-9-undercloud-containers - parent: tripleo-ci-base-undercloud-centos-9 - branches: ^(?!stable/train).*$ - irrelevant-files: *undercloud_ignored - vars: *undercloud_job_vars diff --git a/zuul.d/upgrades-jobs-templates.yaml b/zuul.d/upgrades-jobs-templates.yaml deleted file mode 100644 index 433af6e3a..000000000 --- a/zuul.d/upgrades-jobs-templates.yaml +++ /dev/null @@ -1,289 +0,0 @@ ---- -# upgrades jobs layouts - content provider jobs -# upgrade jobs for all branches -- project-template: - name: tripleo-upgrades-master-pipeline - queue: tripleo - check: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-current - - tripleo-ci-centos-9-content-provider-zed - - tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates: &cs9_update_all - irrelevant-files: &multinode_ignored - - .*molecule.* - - ^.*\.md$ - - ^.*\.rst$ - - ^.ansible-lint$ - - ^.pre-commit-config.yaml$ - - ^doc/.*$ - - ^docs/.*$ - - ^etc/.*$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^test-requirements.txt$ - - ^setup.*$ - - ^spec/.*$ - - ^Puppetfile.*$ - - tox.ini - - ^roles/build-containers/.*$ - - ^roles/oooci-build-images/.*$ - - ^playbooks/deprecated/.*$ - - ^playbooks/tripleo-buildcontainers/.*$ - - ^playbooks/tripleo-buildimages/.*$ - - ^vars/sova-patterns.yml$ - - zuul.d/layout.yaml - - zuul.d/build-containers.yaml - - zuul.d/build-image.yaml - - zuul.d/standalone-jobs.yaml - - zuul.d/undercloud-jobs.yaml - - zuul.d/multinode-jobs.yaml - # tripleo-quickstart-extras - - playbooks/quickstart-extras-standalone.yml - - roles/standalone/.* - - roles/standalone-upgrade/.* - # unit tests - - ^tripleoclient/tests/.*$ - - ^tripleo_common/tests/.*$ - - ^scripts/undercloud-upgrade-ephemeral-heat.py - - ^scripts/tripleo-mount-image$ - - ^scripts/tripleo-unmount-image$ - vars: &consumer_vars - consumer_job: true - build_container_images: false - remove_tags: - - build - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-current - - tripleo-ci-centos-9-undercloud-upgrade: &cs9_undercloud_upgrade - vars: *consumer_vars - irrelevant-files: &undercloud_ignored - - .*molecule.* - - ^.*\.md$ - - ^.*\.rst$ - - ^.ansible-lint$ - - ^.pre-commit-config.yaml$ - - ^doc/.*$ - - ^docs/.*$ - - ^etc/.*$ - - ^metadata.json$ - - ^releasenotes/.*$ - - ^test-requirements.txt$ - - ^spec/.*$ - - ^Puppetfile.*$ - - tox.ini - - ^setup.*$ - - ^roles/build-containers/.*$ - - ^roles/oooci-build-images/.*$ - - ^playbooks/deprecated/.*$ - - ^playbooks/tripleo-buildcontainers/.*$ - - ^playbooks/tripleo-buildimages/.*$ - - ^vars/sova-patterns.yml$ - - zuul.d/layout.yaml - - zuul.d/build-containers.yaml - - zuul.d/build-image.yaml - - zuul.d/standalone-jobs.yaml - - zuul.d/undercloud-jobs.yaml - - zuul.d/multinode-jobs.yaml - # standalone featuresets - - ^config/general_config/featureset052.yml - - ^config/general_config/featureset056.yml - - ^config/general_config/featureset062.yml - - ^config/general_config/featureset060.yml - # ovb featuresets - - ^config/general_config/featureset001.yml - - ^config/general_config/featureset002.yml - - ^config/general_config/featureset024.yml - - ^config/general_config/featureset035.yml - - ^config/general_config/featureset039.yml - - ^config/general_config/featureset041.yml - - ^config/general_config/featureset042.yml - - ^config/general_config/featureset063.yml - # upgrade/update featuresets - - ^config/general_config/featureset037.yml - - ^config/general_config/featureset051.yml - - ^config/general_config/featureset068.yml - # unit tests - - ^tripleoclient/tests/.*$ - - ^tripleo_common/tests/.*$ - - ^scripts/tripleo-mount-image$ - - ^scripts/tripleo-unmount-image$ - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-zed - gate: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-current - - tripleo-ci-centos-9-content-provider-zed - - tripleo-ci-centos-9-undercloud-upgrade: *cs9_undercloud_upgrade - - tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates: *cs9_update_all - -- project-template: - name: tripleo-upgrades-zed-pipeline - queue: tripleo - check: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-wallaby - - tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates: *cs9_update_all - - tripleo-ci-centos-9-undercloud-upgrade-zed: &cs9_undercloud_upgrade_zed - vars: *consumer_vars - irrelevant-files: *undercloud_ignored - dependencies: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-wallaby - gate: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-wallaby - - tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates: *cs9_update_all - - tripleo-ci-centos-9-undercloud-upgrade-zed: *cs9_undercloud_upgrade_zed - -- project-template: - name: tripleo-upgrades-wallaby-pipeline - queue: tripleo - check: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-current - - tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates: *cs9_update_all - gate: - jobs: - - tripleo-ci-centos-9-content-provider - - tripleo-ci-centos-9-content-provider-current - - tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates: *cs9_update_all - -# No reference to this on any branch used (past Train) -- project-template: - name: tripleo-upgrades-train-pipeline - queue: tripleo - check: - jobs: - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates-train: - irrelevant-files: *multinode_ignored - vars: *consumer_vars - dependencies: - - tripleo-ci-centos-8-content-provider - gate: - jobs: - - tripleo-ci-centos-8-content-provider - - tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates-train: - irrelevant-files: *multinode_ignored - vars: *consumer_vars - dependencies: - - tripleo-ci-centos-8-content-provider - -# -# Minor update jobs -# - -- job: - name: tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates-train - description: | - train tripleo minor update job for centos-8, this is not an upgrade job. - parent: tripleo-ci-base-multinode-centos-8 - branches: ^stable/train$ - voting: true - vars: - nodes: 1ctlr - featureset: '037' - unbound_cache_min_ttl: 900 - extra_tags: - - overcloud-update - -- job: - name: tripleo-ci-centos-9-scenario000-multinode-oooq-container-updates - branches: ^(?!stable/(train)).*$ - parent: tripleo-ci-base-multinode-centos-9 - voting: true - vars: - playbooks: - - quickstart.yml - - multinode-undercloud.yml - - multinode-overcloud-prep.yml - - multinode-overcloud.yml - - multinode-undercloud-upgrade.yml - - multinode-overcloud-update.yml - - multinode-validate.yml - nodes: 1ctlr - featureset: '068' - # Note (dmsimard): This enforces a minimum TTL for DNS records, see - # https://review.opendev.org/#/c/523178/ for context - unbound_cache_min_ttl: 900 - extra_tags: - - undercloud-upgrade - - overcloud-update - -# -# Undercloud upgrade jobs - -- job: - name: tripleo-ci-centos-8-undercloud-ffu-wallaby - parent: tripleo-ci-base-undercloud-centos-8 - branches: ^stable/wallaby$ - voting: true - vars: - featureset: '065' - featureset_override: - validate_services: false - extra_tags: - - undercloud-upgrade - -## CentOS 9 Undercloud Upgrade -- job: - name: tripleo-ci-centos-9-undercloud-upgrade - parent: tripleo-ci-base-undercloud-centos-9 - branches: ^master$ - voting: true - vars: - featureset: '050' - featureset_override: - validate_services: false - extra_tags: - - undercloud-upgrade - -- job: - name: tripleo-ci-centos-9-undercloud-upgrade-zed - parent: tripleo-ci-base-undercloud-centos-9 - branches: ^stable/zed$ - voting: true - vars: - featureset: '050' - featureset_override: - validate_services: false - extra_tags: - - undercloud-upgrade - -## CentOS 8 undercloud upgrade -- job: - name: tripleo-ci-centos-8-undercloud-upgrade - parent: tripleo-ci-base-undercloud-centos-8 - branches: ^master$ - voting: true - vars: - featureset: '050' - featureset_override: - validate_services: false - extra_tags: - - undercloud-upgrade -- job: - name: tripleo-ci-centos-8-standalone-ffu-wallaby - parent: tripleo-ci-centos-8-standalone - voting: true - branches: ^stable/wallaby$ - vars: - playbooks: - - quickstart.yml - - multinode-standalone.yml - - multinode-standalone-upgrade.yml - featureset: '067' - featureset_override: - standalone_environment_files: - - 'environments/low-memory-usage.yaml' - - 'environments/docker-ha.yaml' - - 'environments/podman.yaml' - extra_tags: - - standalone-upgrade