Commit Graph

71 Commits (905da0751afe6f9e6086e3b44865032b706d7a5f)

Author SHA1 Message Date
ekultails 905da0751a
Create the tripleo-packages role.
This manages installing, updating, and upgrading TripleO packages.

Story: 2006031
Task: 34668
Task: 34670
Task: 34671

Change-Id: Ib31212da20620b355f2fc196511f168804a008a4
Signed-off-by: ekultails <ekultails@gmail.com>
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Carlos Camacho c3ae6f818a Include the ansible role to run the backup and restore feature
We currently support the backup and restore of the control plane
using ReaR.

This submission adds the boiler plate to start the integration
of the documented ReaR backup and restore using Ansible.

Change-Id: Ie34ff6f49285fc78675d67e289f1507f20f7fb78
4 years ago
Luke Short 2f6cc5cdff Create the tripleo-sshd role
This role configures the sshd service and related
issue and motd banners that are displayed during
SSH login.

Story: 2006023
Task: 34628
Task: 34630
Task: 34631
Change-Id: I1af1b95ede5f2ed61126ef345d4c87d950fa2525
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter a435b717dd
Constrain molecule
This change constrains molecule so we're not pulling in broken or otherwise
incompatible code. Recent changes to upstream molecule have introduced some
instability. To ensure we're always testing with an expected release of
molecule a new upper constraint has been added.

Additionally to ensure we're not creating testing gaps, a modification has
been added to the role addition job definition. This will ensure we're
exercising molecule in the event that any of its requirements change in the
future.

Change-Id: Ib12e9a52ace6d3545757ada6863e58843de99ad9
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter (cloudnull) 1fe4b7f19b Revert "Revert "Update install path for roles and plugins""
This reverts commit I2f24738cf7ec13230e1111f4cc209e4843b416a4.

Depends-On: I1bf74a4fb0adcae632c06b38e06a572ebc434201
Change-Id: I2822aaf51163d38282f9b5f07ee93a4d9c01c9ba
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter (cloudnull) 4d86b5c35c Revert "Update install path for roles and plugins"
This reverts commit bf61a6fc11.

Change-Id: I2f24738cf7ec13230e1111f4cc209e4843b416a4
4 years ago
Kevin Carter bf61a6fc11
Update install path for roles and plugins
This change updates the install path for roles and plugins making it so
these resources are always available whenever `ansible` commands are
invoked.

Change-Id: I00f6a71424882115fa0c765142c03797d9daa285
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Zuul 9dcc7b0a98 Merge "Creates tripleo-validations-package role" 4 years ago
Zuul aa8a716e82 Merge "Adds tripleo-clients-install role" 4 years ago
Zuul 8592338add Merge "Create tripleo-cellv2 role" 4 years ago
Cédric Jeanneret 83ad0fdd5b Creates tripleo-validations-package role
Change-Id: I897e63b79b7fb35080b1ea853afe503cd1189800
Story: 2006034
Task: 34683
Task: 34684
Task: 34685
Task: 34686
4 years ago
Cédric Jeanneret 64d28e6f5f Adds tripleo-clients-install role
This role allows to easily install either all or some of the openstack
clients.

Change-Id: I6fe8f2469207d75e2c7aa6621f6683a1949ac0ca
Story: 2005984
Task: 34433
Task: 34434
Task: 34435
Task: 34436
4 years ago
Martin Schuppert 688ec4c8cd Create tripleo-cellv2 role
This change introduce tripleo-cellv2 role and playbook
create-nova-cell-v2.yaml to simplify the post steps when creating
an additional cellv2 in tripleo. For reference, [1] is the doc
patch providing at the moment the manual steps.

[1] https://review.opendev.org/672744

Change-Id: I288a9217dce948d33d9b47938e7977294d255c7a
4 years ago
Andreas Jaeger 3f18ae40de Switch to promote docs job
We now use a promote job for publishing that avoids building again the
documents after merge. use this here as well.

We can only use the promote jobs when the job run in gate, so use the
same file conditions. To make those easier to sync, get rid of the
special tripleo job and use openstack-tox-docs directly.

For further details about promote jobs, see
http://lists.openstack.org/pipermail/openstack-discuss/2019-August/008610.html

Change-Id: I31fa0d59ce2715abe6c36ecfbca8f6a70aaa60e2
4 years ago
Kevin Carter bb7bc41730 Add securetty role
The securetty role will create the file `/etc/securetty` when an array
of tty's are provided.

Test Matrix:
  - default: runs through the role top to bottom with all default
             settings
  - create: runs through the role with an array of of tty's to
            ensure the role is working as expected.

Story: 2006021
Task: 34618
Task: 34620
Task: 34621
Change-Id: I6b3644cf7aa62c171172f225c25866f89830a233
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Zuul 7d26260867 Merge "Create the tripleo-firewall role" 4 years ago
Zuul a40b1f1a38 Merge "Create tripleo container image prepare role" 4 years ago
Kevin Carter 33669499f9 Create the tripleo-firewall role
This change adds the tripleo-firewall role which will serve as a general
purpose filewall configuration interface. The role will leverage iptables
and ensure a 1:1 compatibility with existing options coming from tripleo
heat templates.

Story: 2006030
Task: 34663
Task: 34665
Task: 34666
Change-Id: Ic6d7462d82c9811e95aedf90b7a9d92700f2ebe3
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter c5f7f2d0d5
Fix ansible test runner
The test runner was setting a default flag for the option
`tripleo_job_ansible_args` which was resulting in tests being
executed in convergence mode. When in convergence mode, a given
secnario is expected because the test will run with extra args,
which are assumed to be scenario specific. This change sets the
default for `tripleo_job_ansible_args` to an empty string which
will ensure the test runner is running all discovered scenarios
when envoked.

Change-Id: I7cd7ded239f32eb8fd2a697b1b42154841712fc2
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter bc9fe7f827
Create tripleo container image prepare role
This change creates a role for  the tripleo heat template content for
"container-image-prepare-baremetal-ansible.j2.yaml". This change will
ensure our task process is tested using molecule and scenario tests
while also streamlining our process.

Test Matrix:
  - default - tests role using all default options
  - build - tests end to end building containers using mock data

A new playbook for docker vfs setup has been added. This was added to
allow some tests to run docker workloads within a local filesystem.
Without this change, docker workloads would fail because docker is
not able to run an overlayfs job from within an overlayfs
environment. This new playbook will be used within our zuul jobs
whenever the variable `docker_enable_vfs`, is set to "true".

Change-Id: Ic6e26eb95734ccf17e42e649b5e5808e1a096a78
Story: 2005985
Task: 34438
Task: 34440
Task: 34441
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter f4c81bd8f8 Add kernel tuning role
This new role will add, load, and modify kernel tuning
options as well as load kernel modules. This role provides
an interface to allow users to customize the kernel
parameters and modules as needed.

Test Matrix:
  - default - Runs through the role top to bottom with all default
              settings
  - extra - uses the available interfaces to customize the deployment.

Story: 2005998
Task: 34503
Task: 34505
Task: 34506
Change-Id: I1b5fb1ce35121107229d66ccd1e49116974f2e8f
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter 9743b73de6 Import Hiera roles
The hiera roles (data and upgrade) have been imported. These roles will now
be tested using molecule which will ensure functionality via multiple
scenarios tests which should provide coverage for all currently available
code path's.

Because these roles use the ip filter from Ansible a change to the test
requirements has been made to include the require python library, netaddr.

Hieradata Test Matrix:
  - Default - Runs through the role top to bottom with all default
              settings
  - hieradata_vars - Rests role include functionality to generate
                     hiera templates
  - per-host - Tests running with hiera config with host specific
               values
  - all-hosts - Tests running through a standard multi-node deployment
                using mock hieradata

Hiera Upgrade Test Matix:
  - Default - Runs through the role top to bottom with all default
              settings

To ensure we maintain coverage for the hieradata and upgrade roles
additional voting scenario jobs have been added to the layout. These
jobs will execute whenever a change is made to either of the hiera
roles ensuring we're not experiencing any regressions on a critical
part of our deployment process.

Story: 2006044
Task: 34726
Task: 34728
Task: 34729
Story: 2006044
Task: 34730
Task: 34732
Task: 34733
Change-Id: I7f9e993735a0347aac12f728393639d88c80ff0f
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Zuul 9d5e6e7877 Merge "Separate tripleo-time into two distinct roles" 4 years ago
Carlos Camacho 27a4d63c85 Add playbook to stop containers
We need to stop several containers on the upgrades workflow.

This submission allows to reduce the duplicated code in THT.
It also handles the case in which we have podman as the CLI
but the containers running with docker.

Change-Id: I4fcc0858cac8f59d797d62f6de18c02e4b1819dc
4 years ago
Kevin Carter 3d4093672a
Separate tripleo-time into two distinct roles
This change converts the tripleo time role into two roles:

  - tripleo-ptp
  - tripleo-timezone

This change will ensure we're able to cleanly install and setup
ptp when needed while also providing a well defined interface
for setting the timezone on systems.

Change-Id: I0a2b2241a38f3d98ac421e6106fb81210961c1f5
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Gael Chamoulaud 047c6b368a Fix molecule reports.html logs capture
This patch removes pytest argument "-s" which is actually the shortcut for
--capture=no.

Change-Id: Iab0933f4ba64cc69dc298c48d1a8aa859067903d
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
4 years ago
Emilien Macchi 96b9fc6540
Introduce tripleo-config role
This basic role will provide an interface to TripleO so we can consume the
ansible-config_template action plugin to generate configuration files.

Change-Id: I4e28be86e28dd227a682362af56833fe97035a88
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter c1e098de6d Create a time role
This change creates a role using the time content from
THT[0]. This role will run through all of the tasks found
within the THT file, and implements molecule tests coving
the functionality.

Test Matrix:
    - default - Runs through the role top to bottom,
                installing and configuring ptp.
    - ntp_stop - Sets up an environment and ensures we
                 properly stop ntpd when directed to.

[0] - https://github.com/openstack/tripleo-heat-templates/tree/master/deployment/time

Story: 2006028
Task: 34653
Task: 34655
Task: 34656
Change-Id: I4c36c5058c901cb4ead5f781082e5f97014221cb
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Sagi Shnaidman 7b6bd68569 Logindefs role in tripleo-ansible
Change-Id: I61625792cd581b1ccd26cfc63c140151634d1318
4 years ago
John Fulton d762e27dc7 Add molecule test structure to ceph roles
Add molecule test structure for each ceph role. Also
add missing doc/*tripleo-ceph-*.rst files.

Local test setup changes have been made in support of
these roles.

Change-Id: I43b828d5c892a0b33c7a3cbae4034267ce493dc0
Task: 34717
Task: 34718
Task: 34719
Task: 34720
Story: 2006041
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Luke Short 7f726d8cf8 Import the tripleo-persist role from tripleo-common.
The role will now also be tested with Molecule on CentOS 7 and
Fedora 28 docker containers.

Change-Id: Ic6dfaa56317c68779a50cea63bbf85b9d663184c
Signed-off-by: Luke Short <ekultails@gmail.com>
4 years ago
Kevin Carter 9912b049e9
Create a podman role
This change creates a role using the podman content from
THT[0]. This role will run through all of the tasks found
within the THT file, and implements molecule tests coving
the functionality.

Test Matrix:
  - default - Runs through the role top to bottom
  - install - Runs only the install portions of the role
  - login - Runs only the login portion of the role

[0] - https://github.com/openstack/tripleo-heat-templates/blob/master/deployment/podman/podman-baremetal-ansible.yaml

Task: 34598
Task: 34600
Task: 34601
Story: 2006017

Change-Id: Ia7fd611320d2f29b330a04484dca3146d74d8d82
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Zuul bd6980b634 Merge "Tweak the role-addition tox job" 4 years ago
Andreas Jaeger fb53e21367 Fix docs Zuul jobs
The project uses a variant of build-openstack-tox-docs for building
documentation, the publishing job for this is
publish-openstack-tox-docs. Use this publishing job in post queue
instead of the obsolete publish-openstack-sphinx-docs which fails in
this repo since it does not match the build job.

Also, use the release-notes-jobs-python3 instead of adding individual jobs,
this allows updating in a central place. The template does exactly the
same what the jobs do.

Change-Id: I107009c361b594c2493b09fec4e5bc687f103171
4 years ago
Kevin Carter e5d7a71744
Remove filters on post jobs
This change removes the filters on the post jobs because
post jobs dont have the filter data available to them.

Change-Id: I56b59702023e72d79cd6bac15667f696266c84e7
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter 2da35e938a Add post job filters
There's no need to run the post jobs on every commit. This change
adds filters so that the post jobs run when needed

Change-Id: I51b4cc721197caeeb3fc9699a8517693f0c73fd6
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter 7a96ecdcaa Add post job for sphix docs
In order to post new documentation we need to have a post job run.
This change adds the sphinx post job needed to publish documentation.

Change-Id: I78c5371fddd23d88630daac1ba7e78e63069d082
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter c4dd049270 Tweak the role-addition tox job
The role-addition tox job used to make the assumption it would install
docker and run a molecule test, however, due to the fact we're
transitioning away from tox jobs that can modify the underlying
system, the tox environment has been tweaked so that it no longers
makes the assumption docker will be installed via tox.

The tox job will now check for a valid connection to docker or podman
before attempting to run a molecule test against the pseudo role. In
the Zuul environment docker will be present when the resource is
provisioned via the tox-molecule job parent. In a local test
environments, a valid container runtime will need to be deployed,
which documented in the contributing guide. If the role-addition
tox environment is not able to connect to docker or podman a notice
will be displayed linking to the contributing documentation.

The job definition has been updated to ensure it runs anytime the
tox.ini file is changed. This was done because the tox.ini file
is the only mode of execution for this job.

Change-Id: I277edc265e7cd885af55bbf64bbc5e4fda058950
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter 09b1805e5f Convert tox to native zuul
This change converts the TripleO-Ansible test process to using native zuul.
After a long discussion about the current test process [0] it has been
determined that most folks using tox do so on a local workstation and
would not expect the local system to be modified when envoked.

To ensure we're not creating a situation where a developer runs tox with a
job that may require modifications of the system the current test
structure has been replaced with a native zuul `base` job.

> This change opens the door for us to add tox jobs later which may be
  added in support of the native jobs we're running now.

> The test_json_error role was updated to set required configuration
  for that specific role, which was being passed in via tox before.

Documentation has been added to the contributing section to highlight
the role development process and how folks can test things locally using
a script which will mimic the zuul job runtime.

[0] - http://eavesdrop.openstack.org/irclogs/%23tripleo/latest.log.html#t2019-06-27T14:01:13

Change-Id: Ia1f3d479f3ac447d125169d08c78aaccfeacea3a
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter 8e67d654bf Add legacy variable scenario tests
This change adds scenario tests for legacy variables across all roles
which use derived variables from legacy, un-namespaced, options.

Task: 34742
Story: 2006049
Related-Bug: #1834283
Change-Id: I18b6be271331e59ff66741a958b27d7f044f42ab
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter 7ac1086ff5
Add sphinx_python to the reno jobs
We need to set the version of python we use for the reno jobs so
that its able to run the pre-setup tasks. This issue is being
worked on upstream [0][1], however, until those changes are
merged we'll need to carry these vars.

[0] https://review.opendev.org/#/c/668954
[1] https://review.opendev.org/#/c/669008

Change-Id: Idd4edf2173dd62112e27ec2501b3f8ccb4c4427e
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Zuul 1f2a301086 Merge "Update jobs so we're targeting only what we need" 4 years ago
Kevin Carter 71aa1abc86 Update jobs so we're targeting only what we need
This change updates our jobs so we're only running jobs that are
required based on the proposed changed. To ensure we're doing
everything possible to conserve gate resources the layout has
been updated to be more targeted.

* The layout was updated, removing the docs and realsenote templates. This was
  removed because templates can not be augmented at the project level and we
  only want those jobs to run when required.
* Scenario job will only run when something changes in the core project and
  now filter "irrelevant-files". At this time irrelevant files are anything
  within the molecule testing structure and documentation files.
* The check pipeline will now fail fast. If anything in the gate check fails
  all pending or queued jobs will be terminated giving the developer
  rapid feedback on what is wrong. While this option could end up requiring
  developers to make multiple commits, faster feedback should help developers
  fix problems more quickly, especially as we add long running scenario jobs.

Change-Id: I830532ca78855f29dffb05bbaf3c688c8d50f7ff
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Zuul 8ff639fda9 Merge "Enforce testing consistency" 4 years ago
Kevin Carter 7c23a01bd7
Enforce testing consistency
The upstream OpenStack gate installs docker using the "install-docker"
from within the zuul-jobs repository. To ensure we're able to test role
consistently this change removes our internal docker install tasks
and simply uses the role as provided by zuul.

All of the requirements we were installing for molecule via built in
tox configuration  have all been moved to the unmanaged requirements
file, "molecule-requirements.txt". This file will ensure anything we
install in a virtual-environment is consistent throughout our stack.

The `run-local-test` script has been added to the scripts directory
allowing local development to be setup and executed with minimal,
to no, pre-configuration or setup. This script and its usage has
been documented in the contributing guide.

Change-Id: If7d1ba7e59a1d6918d9606c9df8bfad21c0c47da
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Sagi Shnaidman a3be1b63b7 Add standalone jobs to gate tripleo-ansible
Run jobs according to their coverage of tripleo-ansible roles,
use standalone004 scenario as covering all standalone.

Change-Id: Ib0fcae4670d0c39a6c85e788072af0751ed3c9a7
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Sagi Shnaidman 9df7d3573e Add standalone 001 job to gate tripleo-ansible
Change-Id: Ie0b5d41ac8d83864ef3913479906f5ea9abd928d
4 years ago
Kevin Carter 335b5da82f
Import the tripleo-transfer role
The tripleo-transfer role from tripleo-common has been imported.
This role will now be tested with molecule running in containers
allowing us to validate the role functionality on CENT7 in a mock
multi-node setup.

Change-Id: If34709e5bd2f3a50ad673c1c6744379476c06d1c
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Kevin Carter fb866f7319 Import the tripleo-image-serve role
The tripleo-image-serve role from tripleo-common has been imported.
This role will now be tested with molecule running in containers
allowing us to validate the role functionality on both CENT7 and
F28.

Change-Id: I56a390f05193c7c004b7c1254575bddbb9d027fc
Signed-off-by: Kevin Carter <kecarter@redhat.com>
4 years ago
Luke Short 1db5553f09 Import tripleo-container-rm role
Also add Molecule tests. The sudo test environment is required
to run tests with docker and podman.

Change-Id: I434a822ac071b8a2fb6f54ddf4c03ac7450fccc6
Signed-off-by: Luke Short <ekultails@gmail.com>
4 years ago