206 Commits

Author SHA1 Message Date
apetrich
edfe84f274 Add the undercloud backup ansible playbook
This playbook reflects the same behaviour as the mistral workbook
of the same name.
It adds the functionality discussed on this external bug
https://bugzilla.redhat.com/show_bug.cgi?id=1659888

Change-Id: Icf964c23745941dd596f65e2b0bfa81e515508d0
2019-08-29 10:30:25 +02:00
Zuul
cdde584700 Merge "Choose first node as bootstrap node name/ip" 2019-08-28 16:25:20 +00:00
Zuul
2258e27828 Merge "Add check for string type dport" 2019-08-27 22:48:19 +00:00
James Slagle
eb5bfcf187 Choose first node as bootstrap node name/ip
Previously when Heat was choosing the bootstrap node, it always chose
the first node due to the ResourceGroup ordering.

When it was switched to ansible, the last node was chosen instead due to
unpredictable dict sorting from the inventory.

This patch restores the previous behavior and makes sure the first node
in a group is chosen as the bootstrap node for the both the name
and ip if the sorted_bootstrap_node variable is set.

The variable is used so that the tripleo-heat-templates patch and this
patch can merge, otherwise they'd block each other from merging.

See I6b93f5b0747c5a11d24615a3bbb5516f9be81401 for the
tripleo-heat-templates patch.

Change-Id: I3d595ea5b84f940a3b2dbc69798f69fe03529c10
2019-08-27 11:02:26 -04:00
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>
2019-08-26 17:34:28 +00:00
Kevin Carter (cloudnull)
4d86b5c35c Revert "Update install path for roles and plugins"
This reverts commit bf61a6fc11765f2596faa3c9a26982f0caa6032e.

Change-Id: I2f24738cf7ec13230e1111f4cc209e4843b416a4
2019-08-26 16:37:58 +00:00
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>
2019-08-26 07:57:52 -05:00
Zuul
2485770cdc Merge "Revert "Create ansible environment variables in profile.d"" 2019-08-26 11:40:22 +00:00
Sagi Shnaidman
8371ba8b2b Revert "Create ansible environment variables in profile.d"
This reverts commit 1ac27c39eb3bf01c85daba1ddebe108cc47d1c4f.

Ansible environment enforcing broke logs collection (as any other task
with ansible on this host).
It should have "restored" after the job, not unset.
Change-Id: I34e1125ccdfa0560bd5688f99d788b20d67f646e
2019-08-26 07:36:14 +00:00
Zuul
e328447fbb Merge "Remove static configs for the called playbook from the calling role" 2019-08-25 13:04:01 +00:00
Zuul
07b22be3ec Merge "Restore AllNodesExtraMapData" 2019-08-25 08:35:13 +00:00
Zuul
9dcc7b0a98 Merge "Creates tripleo-validations-package role" 2019-08-23 23:40:07 +00:00
Zuul
aa8a716e82 Merge "Adds tripleo-clients-install role" 2019-08-23 23:39:53 +00:00
Zuul
5968323277 Merge "Create ansible environment variables in profile.d" 2019-08-23 22:30:18 +00:00
Zuul
8592338add Merge "Create tripleo-cellv2 role" 2019-08-23 21:35:07 +00:00
Kevin Carter
2e7ec8ad2b Add check for string type dport
the dport option could be a port number using a string instead of a array or int.
This change ensures our loop is able to properly handle dport options written as
list, string, or int.

Change-Id: I13dbdb2043ad216d1c89801c974508dd9b958cdc
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
2019-08-23 14:49:23 -05:00
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
James Slagle
7137cae523 Restore AllNodesExtraMapData
This commit is the same as I890bbef764b6bae7cb71cfedaff2ce17829737fb, which was
previously applied to tripleo-common, but lost in the migration to
tripleo-ansible.

Commit a7661065743086961b8ef93056b810e7d2a49eda removed the
all-nodes-config.j2.yaml Heat template. This template had the support
for specifying hieradata to merge into the all_nodes hieradata via the
AllNodesExtraMapData.

This commit restores the merge logic so that the merged hieradata from
the parameter value and the calculated hieradata is rendered in
all_nodes.json.

Change-Id: I49948f8d74c3846321af4f423a4891a71d0fabdc
Closes-Bug: #1839546
2019-08-23 11:21:51 -04: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
Giulio Fidente
22f92bfd5d Remove static configs for the called playbook from the calling role
Also fixes indentation for the radosgw keyring and removes some
global overrides which we don't pass from tht

Change-Id: Ic7e72b1d28110305e3b6ed1f65c1a0423bf9db67
2019-08-23 10:32:04 +02:00
Kevin Carter
1ac27c39eb
Create ansible environment variables in profile.d
This change sets our desired ansible options as default environment variables
on systems where the `tripleo-bootstrap` role is executed. This change will
ensure all of our ansible resources are accessible by users of the system,
using the default shell, and are executed in an expected way, mirroring what
we setup within our mistral ansible configuration file.

Change-Id: If5a997dc2698dc286e118289431cc441e3c03199
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-08-22 14:00:03 -05:00
Kevin Carter
8ca1ca46a9
Add firewall pruning and protocal parsing
The original puppet manifest would prune non-persistent firewall rules from
the save file whenever needed. This change reimplements that functionality.

In addition to pruning the original puppet manifest had special protocol
handling for particular types and states. This change also reimplements
that functionality.

These new functions have been added to our molicule tests to ensure we're
validating functionality.

Change-Id: Ibe4bed6b27cb774dabc40e28a61032bc399c2eae
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-08-22 10:33:41 -05:00
Zuul
ef8d3591fa Merge "Remove temporary workaround for hieradata_files" 2019-08-22 00:57:37 +00:00
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
2019-08-21 19:00:58 +02:00
Rabi Mishra
86e93413a4 Remove temporary workaround for hieradata_files
Now that https://review.opendev.org/#/c/675028/ has merged,
we can remove this workaround.

Change-Id: Id110f5c44ea3d8345e847aa33403bdf91dc7bfff
2019-08-19 15:20:36 +05:30
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
Zuul
7d26260867 Merge "Create the tripleo-firewall role" 2019-08-17 23:06:28 +00:00
Zuul
c6f6cba496 Merge "Add kernel package install" 2019-08-16 21:35:38 +00:00
Zuul
a40b1f1a38 Merge "Create tripleo container image prepare role" 2019-08-16 17:24:57 +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
Alex Schultz
1fd9aa8873 Add kernel package install
Add the ability to install additional kernel related packages.

Change-Id: Ie2ec4b81a0c561c9d6f2a9776a2cd6a711c28d83
Related-Bug: #1840180
2019-08-16 09:12:38 -06:00
Kevin Carter
bf83dc8a87 Update jobs resolving runtime issues
The requiurements in tests needs the python package netaddr to wrap
and filter IP addresses, while this package is assumed to be installed
when ansible is installed via the package manager, these assumptions
are not true when installing using pip, like we do in test. This change
ensures that the netaddr package is part of the test environment.

An update has been made to allow the tripleo_container_stop role to
pass one of its tests. The shell command to stop containers was
prefixing the container name which would result in a failure to stop
the given container name in a production environment.

Test packages have been added to the tripleo_ptp molecule tests. These
packages are being added so that we can ensure the test container
images are created with everything assumed to be installed on a running
system.

Change-Id: If704272fb44cff35e7093c5f91ff1b48fd20a91e
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-08-15 23:50:51 +00:00
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>
2019-08-15 17:02:27 -05: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
Zuul
4e1bab6e17 Merge "Remove unused hieradata ansible tasks for datafiles" 2019-08-13 05:34:27 +00:00
Rabi Mishra
fcd980a46c Remove unused hieradata ansible tasks for datafiles
This removes the redundant hierdata tasks from this repo.

Change-Id: Idd487b939295b4b49d2d7ba85973880ca0371fc9
2019-08-12 18:12:27 +05:30
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
9204dbce60 Merge "Inherit calling Ansible's environment when running ceph-ansible" 2019-08-09 14:09:52 +00:00
John Fulton
eca6cd03e7 Inherit calling Ansible's environment when running ceph-ansible
When config-download runs ceph-ansible it does so by calling
Ansible from within Ansible. This change adds a new boolean,
ceph_ansible_inherits_calling_ansible_environment (default:
true), which passes all ANSIBLE_* environment variables to
the nested Ansible execution. If a config-download user
exported a variable, e.g. ANSIBLE_PRIVATE_KEY_FILE, then
they might be surprised if they got to the Ceph installation
and it failed because Ansible was unable to SSH into the
target nodes because it didn't have that environment variable
set. Rather than require the user to know about the nested
execution and use the CephAnsibleEnvironmentVariables parameter,
assume they want the same variables passed.

Required TripleO defaults for ceph-ansible still take precedence
over config-download environment variables; ANSIBLE_ROLES_PATH
still refers to ceph-ansible roles, not config-download roles.
CephAnsibleEnvironmentVariables takes precedence over both the
calling Ansible environment variables and TripleO defaults for
ceph-ansible.

Change-Id: I428f6deb416b540dae552b5fc7a778cbc7505e8c
2019-08-08 06:48:07 -04: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
81029211d4 Merge "Improve local_ceph_ansible_fetch_directory_backup error msg" 2019-08-05 16:24:59 +00:00
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>
2019-08-04 15:12:19 +02:00
Zuul
309ff1bf42 Merge "Updates old references to ceph_docker_* ansible variables" 2019-08-01 20:06:06 +00:00
Zuul
aba4d93e85 Merge "Introduce tripleo-config role" 2019-08-01 18:13:28 +00:00
John Fulton
3d2d6393ea Improve local_ceph_ansible_fetch_directory_backup error msg
Improve error handling if deployer sets the variable for
local_ceph_ansible_fetch_directory_backup to a directory
which ansible cannot write to.

Instead of failing the deployment with a message that the
object has no attribute stat, fail with a message explaining
what happened and how to fix.

Change-Id: Ib13f367b23126df35902a260ab25f99adc898245
2019-08-01 13:01:13 +00:00
Giulio Fidente
edac939ae2 Updates old references to ceph_docker_* ansible variables
Replaces some ceph-ansible variables name to match the changes
introduced with PR #4002

Change-Id: I2923b06665342f3f565d52748bf50d1a66ed9950
2019-07-31 14:11:57 +02:00