Skip to content
This repository was archived by the owner on May 22, 2020. It is now read-only.

Initial add of docker-multinode#12

Merged
mikedanese merged 1 commit into
kubernetes-retired:masterfrom
luxas:docker_multinode
May 22, 2016
Merged

Initial add of docker-multinode#12
mikedanese merged 1 commit into
kubernetes-retired:masterfrom
luxas:docker_multinode

Conversation

@luxas

@luxas luxas commented May 3, 2016

Copy link
Copy Markdown
Contributor

Here's kubernetes/kubernetes#21646 for this repo instead.
Ref: #10

The scripts here are refactored, but this hasn't been merged into Kuberenetes core, so we should review it and test it here.
I'm sure there are bugs around (haven't touched this for about two months), so feel free to comment on it.

The docs around this are just unorganized, mostly outdated and kind of ugly.
We should link to guides in the docs for example instead of having a testing section here
We should discuss how this updates should be made to the docs repo when updating something here etc.

It should be much easier to run this guide too, and I'm proposing to have just one script (we may call it kube-up or whatever) instead of many small (master, worker, etc)
This doesn't work with docker-1.11
We should use @ArtfulCoder's one-container DNS solution instead of the current one I think

And the long-term goal would probably to be to write this purely in Go instead.

I will update this when I have time, and when we have an initial draft, let's merge it.

@johndmulhausen @mikedanese @vishh @janetkuo @fgrzadkowski @cheld @zreigz @batikanu @jimmyjones2 @jumpkick @yidinghan @brendandburns

Comment thread docker-multinode/common.sh Outdated
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../../..

# Source useful scripts
source "${KUBE_ROOT}/hack/lib/util.sh"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not working any more - copy them over?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have errors:

./common.sh: line 48: ./../../../hack/lib/util.sh: No such file or directory
./common.sh: line 49: ./../../../cluster/lib/logging.sh: No such file or directory
./common.sh: line 52: kube::log::install_errexit: command not found
./common.sh: line 65: kube::log::error: command not found

@mikedanese mikedanese self-assigned this May 4, 2016
Comment thread docker-multinode/common.sh Outdated
--iface="${FLANNEL_IFACE}"

# Wait for the flannel subnet.env file to be created instead of a timeout. This is faster and more reliable
local FLANNEL_SECONDS=0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use $SECONDS as an internal shell variable.
It is automatically increased after second. You just need reset this variable before while loop: SECONDS=0

@cheld

cheld commented May 4, 2016

Copy link
Copy Markdown
Contributor

Very nice. I am done with review.

PTAL

Comment thread docker-multinode/master.md Outdated
Now you can list the nodes:

```sh
kubectl get nodes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ missing

@cheld

cheld commented May 4, 2016

Copy link
Copy Markdown
Contributor

One more question. In this docker provisioning the master is also minion. This is not the case in salt.

What is the advantage of this? Is the intention to include the master in the daemon sets?

@jimmyjones2

Copy link
Copy Markdown

@luxas v1.2.0-alpha.7 is hardcoded in a number of places. Should this at least be updated to 1.2.0 - there is no reason anyone would want to use the alpha release?

Comment thread docker-multinode/common.sh Outdated
FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"}
FLANNEL_IFACE=${FLANNEL_IFACE:-"eth0"}
FLANNEL_IPMASQ=${FLANNEL_IPMASQ:-"true"}
FLANNEL_BACKEND=${FLANNEL_BACKEND:-"vxlan"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default to UDP for maximum compatibility? According to this vxlan is broken on CentOS 6, for example

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I remember, Docker is not fully working in CentOS. I would leave it as it is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CentOS 6

@jimmyjones2

Copy link
Copy Markdown

@luxas Should these scripts also starts cluster addons like DNS, UI etc, or at least have an option to?

--cluster-dns=${DNS_SERVER_IP} \
--cluster-domain=${DNS_DOMAIN} \
--containerized \
--v=2

Copy link
Copy Markdown

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 Which is right?
Also needs -v /var/log/containers/:/var/log/containers:rw to support logging

@luxas

luxas commented May 5, 2016

Copy link
Copy Markdown
Contributor Author

Second rev pushed.
This is huge, please comment more, and it takes some time to get right.
You may see what I did now by reviewing the second commit.

## Prerequisites

The only thing you need is a machine with **Docker 1.7.1 or higher**
The only thing you need is a machine with **Docker 1.8.3 or higher**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is 1.8.3 now necessary? It is just for docker daemon vs docker -d? 1.7.1 is the newest version CentOS 6 will ever get, and I got the previous scripts to successfully work with it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kubernetes officially supports 1.8.3-1.10.3 with release 1.2.
Sorry for CentOS 6, but it is really worth it to not upgrade?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:( Fair enough. Sadly plenty of corporate luttides out there!

@cheld

cheld commented May 9, 2016

Copy link
Copy Markdown
Contributor

2 small comments. PTAL

@luxas

luxas commented May 10, 2016

Copy link
Copy Markdown
Contributor Author

Third commit pushed.
PTAL @cheld and others

--data-dir=/var/etcd/data

# Wait for etcd to come up
sleep 5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@batikanu you investigated more time in analysis of the curl on etcd. Better idea?

@zreigz

zreigz commented May 12, 2016

Copy link
Copy Markdown

I've made some effort to be able test this solution automatically. I've prepared Vagrant project which can create VM instances for master and worker. Additionally it:

You can find this here: https://github.com/FujitsuEnablingSoftwareTechnologyGmbH/kube-deploy-vagrant

It uses centos 7 image with the newest Docker 1.11.1. Unfortunately the newest docker has bug and cannot start images from “bootstrap” instance of the Docker daemon. I've created bug for this:
moby/moby#22684

I will try downgrade docker and continue testing. With this vagrant cluster I will be able run e2e tests.

@zreigz

zreigz commented May 12, 2016

Copy link
Copy Markdown

I've managed downgrade docker to 1.10.3 and master started correctly. I noticed problem with worker on node instance. It seems to started correctly but kubectl get nodes doesn't show this worker. When I added
--hostname-override=127.0.0.1 after this line https://github.com/luxas/kube-deploy/blob/docker_multinode/docker-multinode/common.sh#L331
then worker was visible. Any idea ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants