Docker-Machine driver for Proxmox

dagar80

New Member
Oct 17, 2017
1
1
1
43
Hi there,

As you already know docker-machine is a good tool to deploy docker host and have many drivers to do it, but I miss a driver for Proxmox.
Is it in Proxmox schedule?

Best regards,
David.
 
  • Like
Reactions: Xabi
Hi,

no there are no plans about that.
 
I tried to start to implement a few times, but I always get stuck on beginning with the right environment for GO including my complete lack of GO knowledge. There is a GO api for PVE that is said to work "more-or-less" and the driver example in the docker repository seems also very understandable, yet that's as far as I got. Too much magic going on in the background of GO that I do not know of.

Maybe there is a GO developer to jump in and create the docker-machine driver, I'd really appreciate it.
 
Docker on Proxmox:

The problem is not Docker on PVE, we want to have docker-machine for PVE, which is an automatic Docker Swarm platform deployment. No one want to setup something like that manually. The whole idea of a PaaS or CaaS/DockeraaS platform is auto provisionioning and automatisation everywhere.

You video describes how to install Docker on your PVE host itself, which is fine for a development machine, but production Docker containers will not run this way (or at least they are not designed to do that). You need an orchestration tool, multiple nodes etc. Normally, you deploy any PaaS or CaaS cloud on top of an IaaS cloud (PVE is only IaaS in the Docker sense).

Goal would be:
docker-machine gets the credentials of your PVE cluster, logs in, spawns a couple of KVM machines, auto provisions them with Boot2Docker, sets up automatic failover over several nodes in your cluster and boots up the swarm. Everything in one command.

You can already do this (one command to rule them all) on VMware, DigitalOcean, AWS and a whole bunch of other IaaS platforms, so PVE is missing out.
 
I just talked with the Proxmox staff at Proxtalks about this and it could be an interesting topic for next years proxtalks. Hopefully, I have time to spend some hours on learning GO and testing.
 
Ok, well that was awesome ;) Just setup a local mirror of the current image and a simple ignition config file and my Docker VM is ready in a minute (ok, minus the API creation time ;)):

Code:
# time ./coreos-install -d /dev/zvol/ssd/test/vm-100-disk-1 -i ignition.json -C stable -b http://download.morph027.de/amd64-usr
Current version of CoreOS Container Linux stable is 1520.8.0
Downloading the signature for http://download.morph027.de/amd64-usr/1520.8.0/coreos_production_image.bin.bz2...
2017-10-29 19:34:16 URL:http://download.morph027.de/amd64-usr/1520.8.0/coreos_production_image.bin.bz2.sig [566/566] -> "/tmp/coreos-install.mRePpI7qsb/coreos_production_image.bin.bz2.sig" [1]
Downloading, writing and verifying coreos_production_image.bin.bz2...
2017-10-29 19:35:09 URL:http://download.morph027.de/amd64-usr/1520.8.0/coreos_production_image.bin.bz2 [331469496/331469496] -> "-" [1]
gpg: Signature made Thu 26 Oct 2017 05:46:48 AM CEST
gpg:                using RSA key 8826AD9569F575AD3F5643E7DE2F8F87EF4B4ED9
gpg: key 50E0885593D2DCB4 marked as ultimately trusted
gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "CoreOS Buildbot (Offical Builds) <buildbot@coreos.com>" [ultimate]
Installing Ignition config ignition.json...
Success! CoreOS Container Linux stable 1520.8.0 is installed on /dev/zvol/ssd/test/vm-100-disk-1

real   1m0.536s
user   0m3.092s
sys   0m7.383s

As there are a lot of possibilities to customize the installation, i'll do some follow ups and publish a blog post which probably will void my current method ;)
 
Resurrecting an old thread but I'd be willing to pitch in to see this done.

I use Rancher which supports using docker-machine to spin up VMs in vmware so surely it could be done in PVE.

@tom @dietmar @martin Can one of you message me? I'd like to change my username if possible. Thanks
 
Last edited:
I use Rancher which supports using docker-machine to spin up VMs in vmware so surely it could be done in PVE.

It's not the question 'if it can be done', it's the question of 'who's going to do it'. It has do be done in Go and at the moment, there is no one willing or capable. I still had no time to jump at it.
 
Interested in this too...
There is a XenServer driver for docker-machine, and OpenNebula driver but nothing about proxmox.

I really hate XenServer, OpenNebula is really cool but needs to many components (a working cluster, multiple controller nodes, and so on) to be used properly (I don't think would have sense to install multiple "standalone" opennebula nodes.....)
 
True. I just started to look into Go, so there could be the possibility to tackle this problem later this year.

My biggest issue is with Go, a language that I don't know.
Probably, a Go programmer could write a proxmox driver in a couple of hours (i've looked at some other drivers and are nothing more than calls to service APIs to create/destroy/start and so on VMs)
 
Yes, it should be straight forward. My biggest problem right now is to have a reproducible test environment to play with the docker machine dummy driver and the proxmox-go api that is already available and to craft test cases. The proxmox-go implementation does not have them (or I'm blind to see them).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!