Skip to content

feat: add OCP agent-based and image-based installer roles - #162

Merged
wkulhanek merged 7 commits into
mainfrom
troshka-ocp-installers
Jul 23, 2026
Merged

feat: add OCP agent-based and image-based installer roles#162
wkulhanek merged 7 commits into
mainfrom
troshka-ocp-installers

Conversation

@rut31337

Copy link
Copy Markdown
Contributor

Summary

  • Adds two new Ansible roles for bare-metal OpenShift installation via the Troshka agent template:
    • host_ocp4_agent_installer — Agent-Based Installer (ABI) workflow: downloads openshift-install, generates agent.iso from cluster config, serves it via HTTP, boots nodes through Redfish BMC virtual media, and waits for cluster completion.
    • host_ocp4_ibi_installer — Image-Based Installation (IBI) workflow: downloads the openshift-install IBI variant, generates a site-config ISO, boots a single-node cluster via Redfish, and monitors installation to completion.
  • Both roles support disconnected/mirror registries with custom CA trust bundles, NTP configuration, and /etc/hosts injection via a systemd oneshot MachineConfig.
  • DNS manifest injection removed from roles — now handled upstream by the Troshka agent template.

Test plan

  • Validate agent-based install on a multi-node bare-metal cluster with connected registry
  • Validate agent-based install with disconnected registry and custom CA bundle
  • Validate image-based install on a single-node cluster
  • Verify /etc/hosts MachineConfig applies correctly on bootstrap
  • Confirm BMC virtual media boot and ISO eject work across Redfish implementations

@rut31337
rut31337 marked this pull request as ready for review July 15, 2026 12:28
rut31337 added 5 commits July 15, 2026 07:34
- host_ocp4_agent_installer: Agent-Based Installer for disconnected OCP on Troshka
  - DNS forwarder extra manifest for registry resolution
  - Redfish virtual media boot via sushy-emulator
  - Pull-through registry support for oc-mirror

- host_ocp4_ibi_installer: Image-Based Install for SNO rapid deployment
  - Seed image restore via lca-cli
  - Recert for cluster identity rename
…lution

The DNS forwarder alone isn't enough — OVN/CNI pods need to pull images
before CoreDNS starts. /etc/hosts is available at boot and resolves the
registry hostname for CRI-O immediately.
Use systemd oneshot service instead of ignition append for /etc/hosts
entry. MCO doesn't support ignition 'append' directive — causes
'Append is not supported' error and blocks all MCO reconciliation.

The systemd unit runs Before=crio.service so CRI-O can resolve the
registry hostname at boot, before CoreDNS starts.
- Break long URL lines (>150 chars) in IBI main.yml, eject_iso.yml, and
  agent installer main.yml using folded scalars and extracted variables
- Fix name[template] violations: move Jinja expressions to end of task names
- Add troshka.cloud.project_info to mock_modules in .ansible-lint
- Copy boot_via_bmc.yml and eject_iso.yml into host_ocp4_ibi_installer
  role to resolve load-failure[filenotfounderror] from relative includes
@rut31337
rut31337 force-pushed the troshka-ocp-installers branch from e93ad0c to 0ad951c Compare July 15, 2026 12:38
@wkulhanek
wkulhanek merged commit 32d93ed into main Jul 23, 2026
1 check passed
@wkulhanek
wkulhanek deleted the troshka-ocp-installers branch July 23, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants