feat(dcm_deploy): add optional rootless Podman deployment support#3
feat(dcm_deploy): add optional rootless Podman deployment support#3chadcrum wants to merge 4 commits into
Conversation
7d5ccdf to
4b514ef
Compare
4b514ef to
f3f837b
Compare
Ansible role that deploys DCM as Podman quadlet containers managed by systemd on RHEL 9. Includes optional rootless deployment mode, CI pipeline with Molecule tests, and compose alignment verification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
f3f837b to
595fdb5
Compare
🤖 AI Code ReviewPR Review: #3 — feat(dcm_deploy): add optional rootless Podman deployment support Gate Checks
Findings Summary
Medium Issues
Low Issues
Positive Observations✅ Architecture: Clean separation via internal facts ( ✅ Security: Proper service user setup with ✅ Error Handling: Preflight assertions catch mixed rootful/rootless deployments early with clear error messages. Proper ✅ Testing: New ✅ Documentation: Excellent updates to README.md and CLAUDE.md explaining the feature, path differences, requirements, and limitations. ✅ Ansible Best Practices: All modules use FQCN, proper RecommendationReady to merge. The rootless implementation is well-designed, thoroughly tested, and properly documented. The medium-severity finding about hardcoded subuid ranges is a hardening suggestion rather than a blocker — the chosen range (231072) is unlikely to conflict in practice and follows common conventions. ℹ️ Auto-merge: Skipped — repo not on auto-merge allowlist. |
testetson22
left a comment
There was a problem hiding this comment.
well, I got the bot to work directly from my local repo using my creds without any effort.
|
@testetson22 nice! |
|
Good catch on the subuid range. 231072:65536 is the conventional second allocation slot for rootless podman — collision is unlikely on single-purpose DCM hosts, and any system with custom subuid allocations would need to review these values regardless of whether they're in a variable or hardcoded. The linger check is intentional — avoids a I'll fix the test plan checkbox. |
|
|
||
| ## Deployment Phases | ||
|
|
||
| The `dcm_deploy` role executes in six phases: |
There was a problem hiding this comment.
I think resolve_rootless_vars is missing in the list
|
|
||
| The DCM UI's `APP_BASE_URL` defaults to `http://<ansible_host>:<dcm_ui_port>`. If the UI is accessed via a different hostname, domain, or behind a reverse proxy, override `ansible_host` in your inventory or set `APP_BASE_URL` directly in a custom vars file. | ||
|
|
||
| ### Paths |
There was a problem hiding this comment.
This is related to my previous comment
| # All systemd units active | ||
| systemctl status dcm-*.service |
There was a problem hiding this comment.
Do you also need to document the --user for rootless
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Summary
dcm_rootlessboolean (defaultfalse) for optional rootless Podman deployment — rootful remains the default with zero behavior changeresolve_rootless_varsphase runs first, creating a dedicated user with lingering, subuid/subgid ranges, and setting internal facts that redirect paths, ownership, and systemd scope{{ _dcm_wanted_by }}instead of hardcodedmulti-user.targetbecome_user,scope, andenvironmentdirectives for user-scoped systemd/podman operationsmolecule/rootless/scenario validates template rendering with rootless paths and targetsansible-core>=2.16(required forsystemd_servicescopeparameter)Tested on
RHEL 9.6 (sealusa12) with all providers enabled — 11/12 containers running under user-scoped systemd. ACM provider not started (dummy pull secret, not a deployment defect). Full QE validation: systemd units, file ownership, port publishing, container DNS, health checks, namespace isolation, cgroup hierarchy, SELinux contexts, idempotency, and service restart resilience — all pass.
Jira
FLPATH-4169
Test plan
molecule test— default (rootful) scenario passesmolecule test -s rootless— rootless scenario passesansible-playbook verify_compose_alignment.yml— compose alignmentyamllint -s .+ansible-lint— cleandcm_rootless: true/etc/containers/systemd/🤖 Generated with Claude Code