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

Feature/ova #379

Merged
merged 1 commit into from Mar 15, 2019

Conversation

Projects
None yet
@imcleod
Copy link
Contributor

imcleod commented Feb 28, 2019

This is a simple string template approach to OVA generation inspired by feedback from Ben and Benjamin on how they do this in Container Linux and Ubuntu. The template in this PR merges some XML fragments from Container Linux related to the guest parameters with the core XML that is output by Image Factory when generating OVA files.

With this, right now, by hand, you should be able to:

gf-oemid core-qemu.qcow2 coreos-vmware.qcow2 vmware
generate-ova-from-template.py coreos-vmware.qcow2 vmware-template.xml example_ova_parameters.json coreos-vmware.ova

And then import coreos-vmware.ova into your vSphere instance.

@ashcrow ashcrow self-requested a review Feb 28, 2019

@LorbusChris

This comment has been minimized.

Copy link
Contributor

LorbusChris commented Mar 1, 2019

Note that coreos.config.* was renamed to ignition.config.* in spec v3.

There is coreos/ignition#754 to add support for ignition.config.* to v2.

@cgwalters

This comment has been minimized.

Copy link
Member

cgwalters commented Mar 1, 2019

Seems sane to me; next step would be adding...vmware as a build target and teaching cmd-build about it. Happy to help if you have any questions!

@imcleod imcleod force-pushed the imcleod:feature/ova branch from 5f0afe3 to f30764b Mar 1, 2019

@imcleod

This comment has been minimized.

Copy link
Contributor Author

imcleod commented Mar 1, 2019

I've made a few fixups and was able to boot a recent RHCOS image on vSphere using the output.

It even prompted me for the various properties, for which I provided a known-working ignition file used for local testing. Unfortunately, the key injection does not seem to have worked, but that is likely an image-level issue not an issue with this small script.

@ashcrow
Copy link
Collaborator

ashcrow left a comment

Looks good so far. Some nits which are optional.

Show resolved Hide resolved src/example_ova_parameters.json Outdated
Show resolved Hide resolved src/generate-ova-from-template.py Outdated
Show resolved Hide resolved src/generate-ova-from-template.py Outdated
Show resolved Hide resolved src/generate-ova-from-template.py
Show resolved Hide resolved src/generate-ova-from-template.py Outdated
Show resolved Hide resolved src/generate-ova-from-template.py Outdated
Show resolved Hide resolved src/vmware-template.xml Outdated

@imcleod imcleod changed the title [WIP] Feature/ova Feature/ova Mar 1, 2019

@imcleod

This comment has been minimized.

Copy link
Contributor Author

imcleod commented Mar 1, 2019

With the latest changes to the XML, this now generates an OVA output that crawford and I were able to import, provide an ignition file via user data, and log into using the injected SSH key.

Although this is not yet wired in to the rest of the assembler, it's working. I've removed the WIP.

@dustymabe

This comment has been minimized.

Copy link
Member

dustymabe commented Mar 12, 2019

@mike-nguyen has agreed to pick up this work and integrate it with out buildextend workflow already established for artifacts like openstack (buildextend-openstack) so that we can push this over the finish line.

@dustymabe

This comment has been minimized.

Copy link
Member

dustymabe commented Mar 12, 2019

@mike-nguyen can you base your work on this and we'll merge this and your work in the same timeframe?

@mike-nguyen

This comment has been minimized.

Copy link
Contributor

mike-nguyen commented Mar 12, 2019

Will do

@ashcrow
Copy link
Collaborator

ashcrow left a comment

Nits that can be fixed later, but LGTM

@@ -0,0 +1,10 @@
{ "ovf_cpu_count": "2",
"ovf_memory_mb": "4096",
"vsphere_image_name": "Red Hat CoreOS",

This comment has been minimized.

@ashcrow

ashcrow Mar 12, 2019

Collaborator

nit: I think this needs updating.

This comment has been minimized.

@dustymabe

dustymabe Mar 14, 2019

Member

will address in a follow up PR

{ "ovf_cpu_count": "2",
"ovf_memory_mb": "4096",
"vsphere_image_name": "Red Hat CoreOS",
"vsphere_product_name": "Red Hat CoreOS",

This comment has been minimized.

@ashcrow

ashcrow Mar 12, 2019

Collaborator

nit: This as well.

This comment has been minimized.

@dustymabe

dustymabe Mar 14, 2019

Member

will address in a follow up PR

@imcleod imcleod force-pushed the imcleod:feature/ova branch from 1c4013e to a4dde26 Mar 15, 2019

@dustymabe

This comment has been minimized.

Copy link
Member

dustymabe commented Mar 15, 2019

merging this - will fixup in #412

@dustymabe dustymabe merged commit d67b3cb into coreos:master Mar 15, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.