58 Commits

Author SHA1 Message Date
Cédric Jeanneret
83ad0fdd5b Creates tripleo-validations-package role
Change-Id: I897e63b79b7fb35080b1ea853afe503cd1189800
Story: 2006034
Task: 34683
Task: 34684
Task: 34685
Task: 34686
2019-08-23 14:23:17 -05:00
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
2019-08-23 14:21:14 -05:00
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
2019-08-23 12:11:44 +02:00
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>
2019-08-18 18:44:59 +00:00
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>
2019-08-16 17:06:42 +00:00
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>
2019-08-13 19:02:07 -05:00
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>
2019-08-09 15:33:41 +00:00
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>
2019-08-09 10:32:07 -05:00
Zuul
9d5e6e7877 Merge "Separate tripleo-time into two distinct roles" 2019-08-08 01:43:43 +00:00
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
2019-08-07 15:40:37 +02:00
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>
2019-08-07 07:23:50 -05:00
Zuul
aba4d93e85 Merge "Introduce tripleo-config role" 2019-08-01 18:13:28 +00:00
Zuul
8a815d8ebd Merge "Correct role documentation heading" 2019-07-30 18:27:33 +00:00
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>
2019-07-30 13:02:25 -05:00
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>
2019-07-29 17:06:18 -05:00
Sagi Shnaidman
7b6bd68569 Logindefs role in tripleo-ansible
Change-Id: I61625792cd581b1ccd26cfc63c140151634d1318
2019-07-29 17:06:18 -05:00
Kevin Carter
e413851d8c
Correct role documentation heading
This change updates the role documentation heading to ensure
consistency. These docs were merged using the old name, which
is too long making it hard to read within the openstack
documentation navigation bar.

Change-Id: I277eabfeeafb393ea11379bc0d27d2022f0b04db
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-07-29 16:26:44 -05:00
Zuul
d029ba838b Merge "Add library documentation within roles" 2019-07-28 21:59:43 +00:00
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>
2019-07-24 10:47:34 -05:00
Kevin Carter
7e712a3377
Add library documentation within roles
Roles can have libraries nested within them. This change adds
module documentation to roles whenever the "library" directory
exists. This will ensure all nested libraries are automatically
documeneted.

Change-Id: I7b9d3b1beda62b9941ec9126cb9f3a25a16d74e4
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-07-24 07:34:42 -05:00
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>
2019-07-18 14:14:59 -04:00
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>
2019-07-16 11:46:21 -05:00
Kevin Carter
d9b2ee9f30
Update all role docs to use the ansible autodoc plugin
The ansible autodoc sphinx plugin has been updated to automatically
create role documentation for a given role. Because we can now auto
doc all of our roles, all roles with missing documentation have been
added.

Because the ansible autodoc plugin has been made more functional it
has been renamed.

The role addition playbook has been updated to use the new autodoc
module whenever a role is created.

Change-Id: I806217202884fc744fbb26a754617c0125be2857
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-07-12 20:07:06 -05:00
Kevin Carter
32aed164b9
Add ansible requirement to our docs builds
This change combines the docs and molecule requirements files. This is
being done because the zuul publishing job does not use tox to render
documentation so we're not able to combine the two requirements files
via the tox interface. To ensure we're not creating duplicate
requirements, which could be frustrating to maintain in the future,
we're linking doc/requirements.txt to molecule-requirements.txt and
combining the package lists.

Change-Id: If7977ad06bf0775834a15e6274ae6457e4601fa6
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-07-10 14:29:08 -05:00
Kevin Carter
e25e9c8bc3
Add plugin documentation
This change adds documentation for all of the plugins currently
found in the tripleo-ansible repo. This will provide for much
greater visability into what we're providing and will allow
users and developers to better understand how to consume
the available resources.

Change-Id: I2f5813095cbadd999bc68235278a9da1f883e01e
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-07-09 20:33:27 -05:00
Kevin Carter
560e4cbb75 update example zuul job parent
The zuul job parent was not correct and if someone was following
the documentation importing or creating a new role, manually or
using the automation, their initial commit would not work. This
change updates the parent job name so that its functional on day
one.

Change-Id: Ic614d166451032c1b7b650a4d37a4e3a89afa629
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-07-08 14:12:32 -05:00
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>
2019-07-06 02:31:06 +00:00
Kevin Carter
9127f22996 Remove irrelevant files
This change rmeoves files that serve no purpose. Most of these things
were brought over on the initial role import and were kept for
consistency. Now that we can test the roles and are confident in the
setup it is time to clean things up by removing files and options
that are empty or pointless.

Change-Id: I832c003a36d82cf37d128e5934aeb5448112e6f8
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
2019-07-05 14:33:11 +00:00
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>
2019-07-01 19:48:38 -05:00
Kevin Carter
abcf3726aa Add local testing aids and documentation
This change adds contributing documentation to illustrate how
developers can test roles using molecule on local machines.
To assist in local testing an rc environment file has been
added to the project root which will ensure ansible is
configured to use resources out of this project.

Change-Id: I237f743aa85fac9eb56a4c7aac54a7545cc125db
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
2019-07-01 12:35:21 +00:00
Kevin Carter
bde4cdc250
Update contributiing docs for readability and correctness
The contributing docs have been updated to correct the file name pathing
and to update the basic noted job structure so that it matches what is
currently being executed.

Role title names have been adjusted to make them all uniform.

Change-Id: I6250a6dcf33caef599fe2bc25f90eea3b8d53d1e
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-06-25 14:37:55 -05:00
Zuul
a3cd1feccf Merge "Import the tripleo-transfer role" 2019-06-25 13:31:26 +00:00
Zuul
627f96795a Merge "Import the tripleo-image-serve role" 2019-06-25 12:56:52 +00:00
Zuul
6102bbd937 Merge "Import the tripleo-docker-rm role" 2019-06-25 12:55:03 +00:00
Zuul
a8ed7a1239 Merge "Import tripleo-container-rm role" 2019-06-25 12:52:26 +00:00
Zuul
af3cd79655 Merge "Import tripleo-container-tag role" 2019-06-24 22:32:44 +00:00
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>
2019-06-24 16:19:03 -05:00
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>
2019-06-24 19:38:06 +00:00
Kevin Carter
2135446a35 Import the tripleo-docker-rm role
The docker-rm role is a duplicate role from tripleo-common which provides
for the same things as the tripleo-container-rm. To ensure we're
developing a consistent user experience the docker-rm role was created
as a symlink to container-rm.

The container-rm role was updated drive consistency across roles by
changing the default "container_cli". Now all roles with the container_cli
variable will have the same default.

Because this role is a symlink no new zuul tests were added for this role.
The interface will be exercised via a new scenario in the container-rm role.

Change-Id: I33ecf735af5c5b0a9a0a9f0c650fc2a04f0864a2
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-06-24 14:07:48 -05:00
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>
2019-06-24 14:23:26 -04:00
Kevin Carter
5e55213e45 Import tripleo-container-tag role
This change imports the tripleo-container-tag role and adds testing using
molecule. Tests within this role will be delegated to the host so that
it can natively control both docker and podman containers.

To test this role the "openstack-tox-with-sudo" job is being used which
will allow the job to locally execute against the target node.

Change-Id: I7b30561137cd78b5a3d297fa26115dbfe4458e06
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
2019-06-20 23:12:05 -05:00
Kevin Carter
e83c1490d5
Improve documentation readability
The role documentation titles were too long, and being truncated
in the site sidebar. This change shortens the title names so that
the its easier to navigate the documentation.

An update has been made to the role-addition playbook so that the
new role titles are generated with the shorter length.

Change-Id: Icee3c318ac0049eda586c2696d732415575eaa40
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-06-20 12:08:25 -05:00
Kevin Carter
90eb3366d4 Import tripleo-ssh-known-hosts role
The tripleo-ssh-known-hosts from tripleo-common has been imported
into tripleo-ansible. Role tests have been added using molecule
testing the loading and unloading capbailities of this role.

Documentation hooks have been created showing how the role can
be used.

Change-Id: Id5809909b304860b25233e81bc7abeec3b0d8890
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
2019-06-19 23:06:09 -05:00
Kevin Carter
a503857209
Import tripleo-module-load role
The tripleo module-load-role from tripleo-common has been imported
into tripleo-ansible. Role tests have been added using molecule
testing the loading and unloading capbailities of this role.

Documentation hooks have been created showing how the role can
be used.

Change-Id: Icd788f12e78b0c7cf2545b133df1d0a4b8f80018
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-06-19 20:28:25 -05:00
Kevin Carter
56a6e8cbe8 Import the tripleo-create-admin role
This change adds the "tripleo-create-admin" role from tripleo-common.
This change creates all of the molecule tests required to ensure that
the role is properly exercised using all of it's documented code
paths.

Documentation hooks have been added showing how the role can be
used.

Change-Id: I5649e5af6b18c411d7bbbe230556c04aeddf2795
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-06-20 01:18:11 +00:00
Kevin Carter (cloudnull)
0a24b5f979 Revert "Revert "Import the json_error callback from tripleo-common""
Build dependency problems have been resolved with a change to the location where services are installed.

This reverts commit 8ebd012abc8bb39aded994badcffcd9eecbb9863

DependsOn: Iedbf9d1034ee3396d6cb064c64169c21ebcf3e18
Change-Id: I8603f33ebddf9e032a43eec6192294f815d5591d
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-06-19 18:29:34 +00:00
Kevin Carter
49f66705eb Import tripleo-bootstrap role
This change imports the tripleo-bootstrap role. Variables have been
broken-out into the new role structure which makes this role uniform
with other roles that have been created and imported.

* Molecule tests have been added to exercise this role on fed28 & cent7.

Change-Id: Ia9fe61d1793537796ff3fff8caf07ea7ea0a9dfd
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-06-19 18:29:24 +00:00
Zuul
1a6e7e47ef Merge "Revert "Import the json_error callback from tripleo-common"" 2019-06-19 16:50:36 +00:00
Alex Schultz
8ebd012abc Revert "Import the json_error callback from tripleo-common"
This reverts commit dc2e57b4290fa63e87b3ec8601ca909473503e12.

This broke building because tripleo-common provides json_error.py

Change-Id: I11f04f8128263af5932eef6c172e7d16091deb35
2019-06-19 16:24:53 +00:00
Kevin Carter
be85c6e135 Create an aide role
This change imports the aide content from the tripleo-heat-templates
project and creates a role which can be used throughout the tripleo
project ecosystem.

The role will test in docker containers running both fedora28 and
centos7.

Change-Id: I3a34152dd0cd7363a6f138d6e1c6fd0f062a3ac6
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-06-17 22:16:24 +00:00