-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for uploading OVAs to VMware #1622
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saving partial review
^ addresses @webern 's comments! |
^ Removes the |
This adds everything needed to support VMware specific configuration, including credentials.
^ Above push is a rebase on Now the the SDK changes are shipped, I executed all of the testing again and everything looks good. (Fighting through the intermittent VMC issues today) Pulling out of draft... |
tools/pubsys/src/vmware/govc.rs
Outdated
let stdout = String::from_utf8_lossy(&output.stdout); | ||
trace!("{}", stdout); | ||
if output.status.success() { | ||
return Ok(output); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
return Ok(output); | |
Ok(output) |
This adds the subcommand `upload-ova` to `pubsys`. This subcommand is meant to be used via `cargo make` and allow a user to upload an OVA to one or more VMware datacenters, optionally marking the VM as a template. Under the hood, it accomplishes this by running `govc` in the SDK container via Docker invocation, similar to how `buildsys` accomplishes its task. Like the rest of `pubsys`, it gets much of its configuration from `Infra.toml`. The configuration details all of the values needed to communicate with a vSphere instance, and allows for users to specify "common" configuration that multiple datacenters share. Credentials for different datacenters can be specified in a file located at `~/.config/pubsys/vsphere-credentials.toml`. Because we use `govc` under the hood, at runtime we check for GOVC_* environment variables and allow them to override VMware datacenter config in `Infra.toml` or `vsphere-credentials.toml` The subcommand allows a user to override the name of the resulting VM, import spec, and specify a subset of datacenters than what's specified in config.
This change adds the ability to upload a built OVA to one or more VMware software defined datacenters. The `vmware-template` target uploads the OVA and marks it as a VM template using the import spec. Multiple environment variables allow a user to override the VM name, list of datacenters to upload to, and the import spec used to upload.
This change splits `PUBLISHING.md` into multiple files to account for the differences in publishing Bottlerocket on AWS and VMware. The `PUBLISHING-AWS.md` guide covers publishing and granting access to AMIs, and details around SSM parameters. The `PUBLISHING-VMWARE.md` guide covers the configuration details and process for uploading an OVA to one or more VMware SDDC's. The main `PUBLISHING.md` still covers all general information around configuration, repos, etc.
^ Addresses @arnaldo2792 's comments :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛵
Issue number:
Implements #1605
Description of changes:
It's probably easiest to read through the PR by commit.
Testing done:
I performed the test steps with varying configuration setups:
Infra.toml
or creds file)[vmware.common]
sectioncommon
,Infra.toml
and environment to ensure the values cascade as expectedTesting steps:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.