Sitelet https://github.com/rh-ecosystem-edge/enclave/pull/563
Skip to content

Add Enclave virtualized installation skill - #563

Merged
eurijon merged 8 commits into
mainfrom
feature/install-virtualized-skill
Jul 24, 2026
Merged

eurijon merged 8 commits into
mainfrom
feature/install-virtualized-skill

Conversation

@eurijon

@eurijon eurijon commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add Claude Code skill (/install-virtualized) that deploys Enclave on bare-metal
hosts using dev-scripts, following the CI e2e-deployment workflow exactly.

  • Supports connected and disconnected (air-gapped) deployment modes
  • Attended or unattended installation (unattended by default)
  • Dynamically reads CI workflow files each invocation to stay in sync
  • Progress bar with live log monitoring for long-running steps
  • Day-2 addon option for existing deployments
  • Prerequisites validation, failure diagnostics, and cleanup support
  • Warning displayed that this is not a supported installation method

Test plan

  • Verify /install-virtualized skill loads after restart
  • Test attended and unattended modes
  • Deploy to a bare-metal host (connected and disconnected)
  • Verify progress bar and log monitoring
  • Test failure handling and cleanup
  • Test day-2 plugin/experience installation

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@eurijon, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 17 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 90079dda-0330-4d23-ae5d-2b51a88f9582

📥 Commits

Reviewing files that changed from the base of the PR and between 3692b6e and 9e26e44.

📒 Files selected for processing (1)
  • .claude/skills/install-virtualized/SKILL.md

Walkthrough

Adds a new .claude/skills/install-virtualized/SKILL.md skill that derives an RHSE virtualized lab workflow from CI sources, guides host setup and deployment over SSH, supports day-2 installs and cleanup, and defines failure diagnosis and self-update procedures.

Changes

Install-Virtualized Skill Definition

Layer / File(s) Summary
Skill front-matter and interaction rules
.claude/skills/install-virtualized/SKILL.md
Defines skill metadata, allowed tools, invocation behavior, warnings, and standardized interactive prompts.
Workflow discovery and CI preflight
.claude/skills/install-virtualized/SKILL.md
Derives conditional deployment steps from CI and repository sources, computes progress totals, and checks the latest main-branch e2e run.
Host, repository, credential, and deployment setup
.claude/skills/install-virtualized/SKILL.md
Verifies SSH access and deployment state, selects installation modes, resolves branches or PRs, provisions pull secrets, and configures connected or disconnected deployment behavior.
Resource, storage, environment, and day-2 configuration
.claude/skills/install-virtualized/SKILL.md
Calculates host sizing overrides, selects supported storage, collects allowed environment values, and generates plugin, experience, and OSAC configuration.
Deployment execution and monitoring
.claude/skills/install-virtualized/SKILL.md
Runs CI make targets over SSH, reports progress, tails landing-zone logs, monitors long-running steps, and reports deployment and disconnected-install details.
Day-2 installation and cleanup
.claude/skills/install-virtualized/SKILL.md
Installs selected plugins or experiences after deployment or on existing deployments, and provides cleanup and verification commands.
Failure handling and self-improvement
.claude/skills/install-virtualized/SKILL.md
Diagnoses failures from output and logs, supports retry or skip decisions, gates non-CI changes on approval, and documents skill-update procedures.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant Skill as SKILL.md
  participant CI as CI workflow and Makefile.ci
  participant Host as RHSE host
  participant LZ as Landing zone
  Operator->>Skill: Select host, mode, branch, credentials, and addons
  Skill->>CI: Discover conditional targets and environment
  Skill->>Host: Prepare repository and execute targets over SSH
  Host->>LZ: Create deployment resources and logs
  Skill->>LZ: Monitor logs and VM status
  Skill->>Host: Install day-2 addons or run cleanup
  Skill->>Operator: Report progress, diagnostics, and access paths
Loading

Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error FAIL: The skill tails bootstrap logs and embeds pasted pull-secret/config content in SSH heredocs, which can leak secrets and internal host details into transcripts. Use scp/stdin for secret files, redact or avoid tailing sensitive log sections, and never echo user-pasted secret/config content in commands.
Ai-Attribution ⚠️ Warning High risk: PR/commits disclose AI use, and several commits use Co-Authored-By: Claude Opus 4.6 instead of Red Hat Assisted-by/Generated-by trailers. Replace AI Co-Authored-By lines with Assisted-by: (or Generated-by:) in all affected commits/PR text, and ensure future AI-assisted commits use the Red Hat trailer only.
✅ Passed checks (9 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed Low risk: no hardcoded keys/tokens/passwords/private keys, no credentialed URLs, and no >32-char base64 blobs; pull-secret content is user-supplied.
No-Weak-Crypto ✅ Passed PASS — the added skill contains no MD5/SHA1/DES/RC4/ECB, custom crypto, or secret/token comparisons; no new crypto risk.
No-Injection-Vectors ✅ Passed No SQL/eval/pickle/yaml.load/os.system/dangerouslySetInnerHTML or shell=True injection patterns found in the skill file; low risk.
Container-Privileges ✅ Passed The PR only changes a Markdown skill file; no container/K8s manifests or privileged/hostNetwork/hostPID/SYS_ADMIN/allowPrivilegeEscalation settings were added.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding a new Enclave virtualized installation skill.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/install-virtualized-skill

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@eurijon
eurijon force-pushed the feature/install-virtualized-skill branch 8 times, most recently from a744d17 to 35de5c8 Compare July 3, 2026 08:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/install-virtualized/SKILL.md:
- Around line 562-574: The Self-Improvement section in SKILL.md currently
instructs the runtime agent to edit the same skill, commit a branch, and open a
PR, which should be removed from execution-time guidance. Update the section
around the Self-Improvement rules to stop any self-modification workflow, and
replace it with a safer non-editing response that only reports the issue and
asks the user how to proceed; keep the change localized to the Self-Improvement
instructions in SKILL.md.
- Around line 186-213: The pull-secret validation in the install-virtualized
skill uses a literal "/home/$(whoami)/.pull-secret.json" path, so the Python
check never resolves the current user’s home directory. Update the validation
command in the pull-secret flow to use a real expanded home path or a
shell-expanded variable before invoking Python, and keep the check aligned with
the existing SSH upload/copy steps and the pull-secret validation block.
- Around line 286-293: Step 9 is too broad because it derives prompts from the
full CI env block, which can drift and expose new secrets or host-specific
values. Update the Step 9 guidance in SKILL.md to use a fixed allowlist of
user-supplied environment variables instead of scanning all CI `env:` entries,
and keep unattended mode using CI defaults except for the already-collected pull
secret and branch.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 270869ee-9874-4b94-82d4-663785109896

📥 Commits

Reviewing files that changed from the base of the PR and between 2732c52 and b9ae569.

📒 Files selected for processing (1)
  • .claude/skills/install-virtualized/SKILL.md

Comment thread .claude/skills/install-virtualized/SKILL.md
Comment thread .claude/skills/install-virtualized/SKILL.md Outdated
Comment thread .claude/skills/install-virtualized/SKILL.md Outdated
@eurijon
eurijon force-pushed the feature/install-virtualized-skill branch 9 times, most recently from e4aa8e1 to b9405fe Compare July 3, 2026 10:08
eurijon and others added 3 commits July 13, 2026 16:45
Claude Code skill that deploys RHSE on bare-metal hosts following the CI
e2e-deployment workflow. Dynamically reads workflow files each invocation
to stay in sync with CI changes.

Features:
- Attended/unattended installation modes
- Clone enclave repo on host with branch/PR selection
- Flexible pull secret handling (server path, paste, or local file upload)
- Progress bar tracking all deployment steps
- Live log monitoring for long-running steps (deploy-cluster-install)
- Failure analysis with fix suggestions
- Cleanup support
- Self-improvement suggestions for the skill itself

Assisted-by: Claude Code <noreply@anthropic.com>
Fix pull-secret validation to use Python Path.home() instead of
$(whoami) shell expansion which doesn't work inside Python's open().
Restrict self-improvement section to suggest-only — no runtime
self-modification of SKILL.md.

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When an existing RHSE deployment is detected, offer to install
day-2 plugins or experiences on the running cluster instead of
only clean-up-and-redeploy or abort.

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@eurijon
eurijon force-pushed the feature/install-virtualized-skill branch from b9405fe to 337ccca Compare July 13, 2026 14:45
Discovery commands (local file reads and SSH to LZ) should run
without asking for user confirmation. Add Bash(for *) to
allowed-tools frontmatter to auto-approve for-loop commands.

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@eurijon
eurijon force-pushed the feature/install-virtualized-skill branch from 337ccca to e5aec93 Compare July 13, 2026 14:46
@eurijon
eurijon force-pushed the feature/install-virtualized-skill branch from 88b4193 to 35c7a6a Compare July 13, 2026 16:23
@eurijon eurijon changed the title [WIP] Add RHSE virtualized installation skill Add RHSE virtualized installation skill Jul 14, 2026
@eurijon eurijon changed the title Add RHSE virtualized installation skill Add Enclave virtualized installation skill Jul 14, 2026
@eurijon
eurijon force-pushed the feature/install-virtualized-skill branch from 35c7a6a to 6fb8ce0 Compare July 14, 2026 10:16
@eurijon
eurijon force-pushed the feature/install-virtualized-skill branch from 6fb8ce0 to d98d542 Compare July 15, 2026 10:15
Remove the stop-gate that blocked disconnected mode. Both connected and
disconnected use the same make targets — behavior is driven by the
ENCLAVE_DEPLOYMENT_MODE env var. Add dynamic disk space validation from
source scripts, clarify ENCLAVE_IRONIC_HTTPS is connected-only, and
verify mirror registry status for disconnected deployments.

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@eurijon
eurijon force-pushed the feature/install-virtualized-skill branch from d98d542 to ec76d8e Compare July 15, 2026 10:19

@rporres rporres left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, very cool idea.

A few comments here and there, after claude and I have been looking it it 😁

Comment thread .claude/skills/install-virtualized/SKILL.md
Comment thread .claude/skills/install-virtualized/SKILL.md Outdated
Comment thread .claude/skills/install-virtualized/SKILL.md Outdated
Comment thread .claude/skills/install-virtualized/SKILL.md Outdated
Comment thread .claude/skills/install-virtualized/SKILL.md Outdated
Comment thread .claude/skills/install-virtualized/SKILL.md
- Add prerequisites section with hardware requirements
- Remove ENCLAVE_IRONIC_HTTPS from env var allowlist
- Replace disk overhead with thin-provisioning note and MIN_DISK_GB reference
- Use lvms-only instead of asking user to choose storage plugin
- Increase polling interval from 2-3 min to 5-6 min for cache TTL
- Add double-hop SSH connectivity check after capturing LZ IP

Assisted-by: Claude Code <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/install-virtualized/SKILL.md:
- Around line 335-350: Update the storage plugin contract in Step 9 to permit
only lvms for virtualized deployments, removing odf from the STORAGE_PLUGIN
values and any related defaults or day-2 selection logic. Keep Step 8’s
lvms-only behavior consistent and do not introduce an ODF path.
- Line 14: Add permission for the Step 9 discovery command by including Bash(ls
*) in the allowed-tools declaration of the install-virtualized skill, or update
Step 9 to use an existing Read-based discovery mechanism. Ensure plugin and
experience enumeration remains available in restricted runtimes.
- Around line 61-78: Update the deployment-procedure extraction instructions to
include every CI workflow uses: action, including its with: inputs and if:
conditions, alongside run steps. Require executing each action in the same order
and under the same conditions, or documenting an equivalent implementation for
prerequisites such as preflight validation and subnet allocation.
- Around line 655-659: Update the failure-diagnosis instructions to reuse the
existing target-to-log mapping when selecting the LZ deployment log filename,
rather than constructing deployment_bootstrap_<step>.log directly. Ensure mapped
targets such as deploy-cluster-prepare resolve to
deployment_bootstrap_download-content.log, while preserving the existing command
and tail behavior.
- Around line 272-304: The resource calculation instructions must use the
script-defined names: ENCLAVE_NUM_MASTERS, VM_EXTRADISKS_SIZE_VAL, and
LZ_DISK_SIZE, while sourcing Landing Zone memory and vCPU from
provision_landing_zone.sh. Replace the hardcoded 200/1200 disk thresholds with
dynamically extracted MIN_DISK_GB values from validate_prerequisites.sh,
preserving mode-specific validation and warnings.
- Around line 115-129: Update the existing-deployment check around the virsh
query to identify only Enclave resources, using known Enclave VM names,
working-directory artifacts, or successful cluster access rather than treating
every VM as an Enclave deployment. Show the existing-deployment warning and
cleanup guidance only when an Enclave match is confirmed, while leaving
unrelated VMs unblocked.
- Around line 115-119: Make all libvirt commands in the skill, including the
enclave discovery and the sections around the additional referenced locations,
non-interactive by using sudo -n or an explicitly supported unprivileged virsh
invocation. Update the prerequisites to require passwordless sudo or
libvirt-group access consistent with the chosen command path, and ensure
commands fail promptly rather than prompting for credentials.
- Around line 306-327: Define the reduced-resource calculation in the “Resource
sizing logic” section for hosts with ≤64 GB RAM, including integer rounding and
explicit minimum values for master and Landing Zone memory/vCPU allocations.
Specify how to detect when available resources cannot satisfy those floors, then
stop safely with a clear failure outcome instead of proceeding with invalid
settings; preserve the existing warning and user-confirmation behavior.
- Around line 181-200: Harden the SSH setup commands throughout the documented
install flow, including the clone/update steps and the referenced secret/config
sections, so untrusted branches, paths, repository values, and file contents are
never interpolated into shell command strings. Validate expected identifiers,
apply shell-safe argument quoting, and transfer pull-secret or configuration
content via stdin or scp rather than heredocs; preserve the existing clone,
reuse, and checkout behavior.
- Around line 181-200: Update the PR branch resolution and clone/update flow to
retrieve the PR head repository and immutable commit SHA, rather than only
headRefName. For PR deployments, fetch the PR head ref from the correct
repository or checkout the resolved SHA, then verify the checked-out commit
matches that SHA before proceeding; retain the existing branch flow for non-PR
inputs.
- Around line 342-364: Update the Step 10 environment handling in the deployment
instructions to preserve the required workflow variables LZ_CLOUD_IMAGE_URL,
LZ_CLOUD_IMAGE_NAME, LZ_RHSM_ORG, LZ_RHSM_ACTIVATION_KEY, BASE_WORKING_DIR, and
ENCLAVE_IRONIC_HTTPS. Collect them securely or require host configuration, pass
each only to the relevant Landing Zone or connected TLS steps, and never display
secret values; keep unrelated CI variables excluded.
- Around line 146-147: Remove StrictHostKeyChecking=no from the SSH commands in
the install-virtualized instructions, including all referenced LZ-hop commands.
Require the LZ host fingerprint to be established and verified through a
controlled known_hosts entry, and configure SSH to fail closed on an unknown or
mismatched key while preserving the existing command flow.
- Around line 90-100: Update the E2E status check instructions around the
workflow query to inspect the selected job rather than the overall workflow
conclusion. For the most recent matching run, use its run ID with gh run view
and examine the jobs JSON, filtering for e2e-connected or e2e-disconnected as
appropriate; report that job’s status, failure details, and URL before asking
whether to proceed, switch branches, or wait.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 85ca6d1f-f1b9-43ff-974d-a2baf2450f83

📥 Commits

Reviewing files that changed from the base of the PR and between e4aa8e1 and 3692b6e.

📒 Files selected for processing (1)
  • .claude/skills/install-virtualized/SKILL.md

Comment thread .claude/skills/install-virtualized/SKILL.md Outdated
Comment thread .claude/skills/install-virtualized/SKILL.md
Comment thread .claude/skills/install-virtualized/SKILL.md
Comment thread .claude/skills/install-virtualized/SKILL.md
Comment thread .claude/skills/install-virtualized/SKILL.md
Comment thread .claude/skills/install-virtualized/SKILL.md Outdated
Comment thread .claude/skills/install-virtualized/SKILL.md
Comment thread .claude/skills/install-virtualized/SKILL.md
Comment thread .claude/skills/install-virtualized/SKILL.md
Comment thread .claude/skills/install-virtualized/SKILL.md
eurijon added 2 commits July 23, 2026 17:33
- Add Bash(ls *) to allowed-tools for plugin/experience discovery
- Drill into specific CI job status instead of workflow-level conclusion
- Use sudo -n for virsh commands to fail fast without passwordless sudo
- Scope existing-deployment detection to enclave artifacts, not all VMs
- Add shell-quoting note for user-provided values in SSH commands
- Align formula variable names with actual script names
- Define concrete reduced-resource algorithm for ≤64 GB hosts
- Remove odf from STORAGE_PLUGIN allowlist values
- Fix failure handler to reference target-to-log mapping table

Assisted-by: Claude Code <noreply@anthropic.com>
Required by setup_working_dir.sh and not defaulted in Makefile.ci.
Default: /opt/clusters (matching the Makefile full-deployment example).

Assisted-by: Claude Code <noreply@anthropic.com>
@eurijon

eurijon commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Comments resolved and changes approved.

@eurijon
eurijon merged commit a451d21 into main Jul 24, 2026
21 checks passed
@eurijon
eurijon deleted the feature/install-virtualized-skill branch July 24, 2026 13:29
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