-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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: Refactor docker-multinode and add a turndown script #21646
Conversation
GCE e2e build/test failed for commit ac6a8ec. |
PR needs rebase |
Adding label:do-not-merge because PR changes docs prohibited to auto merge |
Some error come up when used a cmd of kube::multinode::turndown docker -H ${BOOTSTRAP_DOCKER_SOCK} rm -f $(docker -H ${BOOTSTRAP_DOCKER_SOCK} ps -q) Error like this Failed to remove container (`HASH`): Error response from daemon: Driver devicemapper failed to remove root filesystem `REALLY LONG HASH`: Device is Busy |
# Utility functions for Kubernetes in docker setup | ||
# Authors @luxas @wizard_cxy @resouer @loopingz | ||
|
||
# Variables |
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 curious: Is it necessary for all this logic to be in bash or can we re-write in Go, if we intend to preserve and maintain this for a long time...
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.
I'm open to all kinds of solutions. Right now, there is no given place in the repo for this, so let's discuss about what would be the best way of doing it.
For context, see #13901
It would be so much easier if we didn't have to restart docker
. I think @mikedanese mentioned it may be possible to not have to (something like this?)
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.
I also thought about this with @fgrzadkowski
export KUBERNETES_ROLE=(master|worker|unset=local-docker)
export {OTHER OPTS...}
curl -sSL http://get.k8s.io | bash
@luxas I've been hacking the old one to work on CentOS 6.6+, would it be better to try and fold the changes into this, or raise another PR after this is merged? |
@jimmyjones2 Thanks for your comments :) The main target is #24278. |
@luxas Should these scripts also starts cluster addons like DNS, UI etc, or at least have an option to? |
gcr.io/google_containers/hyperkube-${ARCH}:v${K8S_VERSION} \ | ||
/hyperkube kubelet \ | ||
--allow-privileged=true \ | ||
--api-servers=http://localhost:8080 \ |
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.
The guide also has --address=0.0.0.0 --enable-server --hostname-override=127.0.0.1
Which is right?
Also needs -v /var/log/containers/:/var/log/containers:rw to support logging
@luxas I like the improved script, except the docker reboot and bootstrap :) Can we help you to get rid of it? |
--config=/etc/kubernetes/manifests-multi \ | ||
--cluster-dns=${DNS_SERVER_IP} \ | ||
--cluster-domain=${DNS_DOMAIN} \ | ||
--containerized \ |
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.
Is --containerized flag needed? Why don't you use shared volumes solution?
script is not working with docker 1.11. It is working with docker 1.10.3 |
@cheld Thanks for your support. |
Closing in favor for kubernetes-retired/kube-deploy#10 |
Work in progress
Feel free to comment on it. Tested on Ubuntu 15.04
Refactor the
docker-multinode
into acommon.sh
script. Format the output nicely. Uses awhile
loop instead of asleep
timeout while waiting fordocker-bootstrap
,flannel
andetcd
, which makes it much faster and reliable. Kills running services before starting again and adds aturndown
script. Replaces--bip
and--mtu
docker args instead of appending which makes it possible to run the same script multiple times without editing files by hand. Many variables are now easily editable byexport
ing.Also replaced
etcd
andhyperkube
withetcd-amd64
andhyperkube-amd64
. Updated some testing docs.Do you think this should target
v1.2
orv1.3
?@fgrzadkowski @dalanlan @brendandburns @resouer @thockin @loopingz
This change is![Reviewable](https://camo.githubusercontent.com/418245bd0e80b7ad4e6bab19cbdfcfd90c43dbb2608ea7d88e3e3844eb910abe/687474703a2f2f72657669657761626c652e6b38732e696f2f7265766965775f627574746f6e2e737667)