-
Notifications
You must be signed in to change notification settings - Fork 925
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
[WIP] LIBCLOUD-781 docker node driver #654
Conversation
|
||
""" | ||
Docker (http://docker.io) driver. | ||
Created by Markos Gogoulos (mgogoulos@mist.io) |
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.
We don't keep authorship information that way at ASF, so we can remove those lines.
@tonybaloney do you use it in a dev or prod environment? |
|
||
data = json.dumps(payload) | ||
try: | ||
result = self.connection.request('/containers/create', data=data, |
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.
Just for curiosity, why do you have used the HTTP API instead their official Python package?
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.
Generally LibCloud does the minimal integration instead of relying on 3rd party Libs. The number of Libs would be huge and lack of control and test ability would be an issue
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.
Makes sense! 👍
As I said, I asked for curiosity, and to understand your development choice! :)
hi @poliveira89, we use this driver on https://github.com/mistio/mist.io to run actions on containers and also deploy new ones (passing a name, image, command, ports to expose, port bindings and also env variables) |
@mgogoulos cool. Can you explain how you use the 'password' defined in the features list ? I am just not getting the workflow |
@mgogoulos which branch contains the stable version of libcloud with docker support? I have only found this one: https://github.com/DimensionDataCBUSydney/libcloud/tree/LIBCLOUD-781_Docker |
Hi @Runseb, you are right, this line can be omitted
The create_node() function can be used without the need of this line of course. |
Similar to libvirt, a lot of docker functionality doesn't really nicely map to the libcloud.compute.* API which was primarily designed to handle cloud and virtual servers. If we decide to also add support for other container run-times (docker, rkt, FreeBsD jails, Solaris zones, etc.) it would be worth evaluating if we should create a new In any case, if we go with a new API it's also worth noting that that's a much bigger task and commitment. Also as far as Swarm and Kubernetes goes - those are more of container orchestrator systems so I don't think they fit well in either compute or potential new container API. |
I can see 3 options for us here (if we target docker and then rkt)
For the record. I favor option 2. |
@Kami let me start this comment, by saying that I fully understand that this "upgrade" or embracing Containers will be a much bigger task and require a lot effort from everyone involved (because as you stated some changes - design and implementation must be discussed). I just asked to inquire which was the roadmap regarding this topic - for Container-as-a-Service providers. But, if you allow me to say this, before anyone start this undertaking, why don't start small? First discuss the acceptance of this PR... as @tonybaloney and @mgogoulos states, this works perfectly for their use-case scenario (which, I assume, is deploy instances/nodes regardless of the provider). After reading, @tonybaloney last post, I still does not have a well defined opinion, because I'm questioning (because I'm not seeing at first) what is the major differences that requires a differente object Driver for Containers? To finalize, IMHO, I think that considering Docker as a provider of Libcloud is not that farfetch, because, I may be wrong, but you support Digital Ocean and other providers which works with Docker Daemon/Client to deploy containers. |
One use case for a Docker compute node driver is a test environment where Docker containers are an adequate stand-in for booting full fledged cloud VMs. |
@poliveira89 @tetron @Runseb this PR is now #666 |
Port the node driver for Docker from @mgogoulos initial driver in Mist.IO
TODO: