-
-
Notifications
You must be signed in to change notification settings - Fork 463
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
Replace docker commands with docker sdk #12
Conversation
Since I forgot to add all functionality (e.g. adding env vars), this PR will receive some updates. |
…ocker data instead of dirs
Got the below error when testing the PR 2019/04/17 10:20:40 Creating cluster [k3s_default]
2019/04/17 10:20:47 ERROR: failed to create cluster
ERROR: couldn't create container k3d-k3s_default-server
Error: No such image: docker.io/rancher/k3s:v0.4.0 |
Can you remove k3s:v0.4.0 from your docker images and try to do this again ? |
When I stop k3s cluster, only the server stops but the worker nodes keep on running. |
kubectl get nodes only shows the server node and not the worker nodes that were created. |
Thanks for the feedback @zeerorg, I will check this tomorrow. I didn't have the problem with workers not shutting down yet. |
Not a problem, I just wanted to look a bit at this since it is a big change that's all. You are doing way too good work |
Fixed in commit 7d5964c |
Lots of significant changes here, please test again :) FYI @zeerorg & @ibuildthecloud |
|
@zeerorg and @ibuildthecloud I think this should be on par with the old version now (+ some new features) |
@zeerorg , thanks for the review.
|
Yeah, we can keep this out. We can include it in the next update. Another thing we could do is parallelize worker creation so that if someone creates a lot of workers they can be up and running more quickly. |
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.
LGTM
Sure thing. Parallelizing the work is a super good idea 👍 I also already thought about using goroutines if we decided on including the workers in the timeout. Some more ideas, but I'm happy to first merge this PR :) Maybe I can get another approval today, but since we're already actively using it without any problems, I guess we're good to go. |
Hey,
I started to replace calls to the docker executable with calls to the docker API using the Docker client SDK.
The only point where it wasn't really straight forward was the
docker cp
command, since the docker cli has some extensive checks there...What do you think about this?
Benefits:
Drawbacks:
Why?
This will enable us to spawn sets of worker nodes (as requested in an issue), without having to rely on the docker-compose executable.