70 Commits

Author SHA1 Message Date
Luca Miccini
8ae5da5c07 Fix triple_ipa_setup typo
Our jobs have been failing with:

"ERROR! the role 'triple_ipa_setup' was not found"

This commit should hopefully address that.

Change-Id: Icef739a7e57d640ace151b88a660af6b82ac93bc
2022-08-04 07:19:26 +02:00
Zuul
f541d9acc2 Merge "Update to new quay.io images" 2022-08-03 18:43:13 +00:00
Grzegorz Grasza
e404fe19a8 Update to new quay.io images
This updates the freeipa-server image to fedora-36 and
molecule images to stream9.

Change-Id: I026207760d917524cee69dddd41448f3bc0245d2
2022-08-03 09:51:26 +02:00
Grzegorz Grasza
31452d63c6 Move linters to a separate job
Currently the molecule job runs extra python and linter checks.
This modifies it to run only molecule and adds the missing
linter job.

Change-Id: I8ae7ca2a134a55e99af995055748ebfcf2444fc5
2022-08-02 15:41:20 +02:00
afariasa
fa63e4f3d9 Replacing community.general ipa modules with ansible-freeipa
The community.general ipa modules used in tripleo-ipa don't work
under FIPS deployment. This patch is fixing that by replacing it
with the ansible-freeipa ipa modules.

Co-Author: Ade Lee <alee@redhat.com>
Co-Author: Grzegorz Grasza <xek@redhat.com>
Change-Id: Ibfd1b34fdf3d533579512f531ac8619b356f9ba0
2022-08-01 11:04:01 +02:00
Grzegorz Grasza
6c0dc79e0d Update python testing as per zed cycle testing runtime
In Zed cycle, we have dropped the python 3.6/3.7 testing
and its support.

https://governance.openstack.org/tc/reference/runtimes/zed.html

Change-Id: I84be669b6c5cfd16aafddf6660cb53bd5c24aab7
2022-07-19 17:26:37 +00:00
Grzegorz Grasza
696cbf06fa Migrate to centos-9-stream to fix CI errors
This also tries to read the nameservers from NetworkManager.

Change-Id: I772b5554f3bb73bdd146e89632d11241d7a18fa3
2022-07-19 17:11:09 +02:00
Zuul
e411bb5fc8 Merge "Collect IPA Server logs" 2022-02-10 21:22:07 +00:00
David Sedgmen
58ff773a91 Collect IPA Server logs
Modified zuul post playbook to collect all the ipa server logs
to enable of debugging when tests fail because errors in IPA

Change-Id: Icf8dba4c70e8903060c58dc77e0e67dd21e97284
2022-02-10 02:15:44 +00:00
Zuul
1440e87967 Merge "Add_ipa_user.yml: Adds logical to concatenate services with role" 2022-01-21 15:44:49 +00:00
David Sedgmen
6d63314d1d Add_ipa_user.yml: Adds logical to concatenate services with role
The ipa_role explicitly sets the privileges to the list of services
provided instead of appending. So if a list of every service assigned
the role it will remove them. This will break intergrations with other
underclouds if more than one is integrated with IPA.

Change-Id: I38e10fe0bbd2503a5b2b67a99c47eeb2f8152395
Closes-bug: #1943810
2022-01-19 17:25:25 -05:00
frenzyfriday
273019ed22 Adds tripleo-standalone-multinode-ipa-pipeline to templates
Change-Id: I5c0cd95a4872e9a5cdd629ba0e5dcba33a792a23
2022-01-13 13:32:07 +00:00
Zuul
ebcb5625cc Merge "Correct the tox option for skipping sdist generation" 2021-12-16 17:23:57 +00:00
Sagi Shnaidman
d670474d36 Use podman for testing with molecule
Change-Id: I9950d2eedb94abfd478456211800b4f8b5f78411
2021-11-23 10:02:52 +02:00
Zuul
c3ee5fd647 Merge "Use allovercloud ansible group" 2021-11-09 06:12:11 +00:00
Cédric Jeanneret
dfc1adf6a0 Use allovercloud ansible group
With certmonger management moving to ansible, we lose the
"certmonger_user" service, hence the ansible inventory group.

We can therefore use the "allovercloud" group instead - it will clean
the OC nodes while preserving the undercloud node.

This patch also drops the "loop" setting the "hosts_list" fact in favor
of a more efficient |map() filter.

Resolves: rhbz#2017849
Change-Id: Icd662f74fc40bb6c1b5e4e01a236e1994ca3cc83
2021-11-08 23:28:10 +01:00
Brendan Shephard
04944c4e4f Fix role issues for Ansible 2.11
Resolve ansible-lint issues in the role.

Move all to Ansible 2.11 testing, since new molecule
works with collections and TripleO will use Ansible 2.11/2.12
for deployment from Wallaby.

Use FQCN for Ansible collections.
Co-Author: Brendan Shephard <bshephar@redhat.com>

Change-Id: I35a94d3d6335a5589a1b4ed6f3c5c599ccc59eda
2021-10-18 12:29:44 +03:00
Grzegorz Grasza
63d70bb457 Don't use upper-constraints with molecule
There is a conflict with pluggy:
molecule depends on pluggy<1.0 and >=0.7.1
The user requested (constraint) pluggy===1.0.0

Until molecule is fixed to work with openstack upper-constraints,
lets drop this configuration for molecule.

Change-Id: Ic7500dd7314363dcba4adb1082dc6c210d582df0
2021-10-04 10:38:06 +02:00
Jeremy Stanley
62dc60b7e4 Correct the tox option for skipping sdist generation
The tox option to skip source distribution building is skipsdist,
but this seems to be often misspelled skipdist instead, which gets
silently ignored and so does not take effect. Correct it
everywhere, in hopes that new projects will finally stop copying
this mistake around.

See https://tox.readthedocs.io/en/latest/config.html#conf-skipsdist
and https://github.com/tox-dev/tox/issues/1388 for details.

Change-Id: Ibaf0c26125319f655d0deb34358daf873aefdf6c
2021-06-17 17:19:28 +00:00
Ade Lee
9159108b31 Use value in default.conf instead of ansible_fqdn
ansible_fqdn can give us a bad value in the standalone CI job.
The right value to get the principal is the one ipa knows about -
which is in default.conf.  Use that instead.

Also, re-added the standalone to the check jobs.
Change-Id: I1852c8b745f3398154878396778487c901b0cccc
0.2.2
2021-04-21 15:27:25 -04:00
Ade Lee
b592a6479f fix in case of expired kerberos ticket
If we attempt the registration with an expired ticket, the attempt to
find existing systems fails.  With the current code, this can result in
an attempt to re-create an existing host, resulting in problems on
stack updates.

To ensure we always have a valid ticket, we now do a kdestroy and kinit
before the first ipa invocation.  We will also output the result of the
host show command to alllow errors to be diagnosed more easily.

Change-Id: Id5f38d89a3c358288ff8dd21d718c161e03d9e36
0.2.1
2021-04-06 11:13:59 -04:00
Grzegorz Grasza
03f636c129 Skip entries not in cloud_domain
Adding a host without a domain or with a different domain
caused failures with tls everywhere enabled. This patch
checks if the domain ends with cloud_domain to determine if
it should be managed by tripleo-ipa.

Change-Id: I15d72e95705cc77e40b4b74fb9320478c3fa5188
Closes-Bug: #1889105
Resolves: rhbz#1869174
2021-03-17 18:52:32 +00:00
Grzegorz Grasza
e65f11baed Fix lint and molecule jobs after release of cryptography3.4
Molecule job fails with:

ModuleNotFoundError: No module named 'setuptools_rust'

This error appeared following the release of cryptography 3.4, which
now includes Rust code. It can be installed without Rust using a
Python wheel, but only with more recent pip than version 9.0.3
available as RPM on CentOS 8.

The cryptography bug report [1] recommends pip>=19.1.1

The new pip is not supported on Python 2 / CentOS 7, so this change
also upgrades to CentOS 8 images.

This change also upgrades and fixes the ansible-lint job dependencies
and configuration.

[1] https://github.com/pyca/cryptography/issues/5753

Change-Id: I923020e7ec1f2ecbd7089096f22dd92fb36254a5
2021-03-17 14:42:12 +01:00
Rafael Folco
c77c8d352d Switch to content provider template
Jobs share the produced artifacts.

Change-Id: I8e14d5aa0a55d58a4ceb90075c8f15f4aebe27b0
2020-10-29 14:49:54 +00:00
Dave Wilde (d34dh0r53)
8c04d49953 Pin ansible to less than 2.10.0
The move to collection based community modules is currently not
compatable with the call to ipa_role.  This pins the ansible version
to a working version.

Change-Id: Ie495f8110245d723180bd57a572687c0b22166b0
Closes-Bug: 1901547

Fix gpg error when installing container.io

This change fixes the following error while manually installing
container.io:
"Failed to validate GPG signature for containerd.io"

Change-Id: I7ea0e55044d63d08206adb29905403982c7b13f8
2020-10-29 09:28:03 -05:00
Zuul
3ff39d004b Merge "WIP: Namespace host_otp variable" 2020-09-22 22:16:49 +00:00
Zuul
3bb3c536f5 Merge "trivial: spell out otp" 2020-08-05 16:58:39 +00:00
Lance Bragstad
3ea3550d8c WIP: Namespace host_otp variable
By namespacing the variable with the project name, we clarify what
exactly we're providing if people want to invoke the
ipa-server-register-undercloud.yaml tasks from another ansible playbook
and fish the OTP out using a variable name.

Change-Id: If053250937ce76705cdd5084d76869edca8404ce
2020-07-20 10:28:13 -05:00
Zuul
38b357df5b Merge "trivial: update playbook name in documentation" 2020-07-16 19:58:59 +00:00
Zuul
1327cdced7 Merge "Use appropriate permissions for the keytab" 2020-07-16 19:22:01 +00:00
Lance Bragstad
387e3aab4b trivial: spell out otp
While otp is common language for folks who work regularly with identity
systems, we could be more clear for a wider audience. Update the
registration task name to spell out password.

Change-Id: I6c9e7fc93832c3ea0a02cf19a8c4d210b7b3d0b6
2020-07-16 18:09:54 +00:00
Lance Bragstad
3766c44e66 trivial: update playbook name in documentation
Change-Id: Ib721bde6fd260cffc782f2338dd7e990a3a5d5dc
2020-07-16 18:09:41 +00:00
Zuul
aba1ba2415 Merge "Add param to optionally install packages in ipa_client_install" 2020-07-16 16:26:02 +00:00
Lance Bragstad
d3d47118db Use appropriate permissions for the keytab
A recent bug [0] and fix upstream no longer ensures that we use the
tripleo-admin user as the ansible_ssh_user when invoking ansible
playbooks against the undercloud. This means we need to update the
keytab group to something else. Using root makes sense because the user
invoking the overcloud installation should already have root access.

In addition to changing the group, this patch updates the appropriate
tasks so there run with `become: true`, allowing them to access the
keytab.

[0] https://bugs.launchpad.net/tripleo/+bug/1884123

Partial-Bug: 1886870

Change-Id: I523d17f48b8e49e28a1b3becfd5e0cdf044ff742
2020-07-16 08:18:57 -05:00
Ade Lee
fcea48ac21 Add param to optionally install packages in ipa_client_install
Add the parameter tripleo_ipa_client_install_packages, which defaults
to true, to control whether ipa_client packages are installed as part
of the ansible-freeipa call for ipa-client-install.

Change-Id: I01965fdb3908f128f2a36e6f5c3562d555ad9a9e
2020-07-15 16:39:55 -04:00
Grzegorz Grasza
3f7a8c0347 Fix missing virtualenv in molecule tests
centos-8: Setup test-python task fails with:
Failed to find required executable virtualenv.
This was dropped recently in the base image, so we need
to handle this ourselves. We also need to make sure
tox is available in test-python so that we can invoke
molecule.

Change-Id: I200d64103bee540076551fd026cc8f4c21b40411
2020-07-15 12:30:58 -05:00
Dave Wilde (d34dh0r53)
c22fc8d07d Playbooks to configure IPA server for tripleo use
These playbooks are intended to be run against a pre-existing IPA
server and will create the correct roles, permissions and users for
use with tripleo.  The final playbook will provide an OTP to be used
during the configuration of the undercloud.

Change-Id: I2f1c39bc023491f19b917c1a6030937fee3eb101
2020-06-09 10:36:42 -05:00
Lance Bragstad
d2eb700ce1 Add a reasonable default incase certmonger user isn't set
Change-Id: I4a7e06c302417424c239145593b38527efa636a0
2020-06-02 10:30:48 -05:00
Zuul
79862dd765 Merge "add tripleo-multinode-ipa to check" 2020-05-16 20:32:37 +00:00
Grzegorz Grasza
9867a4c2dc Replace install-docker with ensure-docker
This role has been renamed.

Change-Id: I971485e4e39b5fb505f936a3b6ffc38b25bf6a4b
2020-05-15 15:36:51 +02:00
Wes Hayutin
547191c671 add tripleo-multinode-ipa to check
this job is currently non-voting.
Before proceeding with further integration
work it will need to moved to voting / gating

Change-Id: I6b263ea67947dd86cec763abcc6708169b4c616f
2020-05-13 10:43:17 -06:00
Zuul
b39eae94a6 Merge "Safely recreate hosts if they're not enrolled" 0.2.0 2020-05-01 16:00:27 +00:00
Dave Wilde (d34dh0r53)
2dabb1f65f Check on module name
Between train and master there are some naming conventions in module
names that have changed, this will pick which ever exists on the
system.

Change-Id: I618fb2dab301641e19d1a849a5711106dedbb2d2
2020-04-30 11:00:41 -05:00
Lance Bragstad
b10095c64e Safely recreate hosts if they're not enrolled
When we create hosts in IPA, we check to see if the keytab attribute of
the host is present. If it isn't, we assume the host isn't enrolled. We
should also check to make sure the host doesn't exist in FreeIPA. This
gives us the opportunity to clean up the existing host before attempting
to recreate it (and failing, or ignoring errors).

We need to recreate the host if it hasn't already been enrolled because
we need to know the OTP (given to us when we create the host) to enroll
the host as an IPA client later in the installation process.

This helps make tripleo-ipa more robust against host that are in a bad
state, where something went wrong on a previous deployment after the
host was created and before it was enrolled.

Change-Id: Ie31b2e49296563962d0c5985a13faf18a34f93da
2020-04-30 13:44:12 +00:00
Grzegorz Grasza
74ee9e5268 Do not install dependencies in undercloud-ipa-install
These are already dependencies to the ansible-triplo-ipa
RPM package.

Change-Id: I991c9a678866974ef22e529e31d909569624a853
2020-04-27 11:59:33 +02:00
Zuul
f23f48031b Merge "Conditionally decode hosts" 2020-04-21 20:54:37 +00:00
Lance Bragstad
d2e3b35c02 Conditionally decode hosts
TripleO was using python2 up to stable/train. This means we can
.decode() strings, which we did with hosts for hostnames. With python3,
we no longer need to do this and tripleo master is using python3.
Instead, we need to detect this case and handle it appropriately.

Change-Id: Icc211f5b685ec9df06cd25d6af3b28a5db4df590
2020-04-21 18:59:36 +00:00
Grzegorz Grasza
4f2b9c8ed8 Add molecule tests
This adds extra hosts in the deregister scenario and verifies
that those extra hosts and services are not deleted from IPA.

Change-Id: I90d73d3995d478e58bcf79e56a0987cf1a119a51
2020-04-17 14:12:44 +02:00
Ade Lee
668d971ceb Remove argumnet for principal from cleanup_ipa module
We already assume that the principal is of the form nova/<host>.domain.
No need therefore to pass that in as we can read host and domain from
default.conf.

This makes what we need to pass into the templates simpler.

Change-Id: Ibcb087dcd11c71429cd050f2784aedff31c3661b
0.1.1
2020-04-08 12:57:13 +02:00
Grzegorz Grasza
b92b9b81ec Don't use cloud_name to determine the zone name for DNS
We don't want to use the cloud_name because we do not know what
the cloud name is when we do a stack delete.  The new code
calculates the zone name the same way that the code that
deletes dns entries does.

Change-Id: I4c84c006a4ea9a5c51230fdeff9af000b4f703e4
2020-04-07 13:28:10 +02:00