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

Kubernetes connection support for mitogen. #376

Merged
merged 1 commit into from Sep 19, 2018
Merged

Kubernetes connection support for mitogen. #376

merged 1 commit into from Sep 19, 2018

Conversation

@Yannig
Copy link
Contributor

@Yannig Yannig commented Sep 19, 2018

This PR implements a kubernetes connector for mitogen.

You can test this PR using a running minikube and by running the following commands:

$ export ANSIBLE_CALLBACK_WHITELIST=profile_tasks,timer

$ ansible-playbook tests/ansible/test-kubectl.yml

Here the result of this run:

PLAY [Create pod] **********************************************************

TASK [Create a test pod] ***************************************************
Wednesday 19 September 2018  16:50:21 +0200 (0:00:00.032)       0:00:00.032 *** 
ok: [localhost] => (item=0)
ok: [localhost] => (item=1)
ok: [localhost] => (item=2)
ok: [localhost] => (item=3)
ok: [localhost] => (item=4)
ok: [localhost] => (item=5)
ok: [localhost] => (item=6)
ok: [localhost] => (item=7)
ok: [localhost] => (item=8)
ok: [localhost] => (item=9)

[...]

PLAY [Destroy pod] *********************************************************

PLAY RECAP *****************************************************************
localhost                  : ok=3    changed=0    unreachable=0    failed=0   
test-pod-0                 : ok=4    changed=2    unreachable=0    failed=0   
test-pod-1                 : ok=4    changed=2    unreachable=0    failed=0   
test-pod-2                 : ok=4    changed=2    unreachable=0    failed=0   
test-pod-3                 : ok=4    changed=2    unreachable=0    failed=0   
test-pod-4                 : ok=4    changed=2    unreachable=0    failed=0   
test-pod-5                 : ok=4    changed=2    unreachable=0    failed=0   
test-pod-6                 : ok=4    changed=2    unreachable=0    failed=0   
test-pod-7                 : ok=4    changed=2    unreachable=0    failed=0   
test-pod-8                 : ok=4    changed=2    unreachable=0    failed=0   
test-pod-9                 : ok=4    changed=2    unreachable=0    failed=0   

Wednesday 19 September 2018  16:51:16 +0200 (0:00:00.361)       0:00:55.149 *** 
=============================================================================== 
Simple shell with linear ----------------------------------------------- 22.06s
Simple file with linear ------------------------------------------------ 18.36s
Create a test pod ------------------------------------------------------- 5.97s
Simple shell with mitogen ----------------------------------------------- 5.61s
Wait pod to be running -------------------------------------------------- 2.61s
Simple file with mitogen ------------------------------------------------ 0.36s
Add pod to pods group --------------------------------------------------- 0.15s

Shell is about 4 times faster and simple file verification is about 40 times faster!

@dw
Copy link
Owner

@dw dw commented Sep 19, 2018

I guess now I'll need a VM with kubectl to play with :P

Don't worry about CI, there are a ton of known issues at present unrelated to this PR that will be fixed before 0.2.3 is released. Thanks for contributing this!

@dw dw merged commit 4356fdf into dw:master Sep 19, 2018
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@Yannig
Copy link
Contributor Author

@Yannig Yannig commented Sep 20, 2018

Great!
To get a Kubernetes up and running in a minute, you can use minikube. It works for any OS of the market.
https://github.com/kubernetes/minikube

dw added a commit that referenced this pull request Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.