linuxkit
linuxkit copied to clipboard
added vmware metadata provider, closes #3507
cloud-init data from vmware guest info as it described in the link below https://github.com/vmware/cloud-init-vmware-guestinfo
closes #3507
- What I did Implemented a vmware metadata provider that leverages vmware guest info - How I did it Implemented Provider interface. Added provider_vmware file and added vmware to cdrom providers in main.go - How to verify it Guest info can be set for a vm using govc tool and can be tested in that vm as described. https://github.com/vmware/cloud-init-vmware-guestinfo - Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
I know it took a lot of time to fix missing bits and pieces. It seems all the checks are passing now, so can we merge this now? @rn
I know everyone is busy and it is not realistic to expect things always go fast for opensource projects.
But I would like to see this included in k3os
asap. So can anyone take a look at the PR and get it rolling, please?
I know everyone is busy and it is not realistic to expect things always go fast for opensource projects. But I would like to see this included in
k3os
asap. So can anyone take a look at the PR and get it rolling, please?
A bit off-topic; I built k3os image with this your merge request and deployed it to VMware virtual datacenter using vcloud director, so thanks for this patch!
But for some reason my k3os installation on latest version of VMware cloud director wasn't able to read 'vmware' provider. On boot K3OS wasn't able to read guest-properties that I had added('guestinfo.user-data') and gave me just message "No metadata/userdata found. Bye".
Have you got this provider working? If yes, with what platform and which guest-properties?
As you said I am sure we should discuss these issues here either. I think the problem is key should be set as guestinfo.userdata
not guestinfo.user-data
What's blocking this to be merged?
Any updates to this?
Also looking for an update on this. Any thoughts? @rn
Any updates to this?
Hello @rn - could you review/approve this?
@deitch Could you take a look at this?
This looks pretty good, and you did address @rn's comments.
The only questions I have are:
- Can you get @robertkaelin 's proposed changes here in, so that you do not have the dependency on
vmware-rpctool
? That would also mean documenting it, showing how to ensure it is available, etc. etc. His library solution is much better. - Is there any way to add a test for this? We only have a test for metadata on a CD here, so I can hardly be a stickler for it, but if it is possible, it would be good.
Completely separately, I see several people interested here. How are you using this (linuxkit in general)?
@deitch originally I open this PR because linuxkit's metadata package is used in k3os
When it comes to your questions,
- Changes suggested by @robertkaelin make sense I can add them. In fact, we have been running a forked version of the metadata package with these changes for some time now.
- If we do the changes to use the VMware library then I do not know how can we add tests for it. It is meant to be run in a VMware virtual env. If it is run any other env it panics.
Since there is an interest I will make the changes and push them.
Go for it.
And when done, please squash all of your commits.
Completely separately, I see several people interested here. How are you using this (linuxkit in general)?
I'm using K3os in a homelab environment. I deploy Packer images with Terraform, so the quick and easy way is to use the provider.
My current workaround is to use the File provisioner to write a config file at deployment, that K3os then loads to configure. This however does not leverage the capabilities of cloud-init.
I do not have access to a vcenter currently, so I will test the latest changes next week just to make sure everything works as expected.
@deitch I have tested the package on a VMWare VM, and it works as expected. Also, rebase and squash my commits as requested.
Looks fine to me. Let CI go green and we can merge in.
I just remembered, we need to build and push out the updated images, then run the script.
scripts/update-components-sha.sh --image $(linuxkit package show-tag pkg/metadata)
That can be a separate commit.
Either way, though, CI is failing. Can you see what is causing it?
@brlbil Any update on this? Really looking forward to configure k3os on vSphere without having to keep open a fork of linuxkit and build it every time I want a new ISO.
@KittyKatt Unfortunately, I do not have any spare time to track the error that the pipeline throws. I have to do this on my own time. If anyone can help to track the error in the pipeline I would appreciate it.
Appears the logs have expired for the Action that failed. Could it be re-run?
@brlbil @deitch I don't have permission to rerun looks like. Could someone rerun it to generate the logs of the failed job?
@observ3r I cannot run them either.
@KittyKatt Unfortunately, I do not have any spare time to track the error that the pipeline throws. I have to do this on my own time. If anyone can help to track the error in the pipeline I would appreciate it.
I tried looking into the errors when it was available and correcting/building locally, but unfortunately I am not anywhere near an expert in Go and couldn't make heads nor tails of it. Sorry!
Hey @deitch , are you able to rerun it?
The rerun button isn't there. 🤷♂️
Might as well rebase it to get the parallelization we did for actions (runs much more quickly), and push it out, which will cause CI to kick off again anyways.
Oh awesome, lookin good! I suppose just waiting on @rn at this point?
@brlbil Wanna rebase it? I don't think I can
@observ3r @deitch I rebased, but I think the workflow requires approval