{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/39838910","id":39838910,"diff_hunk":"@@ -0,0 +1,93 @@\n+#!/bin/bash\n+\n+# Copyright 2015 The Kubernetes Authors All rights reserved.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+# reconfigure docker network setting\n+set -e\n+\n+source ~/docker-cluster/kube-config/node.env\n+\n+# TODO exit 1 will break ssh, maybe just exit?\n+if [ \"$(id -u)\" != \"0\" ]; then\n+  echo >&2 \"configNetwork must be called as root!\"\n+  exit 1\n+fi\n+\n+if [[ ! -z $1 ]]; then\n+  # On master, we set flannel net config\n+  docker -H unix:///var/run/docker-bootstrap.sock run \\\n+    --net=host gcr.io/google_containers/etcd:$ETCD_VERSION \\\n+    etcdctl set /coreos.com/network/config \\\n+    \"{ \\\"Network\\\": \\\"$FLANNEL_NET\\\", \\\"Backend\\\": {\\\"Type\\\": \\\"vxlan\\\"}}\"\n+\n+fi\n+\n+\n+# TODO iface may change to a private network interface, eth0 is for default\n+flannelCID=$(docker -H unix:///var/run/docker-bootstrap.sock run \\\n+    --restart=always -d --net=host --privileged \\\n+    -v /dev/net:/dev/net quay.io/coreos/flannel:$FLANNEL_VERSION \\\n+    /opt/bin/flanneld --etcd-endpoints=http://${MASTER_IP}:4001 -iface=\"eth0\")\n+\n+# sleep to wait network","path":"cluster/docker-cluster/configNetwork.sh","position":44,"original_position":44,"commit_id":"7eba3ff8d3584ab9fb01a405f27415ae956cf1fe","original_commit_id":"7eba3ff8d3584ab9fb01a405f27415ae956cf1fe","user":{"login":"fgrzadkowski","id":10820726,"avatar_url":"https://avatars.githubusercontent.com/u/10820726?v=3","gravatar_id":"","url":"https://api.github.com/users/fgrzadkowski","html_url":"https://github.com/fgrzadkowski","followers_url":"https://api.github.com/users/fgrzadkowski/followers","following_url":"https://api.github.com/users/fgrzadkowski/following{/other_user}","gists_url":"https://api.github.com/users/fgrzadkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/fgrzadkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgrzadkowski/subscriptions","organizations_url":"https://api.github.com/users/fgrzadkowski/orgs","repos_url":"https://api.github.com/users/fgrzadkowski/repos","events_url":"https://api.github.com/users/fgrzadkowski/events{/privacy}","received_events_url":"https://api.github.com/users/fgrzadkowski/received_events","type":"User","site_admin":false},"body":"I don't understand this comment. Something missing maybe?","created_at":"2015-09-18T09:40:43Z","updated_at":"2015-09-18T09:40:43Z","html_url":"https://github.com/kubernetes/kubernetes/pull/13901#discussion_r39838910","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13901","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/39838910"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/13901#discussion_r39838910"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13901"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13901","id":44870478,"html_url":"https://github.com/kubernetes/kubernetes/pull/13901","diff_url":"https://github.com/kubernetes/kubernetes/pull/13901.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/13901.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13901","number":13901,"state":"open","locked":false,"title":"Bare-metal cluster management using docker containers","user":{"login":"resouer","id":1701782,"avatar_url":"https://avatars.githubusercontent.com/u/1701782?v=3","gravatar_id":"","url":"https://api.github.com/users/resouer","html_url":"https://github.com/resouer","followers_url":"https://api.github.com/users/resouer/followers","following_url":"https://api.github.com/users/resouer/following{/other_user}","gists_url":"https://api.github.com/users/resouer/gists{/gist_id}","starred_url":"https://api.github.com/users/resouer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resouer/subscriptions","organizations_url":"https://api.github.com/users/resouer/orgs","repos_url":"https://api.github.com/users/resouer/repos","events_url":"https://api.github.com/users/resouer/events{/privacy}","received_events_url":"https://api.github.com/users/resouer/received_events","type":"User","site_admin":false},"body":"Fixes: #13424 as well as: #8798\r\nFixes: #12722\r\n\r\nAs we discussed in original issue, this PR aims at fixing OS differentiation issues and replacing the old `ubuntu.md` work. But as the kube-in-docker issues have not been fully resolved yet, we have to keep both of the methods for now.\r\n\r\nIn this guide we still choose to use two different docker daemons, not only for separating responsibility, but also avoiding crashing running  etcd & flannel when we re-configure and restart the dockerd during deploying.\r\n\r\nIt's a fully automatic version depends on @brendandburns 's [guide](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/docker.md) and scripts [we proposed](https://github.com/kubernetes/kubernetes/tree/master/docs/getting-started-guides/docker-multinode) in getting-started-guides before, with:\r\n1. totally configurable master & kubelet\r\n2. only hundreds LOC scripts but both handles Ubuntu Centos AMZN etc\r\n3. separated network configuration\r\n4. tore down & clean up \r\n\r\n[Update] known issues:  #13791 & #13987","created_at":"2015-09-13T10:22:10Z","updated_at":"2015-09-18T09:40:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"667f42465a8e16016443d52ff0f9336b73c57ec7","assignee":{"login":"fgrzadkowski","id":10820726,"avatar_url":"https://avatars.githubusercontent.com/u/10820726?v=3","gravatar_id":"","url":"https://api.github.com/users/fgrzadkowski","html_url":"https://github.com/fgrzadkowski","followers_url":"https://api.github.com/users/fgrzadkowski/followers","following_url":"https://api.github.com/users/fgrzadkowski/following{/other_user}","gists_url":"https://api.github.com/users/fgrzadkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/fgrzadkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgrzadkowski/subscriptions","organizations_url":"https://api.github.com/users/fgrzadkowski/orgs","repos_url":"https://api.github.com/users/fgrzadkowski/repos","events_url":"https://api.github.com/users/fgrzadkowski/events{/privacy}","received_events_url":"https://api.github.com/users/fgrzadkowski/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13901/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13901/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13901/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/7eba3ff8d3584ab9fb01a405f27415ae956cf1fe","head":{"label":"ZJU-SEL:kube-in-docker","ref":"kube-in-docker","sha":"7eba3ff8d3584ab9fb01a405f27415ae956cf1fe","user":{"login":"ZJU-SEL","id":5188515,"avatar_url":"https://avatars.githubusercontent.com/u/5188515?v=3","gravatar_id":"","url":"https://api.github.com/users/ZJU-SEL","html_url":"https://github.com/ZJU-SEL","followers_url":"https://api.github.com/users/ZJU-SEL/followers","following_url":"https://api.github.com/users/ZJU-SEL/following{/other_user}","gists_url":"https://api.github.com/users/ZJU-SEL/gists{/gist_id}","starred_url":"https://api.github.com/users/ZJU-SEL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZJU-SEL/subscriptions","organizations_url":"https://api.github.com/users/ZJU-SEL/orgs","repos_url":"https://api.github.com/users/ZJU-SEL/repos","events_url":"https://api.github.com/users/ZJU-SEL/events{/privacy}","received_events_url":"https://api.github.com/users/ZJU-SEL/received_events","type":"Organization","site_admin":false},"repo":{"id":29713851,"name":"kubernetes","full_name":"ZJU-SEL/kubernetes","owner":{"login":"ZJU-SEL","id":5188515,"avatar_url":"https://avatars.githubusercontent.com/u/5188515?v=3","gravatar_id":"","url":"https://api.github.com/users/ZJU-SEL","html_url":"https://github.com/ZJU-SEL","followers_url":"https://api.github.com/users/ZJU-SEL/followers","following_url":"https://api.github.com/users/ZJU-SEL/following{/other_user}","gists_url":"https://api.github.com/users/ZJU-SEL/gists{/gist_id}","starred_url":"https://api.github.com/users/ZJU-SEL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZJU-SEL/subscriptions","organizations_url":"https://api.github.com/users/ZJU-SEL/orgs","repos_url":"https://api.github.com/users/ZJU-SEL/repos","events_url":"https://api.github.com/users/ZJU-SEL/events{/privacy}","received_events_url":"https://api.github.com/users/ZJU-SEL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ZJU-SEL/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/ZJU-SEL/kubernetes","forks_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/forks","keys_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/teams","hooks_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/events","assignees_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/tags","blobs_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/languages","stargazers_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/subscription","commits_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/merges","archive_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/downloads","issues_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/ZJU-SEL/kubernetes/releases{/id}","created_at":"2015-01-23T03:02:22Z","updated_at":"2015-04-22T03:03:07Z","pushed_at":"2015-09-18T06:15:00Z","git_url":"git://github.com/ZJU-SEL/kubernetes.git","ssh_url":"git@github.com:ZJU-SEL/kubernetes.git","clone_url":"https://github.com/ZJU-SEL/kubernetes.git","svn_url":"https://github.com/ZJU-SEL/kubernetes","homepage":"http://kubernetes.io","size":107533,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"c8f9219272851b856500de93130aca3c1b0960f5","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-09-18T09:28:52Z","pushed_at":"2015-09-18T09:37:44Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":417021,"stargazers_count":10308,"watchers_count":10308,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2547,"mirror_url":null,"open_issues_count":1770,"forks":2547,"open_issues":1770,"watchers":10308,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13901"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/13901"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/13901"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/13901/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13901/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/13901/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/7eba3ff8d3584ab9fb01a405f27415ae956cf1fe"}}}}