Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] upstream ci: Enable deployment tests for ipaserver role. #1218

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rjeffman
Copy link
Member

@rjeffman rjeffman commented Mar 8, 2024

Add support for testing ipaserver role using Azure's infrastructure on PRs and nightly pipelines.

A container with FreeIPA files installed, but not configured, is started and used as target node with Ansible's proper connection (either podman or docker). Configuration to test can be provided through environment variables or by selecting predefined configurations.

Requires #1219

@rjeffman rjeffman added the DRAFT label Mar 8, 2024
@rjeffman rjeffman requested a review from t-woerner March 8, 2024 21:17
@rjeffman rjeffman force-pushed the test_server_deployment_role branch 27 times, most recently from 179e71b to 4709c9b Compare March 9, 2024 16:42
@rjeffman
Copy link
Member Author

rjeffman commented Mar 9, 2024

Here you'll find a successful run of the deployment to a container using ipaserver and the execution of tests/user/test_user.yml.

I still need to add proper tests and write a README for the tests/setup.

@rjeffman rjeffman force-pushed the test_server_deployment_role branch 2 times, most recently from cb06430 to f1f9c03 Compare March 9, 2024 18:58
This patch provides the base for testing ipaserver role using Azure's
infrastructure.

By using containers prepared to thave FreeIPA installed, but
unconfigured, allows the use of a test matrix to test the behavior of
modules in differnt IPA configurations. It also improves tests by
allowing the creation of a test matrix of FreeIPA deployment.

A new pipeline script is provided, which can be used as a standalone
pipeline, os as part of an existing pipeline.

The script 'tests/server_role/inventory.py' is used to create inventory
files for the tests, which should be executed using the existing
'install-server.yml' playbook.

More information on how to generate different inventories can be found
in the accompanying README file 'tests/server_role/README.md'.
When running ansible-lint it tries to load and syntax check the
playbooks it evaluates, and if any of the modules used in the playbooks
can't be found, it fails with a fatal error, as if there was a syntax
error.

By adding a 'requirements.yml' file with all the collections that are
used in any playbook (be it a runtime, test, or development dependency),
forces ansible-lint to install and use the collections in its virtual
environment, successfully parsing the playbook files.

See more at ansible/ansible-lint#4048 and
ansible/ansible-lint#4049.
@rjeffman rjeffman force-pushed the test_server_deployment_role branch from f1f9c03 to a5993be Compare March 9, 2024 19:10
@rjeffman rjeffman changed the title [WIP] upstream ci: Create containers with IPA not configured [WIP] upstream ci: Enable deployment tests for ipaserver role. Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant