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

Add instructions using Docker for Mac #57

Closed
errordeveloper opened this issue Mar 30, 2016 · 5 comments
Closed

Add instructions using Docker for Mac #57

errordeveloper opened this issue Mar 30, 2016 · 5 comments

Comments

@errordeveloper
Copy link
Contributor

We could leverage CNI, or use the proxy, which should still work as from the host's perspective weave.sock is still available, yet toolbox we have to be launched via the Docker plugin.

@errordeveloper
Copy link
Contributor Author

This works:

docker run --net=weave -ti -v /etc:/rootfs/etc  -v /var/run/weave/weave.sock:/docker.sock weaveworks/kubernetes-anywhere:toolbox-v1.2

...but we are getting into some weird compose errors ;(

@errordeveloper
Copy link
Contributor Author

OK, it looks like an issue in Docker that somehow surface in Docker for Mac, more info to come...

@errordeveloper
Copy link
Contributor Author

With latest beta (1.11.0-beta6), I'm able to get it up and running with:

curl --silent --location git.io/weave-snapshot --output ./weave
chmod +x ./weave
env WEAVE_VERSION=test-docker-1.11 ./weave launch
env WEAVE_VERSION=test-docker-1.11 ./weave expose -h docker.weave.local
docker run --net=weave --volume=/:/rootfs --volume=/var/run/weave/weave.sock:/docker.sock --dns=172.17.0.1 weaveworks/kubernetes-anywhere:toolbox-v1.2 sh -c 'setup-kubelet-volumes && compose -p kube pull && compose -p kube up -d'
docker run --net=weave --volume=/:/rootfs --volume=/var/run/weave/weave.sock:/docker.sock --dns=172.17.0.1 --interactive --tty weaveworks/kubernetes-anywhere:toolbox-v1.2

But then we get into /proc/sys issue (moby/moby#21649):

I0407 12:13:45.876099    3549 kubelet.go:2365] skipping pod synchronization - [Failed to start ContainerManager [open /proc/sys/vm/overcommit_memory: read-only file system, open /proc/sys/kernel/panic: read-only file system, open /proc/sys/kernel/panic_on_oops: read-only file system]]

@errordeveloper
Copy link
Contributor Author

It should work with latest Docker for Mac and Weave Net 1.5.

@errordeveloper
Copy link
Contributor Author

errordeveloper commented Apr 25, 2016

First, bootstrap the cluster with:

sudo curl --silent --location git.io/weave --output /usr/local/bin/weave
sudo chmod +x /usr/local/bin/weave
weave launch
weave expose -h docker.weave.local
docker run \
  --volume="/:/rootfs" \
  --volume="/var/run/weave/weave.sock:/docker.sock" \
    weaveworks/kubernetes-anywhere:toolbox-v1.2 \
      sh -c 'setup-kubelet-volumes && compose -p kube up -d'

Next, try using it:

> docker run --net=weave --dns=172.17.0.1 weaveworks/kubernetes-anywhere:toolbox-v1.2 kubectl get nodes
NAME      STATUS    AGE
docker    Ready     5m

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant