Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Proxy support for IPAM #721

Merged
merged 6 commits into from
May 23, 2015
Merged

Proxy support for IPAM #721

merged 6 commits into from
May 23, 2015

Conversation

paulbellamy
Copy link
Contributor

Pass -e WEAVE_CIDR= to your container to use IPAM. If IPAM is not
enabled on the weave router, the container will be booted without weave
networking.

I'm not crazy about adding another undocumented weave cli command
(ipam-cidr), but it saves the proxy messing around finding container
IPs.

Fixes #657

@rade
Copy link
Member

rade commented May 20, 2015

pt 2 of #657 (comment) still needs doing.

@paulbellamy
Copy link
Contributor Author

@bboreham requests that, instead of shelling out, we use the weave HTTP api to determine the ipam CIDR. I agree. Will add that to this PR.

Pass `-e WEAVE_CIDR=` to your container to use IPAM. If IPAM is not
enabled on the weave router, the container will be booted without weave
networking.

I'm not crazy about adding *another* undocumented weave cli command
(ipam-cidr), but it saves the proxy messing around finding container
IPs.
@@ -10,8 +10,8 @@ start_suite "Proxy registers containers with dns"

weave_on $HOST1 launch-dns 10.2.254.1/24
weave_on $HOST1 launch-proxy --with-dns
docker_proxy_on $HOST1 run -e WEAVE_CIDR=$C2/24 -dt --name=c2 -h $NAME gliderlabs/alpine /bin/sh
docker_proxy_on $HOST1 run -e WEAVE_CIDR=$C1/24 -dt --name=c1 aanand/docker-dnsutils /bin/sh
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C2/24 -dt --name=c2 -h $NAME gliderlabs/alpine /bin/sh

This comment was marked as abuse.

weave_on $HOST2 launch -iprange $UNIVERSE $HOST1
weave_on $HOST2 launch-proxy --ipam

proxy start_container $HOST1 -e WEAVE_CIDR= --name=c1

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@rade rade modified the milestone: 0.11.0 May 21, 2015

host1$ docker run -e WEAVE_CIDR= -ti ubuntu /bin/sh

Alternatively, to enable automatic allocation of all containers without a `WEAVE_CIDR`, we can launch the proxy with the `--ipam` option. For example:

This comment was marked as abuse.

@paulbellamy paulbellamy assigned bboreham and rade and unassigned paulbellamy and bboreham May 22, 2015
rade added a commit that referenced this pull request May 23, 2015
@rade rade merged commit 5387eb7 into weaveworks:master May 23, 2015
@rade
Copy link
Member

rade commented May 23, 2015

I did some tidying up of this post-merge in 0612f27, c904a65, b42b045.

@rade
Copy link
Member

rade commented May 23, 2015

some more tidying up in 1c4beb5, 01bc994, b1af1f7.

@paulbellamy paulbellamy deleted the proxy-ipam branch May 26, 2015 10:07
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.

[proxy] Add IPAM support
3 participants