Skip to content
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

Makefile: make OVF file first in the OVA bundle #1719

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

zmrow
Copy link
Contributor

@zmrow zmrow commented Aug 20, 2021

Issue number:
N/A

Description of changes:
The OVF spec (section 5.3) requires that the OVF is at the beginning of the OVA tar bundle.

This change moves the OVF file to the beginning of the OVA tar bundle to
align with the OVF spec.  Some client software is nice enough to take
care of this for you and upload the OVF first.  vSphere however, will
choke when a user provides a URL to an OVA bundle where the OVF file
isn't first.

Testing done:

  • Upload and run the vmware-k8s-1.20 OVA successfully from my local machine using cargo make -e BUILDSYS_VARIANT=vmware-k8s-1.20 upload-ova
  • Upload the vmware-k8s-1.20 OVA successfully from a private testing endpoint, and observe proper behavior when running it. The following command instructs vSphere to pull directly from the HTTPS endpoint to a private content library. I then created a VM from the content library template.
govc library.import -k -m -pull -n=test test https://<redacted>/8a28b63fe2d1a7cdb3a2260fab0a38a7c59afd26bddd7c00972486967552484a.bottlerocket-vmware-k8s-1.20-x86_64-v1.2.0.ova
  • Verified it shows up first in the OVA:
$ tar -tf bottlerocket-vmware-k8s-1.20-x86_64-1.2.0-6bc16261.ova
bottlerocket-vmware-k8s-1.20-x86_64-1.2.0-6bc16261.ovf
bottlerocket-vmware-k8s-1.20-x86_64-1.2.0-6bc16261.mf
bottlerocket-vmware-k8s-1.20-x86_64-1.2.0-6bc16261.vmdk
bottlerocket-vmware-k8s-1.20-x86_64-1.2.0-6bc16261-data.vmdk

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.

This change moves the OVF file to the beginning of the OVA tar bundle to
align with the OVF spec.  Some client software is nice enough to take
care of this for you and upload the OVF first.  vSphere however, will
choke when a user provides a URL to an OVA bundle where the OVF file
isn't first.
@zmrow zmrow requested review from bcressey, webern and etungsten August 20, 2021 17:00
Copy link

@vignesh-goutham vignesh-goutham left a comment

Choose a reason for hiding this comment

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

This is awesome! Thanks for doing this @zmrow :)

Copy link
Contributor

@webern webern left a comment

Choose a reason for hiding this comment

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

🍰

@zmrow zmrow merged commit 1d9774b into bottlerocket-os:develop Aug 23, 2021
@zmrow zmrow deleted the ova-order branch August 23, 2021 19:39
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.

6 participants