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

Thank you thank you thank you! #1

Closed
prologic opened this issue Mar 4, 2018 · 23 comments
Closed

Thank you thank you thank you! #1

prologic opened this issue Mar 4, 2018 · 23 comments

Comments

@prologic
Copy link

prologic commented Mar 4, 2018

Finally! Someone wrote a docker-machine driver for Proxmox VE :)

Thank you!

I'll be testing this out today and report back with any issues and hopefully I will have BW to contribute!

@prologic
Copy link
Author

prologic commented Mar 4, 2018

Oh... This driver is incomplete! Are you still working on this locally and haven't pushed latest commits up?

@prologic
Copy link
Author

prologic commented Mar 4, 2018

I can probably help here :)

@lnxbil
Copy link
Owner

lnxbil commented Mar 4, 2018

Hi, yes I just started to learn go in order to get the docker machine driver running and yes, it is incomplete at the moment. Just before the cool stuff should start, I found out that the qemu stuff is missing in the library I chose. My current plan is to drop the library and implement it myself, qemu create should not be that hard.

@prologic
Copy link
Author

prologic commented Mar 4, 2018

so I noticed that too and you forked that library.

Have you considered some other alternative libraries?

Example:

This one is used by the teraform proxmox provider and seems to have all of the necessary bits to get a docker-machine driver going. We don't really need to implement the entire PVE API!

@lnxbil
Copy link
Owner

lnxbil commented Mar 4, 2018

I have not tried every library and started with one that implemented tests, so my first try was to get the tests running and now they run :-)
Good to know that the api you mentioned is used somewhere, I'm just very new to the whole go thing, so I have not checked the reverse usage of the libraries in order to get the most used, or at least one that works.

Yes, we only need some basic functionality. Driver should be very straight forward ... yet I still struggle with GO in some places, yet I hope to get it to work in the next two weeks. If you want to work with me on this, it should be very easy to get it working (top down prototype). One big problem will be to the IP, we only have the MAC and we only can get the IP with a qemu-guest-agent or by finding it out in a dhcp server.

@prologic
Copy link
Author

prologic commented Mar 4, 2018 via email

@lnxbil
Copy link
Owner

lnxbil commented Mar 4, 2018

So I'm actually considering forking and trying to build a working full e2e
version that create a running instance with the teraform library. Is that
okay? :) -- If I focus all day today I might get it working.

Yes, go ahead. At least I kickstarted the development. I'm going to bed now (Germany), have a nice day in Australia :-D

Regarding networking and ip address allocation -- I would leave this to
DHCP and nothing more. Why? Because anyone that sets up Proxmox VE or a
Proxmox VE cluster knows what they're doing and likely has some
non-trivial infra setup (like DHCP, DNS and other basic infrastructure
things; I do).

As far as I understand it, you need to get the IP from the driver to log in via SSH and that is not so trivial. Hopefully I'm wrong and just create, start, stop and status is necessary.

@prologic
Copy link
Author

prologic commented Mar 5, 2018

I believe your choice of library to fork and improve upon is the right one. After evaluating the terraform one it's a bit inadequate and I'm not sure tested very well. The code is a bit messy too :/

@prologic
Copy link
Author

prologic commented Apr 5, 2018

You made any more progress on this? Would be nice to have a full e2e working version that successfully creates a vm with some hard coded values for which os image to run and what the ip address will be.

@prologic
Copy link
Author

prologic commented Apr 5, 2018

FWIW you have 7 watchers and 4 star gazers :)

@lnxbil
Copy link
Owner

lnxbil commented Apr 5, 2018

I worked on a new API client that implements the necessary qemu stuff, yet other go projects were more important at the time. I hope that I can continue next weekend.

@lnxbil
Copy link
Owner

lnxbil commented Apr 16, 2018

Took some time but I got at least the creation working, next up is unfortunately not the GetIP stuff, but how to "find" the VM after creation. Proxmox VE does use internally only IDs and we have to retrieve the created VM ID and store it somehow.

@prologic
Copy link
Author

prologic commented Apr 16, 2018 via email

@lnxbil
Copy link
Owner

lnxbil commented Apr 16, 2018

Yes, hopefully there is already some interface to attach to, I'd like to stick as close to the Docker Machine stuff as possible.

@prologic
Copy link
Author

prologic commented Apr 17, 2018 via email

@lnxbil
Copy link
Owner

lnxbil commented Apr 17, 2018

There would have to be given many drivers store their configs there.

That's what I thought and what I tried to find. I cannot find any explicit code in the drivers, yet I keep looking and experimenting with other drivers to get a glimpse of whats going on.

@prologic
Copy link
Author

prologic commented Apr 17, 2018 via email

@lnxbil
Copy link
Owner

lnxbil commented Apr 17, 2018

Yeah, it is some "convention" and the internal class state seems to be dumped into the configuration file. Hell this is great ... we don't need to worry.

Everything is in ~/.docker/machine/machines/<name>/config.json

@prologic
Copy link
Author

prologic commented Apr 17, 2018 via email

@lnxbil
Copy link
Owner

lnxbil commented Apr 17, 2018

Just now, i pushed another version with working guest agent ip detection and it is now stuck in the key-based ssh login sequence.

Have a look at the commit messages, I try to document what i've done and what is next on the agenda.

@prologic
Copy link
Author

prologic commented Apr 17, 2018 via email

@lnxbil
Copy link
Owner

lnxbil commented Jun 18, 2018

Finally pushed changes to do the nasty key adding manually and I now can run it with the patches version of boot2docker/boot2docker/pull/1319

@prologic
Copy link
Author

prologic commented Jun 18, 2018 via email

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

No branches or pull requests

2 participants