Skip to content

Add darwin OS type for macOS external providers - #936

Draft
yanksyoon wants to merge 1 commit into
cloudbase:mainfrom
yanksyoon:add-darwin-os-type
Draft

yanksyoon wants to merge 1 commit into
cloudbase:mainfrom
yanksyoon:add-darwin-os-type

Conversation

@yanksyoon

Copy link
Copy Markdown
Contributor

Problem

GARM's OS vocabulary is linux | windows only, so a macOS pool has to masquerade as linux and a macOS runner-install template has to be registered as linux. The provider works, but every operator has to be told the wrong word.

This is the second half of cloudbase/garm-provider-common#61 (tracked in #935). It lets macOS external providers (e.g. a Tart provider running ephemeral macOS VMs on Apple Silicon) declare darwin for real.

Change

  • runner/types.go: accept darwin in the pool-creation gate (supportedOSType).
  • params/requests.go: accept darwin in CreateTemplateParams.Validate.
  • cmd/garm-cli/cmd/templates.go: accept darwin in the template create and template restore client-side gates.
  • internal/templates/templates.go: map darwin to the existing POSIX bash wrapper (there is no darwin-specific wrapper; the injected wrapper is plain POSIX bash and works unchanged on macOS).
  • README.md + doc/providers.md: list the Tart provider.
  • doc/macos.md: document macOS pool specifics — no cloud-init so --runner-install-template is required, the two-guests-per-host licence cap (policy, not enforced by GARM), and the unlocked login keychain requirement since macOS 15.

Status: blocked on garm-provider-common#61

go.mod currently carries a temporary replace of github.com/cloudbase/garm-provider-common to a fork commit that contains the Darwin constant. Once cloudbase/garm-provider-common#61 is merged, this PR will drop the replace and pin the merged pseudo-version. The vendor tree is committed because CI runs make verify-vendor.

Accept darwin at the pool-creation and template-creation gates, and map it
to the existing POSIX bash wrapper (there is no darwin-specific variant).
List the Tart provider and document macOS pool specifics.

Refs cloudbase#935
Depends on cloudbase/garm-provider-common#61 (temporary replace directive)
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