-
Notifications
You must be signed in to change notification settings - Fork 43
cloudinit: leverage virtio-blk to push cloud-init configuration #207
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
Conversation
|
Skipping CI for Draft Pull Request. |
e96048c to
c27487c
Compare
92b9ec6 to
f59937d
Compare
159a41d to
98cf504
Compare
cfergeau
left a comment
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.
Overall looks good apart from a bunch of minor comments.
doc/usage.md
Outdated
|
|
||
| #### Cloud-init | ||
|
|
||
| The `--device virtio-blk` option could also be used to supply an initial configuration to cloud-init through an disk image. |
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.
can also be used... a disk image
doc/usage.md
Outdated
| It is also possible to add further configurations by using the network-config and vendor-data files. | ||
| See https://cloudinit.readthedocs.io/en/latest/reference/datasources/nocloud.html#runtime-configurations for more details. | ||
|
|
||
| To create the ISO image you could use the following command within a folder containing the user-data and meta-data files |
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.
I'd use "can" here as well.
doc/usage.md
Outdated
| --device virtio-blk,path=/Users/virtuser/vfkit.img | ||
| ``` | ||
|
|
||
| To also push the cloud-init configuration you can add an additional virtio-blk device backed by an image containing the cloud-init configuration files |
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.
"push" reads a bit odd here, maybe "provide" would work?
test/osprovider.go
Outdated
| } | ||
| if _, err := file.Seek(0, 0); err != nil { | ||
| return "", err | ||
| } |
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.
is this header reading required? you do not seem to be making use of it?
test/osprovider.go
Outdated
| } | ||
|
|
||
| type FedoraProvider struct { | ||
| vmlinuz string |
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.
diskImage or such would be easier to understand.
it adds the documentation to explain how to push cloud-init configuration by leveraging the virtio-blk device Signed-off-by: Luca Stocchi <[email protected]>
a7c8d05 to
41e879f
Compare
it adds an e2e test which downloads fedora 40 and create a VM using it. Then mounts an ISO image containing the user-data and meta-data files needed by cloud-init to apply our configuration. The meta-data file is empty but the user-data file contains info about a new user that has to be added to the system. After the VM gets started it verifies that the user has been actually added by connecting using SSH. At the end, the VM is stopped. The test is not run on macOS12 as it does not support efi bootloader. Signed-off-by: Luca Stocchi <[email protected]>
cfergeau
left a comment
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.
/lgtm
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfergeau The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR updates the documentation to explain how to push cloud-init configuration as an ISO image by leveraging virtue-blk.
It also adds an e2e test to verify vfkit works with fedora and the cloud-init configuration is actually applied.
it closes #123