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

docker: add cluster bootstrap and doc #1716

Merged
merged 2 commits into from
Oct 27, 2014

Conversation

proppy
Copy link
Contributor

@proppy proppy commented Oct 10, 2014

This bootstrap a local kubernetes cluster by running the kubelet as a baredocker container, and passing it a pod manifest with the cluster components.

Changes:

  • add getting started guide for docker locally
  • modify build/ to allow boot2docker on all platform
  • add kubernetes-bootstrap image
  • embed cluster-pod manifest in bootstrap image

You should be able to try this at home with:

docker run -d -p 10250:10250 -v /var/run/docker.sock:/var/run/docker.sock proppy/kubestrap
export KUBERNETES_MASTER=$DOCKER_HOST_IP:8080
kubecfg list pods
kubecfg -p 8181:80 run nginx 1 kube-nginx
curl $DOCKER_HOST_IP:8181

@proppy proppy changed the title boot2docker: add cluster bootstrap and doc docker: add cluster bootstrap and doc Oct 10, 2014
@proppy proppy force-pushed the boot2docker-bootstrap branch from 32676c0 to 6c04a9b Compare October 10, 2014 08:55
@bketelsen
Copy link
Contributor

closer and closer to inception.

@proppy
Copy link
Contributor Author

proppy commented Oct 10, 2014

@bketelsen I tried to start a kubelet in a pod with kubelet -runonce, but it ended up committing suicide.

$ docker logs 3447cdc8e714
...
[kubelet.go:376] Killing: 3447cdc8e714712895d3a4389afe393f521905e89ea16e4b951d0f7de509c673

So went for starting the kubelet as a bare docker container, so it doesn't try to manage itself.

@bketelsen
Copy link
Contributor

I was following along last night as you live blogged on IRC. 👍

@jbeda
Copy link
Contributor

jbeda commented Oct 10, 2014

I'm happy to review but I probably won't be able to get to this until Tuesday. I'm going to be in promo committee all day Monday.

local sub_context_dir="${build_context_base}-$b"
mkdir -p "${sub_context_dir}"
cp -R build/run-images/$b/* "${sub_context_dir}/"
cp -a build/run-images/$b/* "${sub_context_dir}/"
Copy link
Contributor

Choose a reason for hiding this comment

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

What extended attributes do we need to copy here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I needed -p, will double check and add a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@proppy
Copy link
Contributor Author

proppy commented Oct 21, 2014

Thanks for your comments @jbeda, will ping you once I have addressed them.

@proppy proppy force-pushed the boot2docker-bootstrap branch from b0aaff7 to 905f5ba Compare October 22, 2014 00:17
@@ -109,7 +110,7 @@ function kube::build::verify_prereqs() {
return 1
fi

if kube::build::is_osx; then
if kube::build::is_boot2docker; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should we get rid of is_osx?

@proppy
Copy link
Contributor Author

proppy commented Oct 22, 2014

PTAL

```
boot2docker up
$(boot2docker shellinit)
export DOCKER_HOST=$(boot2docker ip 2>/dev/null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be DOCKER_HOST or DOCKER_HOST_IP?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@jbeda
Copy link
Contributor

jbeda commented Oct 22, 2014

Looks reasonable. Ideally I'd love to see this run off of a binary release instead of requiring users to build it. I'd also love to see it fit the pattern for other providers. Ideally:

export KUBERNETES_PROVIDER=local_docker
./cluster/kube-up.sh
./cluster/kubectl.sh ...

I guess we can clean this up later as we figure out how to distribute docker images in a sane way.

Feel free to self merge when you are happy.

@proppy proppy force-pushed the boot2docker-bootstrap branch from 18e1c6b to e5e8b7d Compare October 23, 2014 15:59
@jbeda
Copy link
Contributor

jbeda commented Oct 23, 2014

Proppy -- can you squash before we merge? There are a lot of commits here.

@proppy
Copy link
Contributor Author

proppy commented Oct 23, 2014

@jbeda sure, I was planning to unify with ./cluster/ and _PROVIDER first.

@jbeda
Copy link
Contributor

jbeda commented Oct 23, 2014

@proppy SG

@proppy proppy force-pushed the boot2docker-bootstrap branch from e5e8b7d to 966c3da Compare October 24, 2014 01:07
@proppy
Copy link
Contributor Author

proppy commented Oct 24, 2014

@jbeda rebased, looking at the cluster/kube-up I think this could definitly be a separate PR.

I will do more final testing before self merging.

@jbeda
Copy link
Contributor

jbeda commented Oct 24, 2014

SGTM

@proppy proppy force-pushed the boot2docker-bootstrap branch from 9f2817e to fc54dd2 Compare October 27, 2014 18:16
@proppy
Copy link
Contributor Author

proppy commented Oct 27, 2014

@jbeda PTAL added PATH override until we have proper cluster/ integration.

@jbeda
Copy link
Contributor

jbeda commented Oct 27, 2014

LGTM -- you ready for me to merge?

@proppy
Copy link
Contributor Author

proppy commented Oct 27, 2014

Yes, do you want me to squash?

jbeda added a commit that referenced this pull request Oct 27, 2014
docker: add cluster bootstrap and doc
@jbeda jbeda merged commit 019170e into kubernetes:master Oct 27, 2014
bertinatto pushed a commit to bertinatto/kubernetes that referenced this pull request Sep 25, 2023
OCPBUGS-19452: UPSTREAM: 119317: change rolling update logic to exclude sunsetting nodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants