Skip to content

LaunchPad Integration into the opensource repository#367

Merged
runleveldev merged 3 commits into
mainfrom
cmyers_launch
Jun 19, 2026
Merged

LaunchPad Integration into the opensource repository#367
runleveldev merged 3 commits into
mainfrom
cmyers_launch

Conversation

@cmyers-mieweb

Copy link
Copy Markdown
Collaborator

This pull request introduces a set of reusable composite GitHub Actions for interacting with the Create-a-Container API, along with improvements to the NetBox integration logic to better handle cluster/site lookups and disk size units. The new actions standardize API calls in CI workflows and provide clear, maintainable interfaces for container lifecycle operations. Additionally, the NetBox utility functions are enhanced for better compatibility and error handling.

GitHub Actions: Container API wrappers

  • Added four composite actions under .github/actions:
    • create-container: Creates a container via the API, returning job and container IDs, and handles synchronous/asynchronous creation logic.
    • get-container: Fetches container details by hostname, exposing key properties as outputs.
    • delete-container: Deletes a container by ID, with output indicating success.
    • wait-for-job: Polls a job until completion, failure, or timeout, with configurable polling.
  • Added a comprehensive .github/actions/README.md explaining the purpose, usage, and versioning strategy for these actions.

NetBox integration improvements

  • Updated NetBox utility functions to:
    • Allow a VM to be anchored to either a cluster or a site (not just cluster), supporting newer NetBox versions and failing clearly if neither is found. [1] [2]
    • Return null instead of throwing when a cluster is not found, improving flexibility in site/cluster resolution.
    • Convert disk sizes from gigabytes to megabytes before sending to NetBox, matching NetBox's storage conventions. [1] [2] [3]

Documentation and clarity

  • Improved inline documentation in NetBox utilities to clarify parameter purposes and logic, especially around cluster/site handling.

These changes provide a robust foundation for CI/CD workflows that interact with the container API and ensure the NetBox integration is resilient and standards-compliant.

Introduce composite GitHub Actions that wrap the Create-a-Container API (create, get, delete, wait-for-job) and a README documenting usage and versioning. Also tweak NetBox integration: update create-container log text, make findClusterId return null when not found, resolve both cluster and site IDs in createVirtualMachine, require at least one of cluster or site (fail loudly if neither), and emit cluster/site fields only when present. These changes improve CI ergonomics and make NetBox handling more robust for site-only configurations.
NetBox stores VM disk sizes in megabytes (and displays them by dividing by 1000), so convert gigabyte values to MB before sending. Add MB_PER_GB = 1000 and multiply diskGb by this constant in createVirtualMachine and updateVirtualMachine to ensure correct disk sizing in NetBox.
Comment thread .github/actions/README.md
@runleveldev runleveldev merged commit b544b7d into main Jun 19, 2026
7 of 8 checks passed
@runleveldev runleveldev deleted the cmyers_launch branch June 19, 2026 21:03
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