Kitematic: Proposal: Add support for multiple docker machines

Created on 7 Jul 2015  路  14Comments  路  Source: docker/kitematic

Currently Kitematic only supports virtual box as a machine to run containers on. During the DockerCon Hackathon my team worked on extending Kitematic to support multiple machines. This allowed us to create new machines (e.g. virtalbox, digitalocean,...) and to choose on which machine a new container should be created. Based on the work during the Hackathon and conversations during the conference the idea for this proposal emerged.

I am looking forward to your feedback and ideas to extend and improve this proposal, so that we can make Kitematic even better :-)

General Design Ideas

  • To support all docher-machine drivers, Kitematic should automatically retrieve the available drivers as well as the supported flags for each driver. This should also help to reduce work, when docker-machine adds new drivers in the future
  • This proposal adds support for non-local docker instances. To make sure that Kitematic shows the current state about the machines and the containers running on them, a mechanism to automatically refresh the information needs to be in place.

    TODOs

The lists below gives an overview of the different tasks that are needed to support multiple machines within Kitematic.

Views

This section holds a collection of the needed UI work

  • create new machine

    • specify name

    • specify supported driver flags

  • modify / delete machine

    • how to handle running containers in the machine?

  • create new container

    • select machine on which the container should run on

  • container overview

    • show the machine the container is running on

    • group containers by machine

  • preferences

    • specify a default machine, which will be used for a new container, as long as no other machine gets selected

Actions/Utils

  • adapt DockerMachineUtil code to pass the specified flags and values to docker-machine
  • retrieve info about supported drivers and driver flags from docker-machine (docker-machine contains also default values for some driver flags)

    Stores

  • store the machine on which a container is running

    outside systems

  • docker-machine: add api call to retrieve driver flags in JSON or another easy to parse format

proposal

Most helpful comment

Any updates on this feature?

All 14 comments

:+1:
As a first step, I'd like to see a feature to retrieve all available active Docker Engines with a docker-machine ls API call. Then show this list to the user when starting Kitematic and he can choose a single Docker Engine which he'd like to control.
This should be an easy extension with an instant value for the users.

Agreed @DieterReuter - :+1: on supporting the docker engine selection

For those interested in some 'pre-alpha' QA, I've put together a simple Docker Engine selector within the Kitematic preference tab:
https://github.com/TeckniX/kitematic/tree/docker-engine-selection

vb-dev
vb-kitematic
digitalocean

I've done a little bit of error detection, but still getting a bunch of warnings when updating the engine. Do use at your own risk, although the worst that can happen (I think/hope) is it will try to create a local Virtualbox with the name of your remote Docker engine.

Background:

  • Dev - Local Virtualbox with a couple of containers
  • Kitematic - Local Virtualbox manually created and used Kitematic to create new ghost container
  • Staging - Digital Ocean droplet manually created via docker-machine and used Kitematic to create and run new ghost container.

Works:

  • Docker Engine selection
  • Container create/start/stop/restart/delete
  • Container logs

Known issues:

  • Clicking the 'preview' link won't work (didn't look too much into it, maybe something with the host setup)
  • Mounting of volume

I didn't try to change the Env variables but I don't see a reason for it not to work.
Feedback is welcome :)

@elft3r Hi Jochen, I've been continuing work since the Hackathon on adding providers. Should we combine efforts here?

@timfallmk Absolutely - Do you have a repo location to share?

@TeckniX @elft3r I'm talking to @jeffdm this afternoon about what he would like to see out this. I think he might want to have a big planning session where we can get plans set. Stay tuned!

@timfallmk Hi Tim, great to hear that you also want to continue the work we started. Looking forward to the results of your meeting with @jeffdm
@TeckniX I had a look at your version and it looks pretty good. I didn't run into any problems with the basic functions. Let me know when you have further changes.

@elft3r Thanks for taking a look - The changes were made with a different mindset then what you and @timfallmk came up with.
I like the separation of the drivers and ability to also create the appropriate machine from Kitematic. We'll probably need to review the proper approach, but the code created was a good example of managing existing docker machines

As this is a bigger change to Kitematic we decided to collect all information and tasks in a Wiki.

Just wanted to additional requirements that you may want to consider, some are related to each other and/or might already be considered.

1.) Installation - Ability to not install VirtualBox and/or not have a local instance.
2.) Allow local engine that is not VirtualBox (at Install? or after the fact)
3.) VMware Workstation Support as a Docker Engine VM
4.) Support for Storing TLS Certs for Authentication (In App)
5.) Support for using Window Certificate Store to get TLS Certs
6.) Integration with Pageant (of Putty)

Additional Remarks:
3.) This may be out of scope of the kitematic sub-project.

4 and 5.)
In the case of 4 and 5 only one would be really needed I am favoring 5 for simplicity reasons, no GUI needs to be made and adding certificates to store is documented already. Currently common applications like Internet Explorer and Chrome both share this store on windows.

6.) This may not be possible as I don't believe Docker supports OpenSSL Private Public Key Authentication.

@elft3r .. Any progress with this topic?

@timfallmk

I'm talking to @jeffdm this afternoon about what he would like to see out this. I think he might want to have a big planning session where we can get plans set. Stay tuned!

Any results here?

Any updates on this feature?

Looking at the images shared, was there a reason why you put the driver selector attached to the docker image in the right view, instead of making it global in the left, and saying "these are your docker machines" then selecting the machine shows you what docker containers are running on it? Which to me makes more sense than having to click through all the containers to figure out where a container is running.

@thenetimp although it may look like it's part of the image, the screenshot were showing the preference page, from which you would select the machine to use, which would then refresh the entire list of containers running

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EliotSlevin picture EliotSlevin  路  3Comments

jwschram picture jwschram  路  4Comments

djsowa picture djsowa  路  3Comments

sumpokemonster picture sumpokemonster  路  3Comments

ClemMakesApps picture ClemMakesApps  路  3Comments