-
Notifications
You must be signed in to change notification settings - Fork 612
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
Experiment with managing external machines with lima #2000
base: master
Are you sure you want to change the base?
Conversation
64ec4ff
to
b865895
Compare
The probes are somewhat annoying when not using cidata, but that was the same story on FreeBSD and others. Maybe there should be some fallback implementation, at least for ssh-ready/guestagent install/boot-done ?
Like copying the And keeping the instance |
Added support for hostnames, so that you can use nice features like
anders@raspberrypi:~ $ sudo mkdir /mnt/lima-cidata
anders@raspberrypi:~ $ sudo touch /mnt/lima-cidata/meta-data
anders@raspberrypi:~ $ sudo touch /run/lima-ssh-ready
anders@raspberrypi:~ $ sudo touch /run/lima-boot-done Previously I was assuming IP. Now, to have a nice way to install the |
ea5255d
to
9cea961
Compare
9cea961
to
dcdb6f8
Compare
dcdb6f8
to
5b84678
Compare
Added host key checking:
And shortened the timeout, for when the device is not connected. Resolves in 10ms, when cached (or ~250ms).
|
0ab8193
to
b91338b
Compare
Added provision scripts. Using |
@@ -66,6 +66,7 @@ const ( | |||
QEMU VMType = "qemu" | |||
VZ VMType = "vz" | |||
WSL2 VMType = "wsl2" | |||
EXT VMType = "ext" |
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.
Maybe this should be called "external" to avoid confusion with "extended"
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.
In minikube we ended up calling the driver "ssh", but I don't think it's great
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.
ping @lima-vm/maintainers @lima-vm/reviewers RFC
I still feel "ext" is confusing.
Sounds like some sort of ext2/ext3/ext4 stuff.
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 think external
is fine. unmanaged
or raw
could be alternatives, but I prefer external
.
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.
ping @afbjorklund WDYT?
examples/default.yaml
Outdated
@@ -117,6 +117,9 @@ additionalDisks: | |||
# fsType: "ext4" | |||
|
|||
ssh: | |||
# Address for the host. | |||
# 🟢 Builtin default: "127.0.0.1" (localhost) | |||
address: null |
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.
What does localPort
mean now for non-local address
?
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.
It used as "port", but the old name is kept for compatibility.
If the port is zero, then for non-localhost it will be set to 22.
For localhost (127.0.0.1), it is still assigned to a random port.
Normally it is not set, and only the IP address is used for SSH.
7b2e56d
to
a18e091
Compare
Rebased to lima v0.21.0 [RPi runs Debian GNU/Linux 12 (bookworm)] $ _output/bin/limactl shell raspberrypi nerdctl version
Client:
Version: v1.7.5
OS/Arch: linux/arm64
Git commit: cffed372371dcbea3dc9a646ce5a913fc1c09513
buildctl:
Version: v0.12.5
GitCommit: bac3f2b673f3f9d33e79046008e7a38e856b3dc6
Server:
containerd:
Version: v1.7.14
GitCommit: dcf2847247e18caba8dce86522029642f60fe96b
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e946 Quite svelte, without the cidata etc:
|
Would it be possible to test this on CI? |
As long as it is possible to supply a VM, with access through host keys and authorized keys, that should be possible. I should detail the required steps (with example log), especially now with the addition of the cloud-config generation. |
Maybe this is a better way to do it, i.e. using GitHub Docker instead of Canonical LXD: https://docs.github.com/en/actions/using-containerized-services/about-service-containers Still needs a custom image, with sshd? And setting up keys, possibly cloud-init |
Maybe we can just use |
I removed all the old LXD code, and there are still concerns about testing containerd and reverse-sshfs with this... i.e. when trying to run a fake machine in a container, that leads to problems not happening on "real" machines Whether those are actually real (hardware) machines, or if they are virtual machines emulating real hardware. EDIT: "plain" removes most of the lima features:
Currently the guestagent with mounts and forwards is the main feature. It and sshfs and containerd are currently supposed to be installed by the user: The provision scripts are run separately (not from cloud-init), through ssh... |
Thanks for working on this, but I still think "ext"is confusing and should be called like "external" or something. |
I will give it some more thought, what the new name of the "generic" driver should be (naming things is hard...) Integration tests with (non-hosted) GitHub Actions seems to be very limited? Tried faking it with LXD, but it failed. It does not have to be in 1.0, even if it makes for a nice demo. There is still more documentation left to do, mostly external. |
86ea0de
to
8dc8714
Compare
a26498a
to
3541b35
Compare
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Verify ssh host keys, when connecting to a remote server. The first connection will prompt, if not in known_hosts. Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
It is not using cloud-init anyway, and does not need another copy of lima-guestagent and nerdctl-full.tgz Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Signed-off-by: Anders F Björklund <[email protected]>
Similar to the docker-machine "generic" driver, bring your own virtual machine (or physical server)
Not so useful in itself, but not so bad when made into a real driver or wrapped with helper scripts...
Requires:
Installed lima-guestagent, and nerdctl from tarballs/binaries.
limactl guest-install beaglebone
Hardware
https://www.beagleboard.org/boards/beaglebone-black
You could also use a Raspberry Pi Zero*, or a cloud droplet.
* need the Zero 2, for arm-v7 (previous model was arm-v6)
https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/
Discussion