Add dns support for the proxy
In the proxy, I swapped the 'flag' library for 'code.google.com/p/getopt', which uses double-dash flags. proxy lets 'weave attach' do dns registration on container start proxy needs to set DNSSearch if not specified
This commit is contained in:
1 parent
444b1482fa
commit
96a69d2303
11 files changed
+229
-102
No files matched your search
+14
@@ -0,0 +1,14 @@
|
||||
#! /bin/bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
start_suite "Proxy uses entrypoint from the image with weavewait"
|
||||
weave_on $HOST1 launch-proxy
|
||||
docker_on $HOST1 build -t inspect-ethwe - <<- EOF
|
||||
FROM gliderlabs/alpine
|
||||
ENTRYPOINT ["ip", "link", "show", "ethwe"]
|
||||
EOF
|
||||
|
||||
assert_raises "docker_proxy_on $HOST1 run -e 'WEAVE_CIDR=10.2.1.1/24' inspect-ethwe | grep 'state UP'"
|
||||
|
||||
end_suite
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#! /bin/bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
C1=10.2.0.78
|
||||
C2=10.2.0.34
|
||||
NAME=seetwo.weave.local
|
||||
|
||||
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
|
||||
|
||||
assert_dns_record $HOST1 c1 $NAME $C2
|
||||
|
||||
end_suite
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#! /bin/bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
start_suite "Proxy allows overridden entrypoint from the container with weavewait"
|
||||
weave_on $HOST1 launch-proxy
|
||||
docker_on $HOST1 build -t false - <<- EOF
|
||||
FROM gliderlabs/alpine
|
||||
ENTRYPOINT ["/bin/false"]
|
||||
EOF
|
||||
|
||||
assert_raises "docker_proxy_on $HOST1 run -e 'WEAVE_CIDR=10.2.1.1/24' --entrypoint '/sbin/ip' false link show ethwe | grep 'state UP'"
|
||||
|
||||
end_suite
|
||||
Reference in new issue
Block a user