Skip to content

refactor(genesis): improve provision-usb.py and add CI/CD#55

Merged
jmgilman merged 4 commits intomasterfrom
refactor/genesis-scripts-ci
Dec 29, 2025
Merged

refactor(genesis): improve provision-usb.py and add CI/CD#55
jmgilman merged 4 commits intomasterfrom
refactor/genesis-scripts-ci

Conversation

@jmgilman
Copy link
Collaborator

Overview

This PR improves the maintainability and reliability of the provision-usb.py script and adds CI/CD verification.

Changes

  • Refactoring:
    • Extracted VMX configuration templates to bootstrap/genesis/scripts/templates/ to improve readability.
    • Replaced subprocess.run(["which", ...]) with shutil.which for cleaner tool detection.
    • Updated ISO configuration to load dynamically from images/images.yaml (source of truth), preventing version mismatch.
    • Added valid json imports and metadata handling for VMDK caching (part of separate user edits included here).
  • CI/CD:
    • Added bootstrap/genesis/justfile to standardize fmt, lint, and check commands using uv.
    • Added .github/workflows/genesis.yml to enforce formatting and linting on PRs.

Verification

  • Ran just check locally to verify ruff formatting and linting.
  • Verified script compilation with --help.

jmgilman and others added 4 commits December 29, 2025 09:46
Remove the vyos-build custom image pipeline in favor of manually
installing VyOS from the official Stream ISO during genesis bootstrap.
This simplifies the bootstrap process and eliminates the chicken-and-egg
dependency where Tinkerbell needed VyOS networking but VyOS was supposed
to be provisioned via Tinkerbell.

Changes:
- Remove build-vyos-image.sh script and gateway.toml flavor template
- Remove packer-ssh.sops.yaml (was for vyos-build SSH injection)
- Update bootstrap procedure Step 2 with manual VyOS install instructions
- Remove Step 7 (VyOS via Tinkerbell) - now 14 steps total
- Update architecture docs to reflect manual VyOS bootstrap
- Update image-pipeline.md to remove vyos-build workflow section
- Update integration testing to use official vyos/vyos:current container

The VP6630 gateway is now bootstrapped manually before Tinkerbell is
available. Post-install configuration management remains via Ansible.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The sed -i '' syntax is macOS-specific. On Linux (GNU sed), this causes
the sed expression to be interpreted as a filename. Use a temp file
approach instead for cross-platform compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use external VMX templates for better readability
- Load ISO configuration dynamically from images.yaml
- Replace subprocess.which with shutil.which
- Add justfile for development automation
- Add GitHub Workflow for CI verification
@jmgilman jmgilman merged commit e98750d into master Dec 29, 2025
2 checks passed
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.

1 participant