Launch WeaveDNS with "launch_dns_on"

This commit is contained in:
Alvaro Saurin committed 2015-06-16 15:29:36 +02:00
1 parent 8b5d0e3fbd
commit 8a935e3cb2
11 files changed
+18 -12

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ NAME=seetwo.weave.local
start_suite "Resolve names on a single host"
weave_on $HOST1 launch-dns 10.2.254.1/24 $WEAVEDNS_ARGS
launch_dns_on $HOST1 10.2.254.1/24
start_container $HOST1 $C2/24 --name=c2 -h $NAME
start_container_with_dns $HOST1 $C1/24 --name=c1
+2 -2
View File
@@ -11,8 +11,8 @@ NAME2=seetwo.weave.local
NAME4=seefour.weave.local
start() {
weave_on $HOST1 launch-dns $1 $WEAVEDNS_ARGS >/dev/null
weave_on $HOST2 launch-dns $2 $WEAVEDNS_ARGS >/dev/null
launch_dns_on $HOST1 $1 >/dev/null
launch_dns_on $HOST2 $2 >/dev/null
}
stop() {
+1 -1
View File
@@ -9,7 +9,7 @@ NAME=seetwo.$DOMAIN
start_suite "Resolve names in custom domain"
weave_on $HOST1 launch-dns 10.2.254.1/24 --domain $DOMAIN. $WEAVEDNS_ARGS
launch_dns_on $HOST1 10.2.254.1/24 --domain $DOMAIN.
start_container $HOST1 $C2/24 --name=c2 -h $NAME
start_container_with_dns $HOST1 $C1/24 --name=c1
+1 -1
View File
@@ -10,7 +10,7 @@ NAME=seeone.$DOMAIN
start_suite "Resolve unqualified names"
weave_on $HOST1 launch-dns 10.2.254.1/24 $WEAVEDNS_ARGS
launch_dns_on $HOST1 10.2.254.1/24
start_container $HOST1 $C1/24 --name=c1 -h $NAME
start_container_with_dns $HOST1 $C2/24 --name=c2 -h seetwo.$DOMAIN
+1 -1
View File
@@ -10,7 +10,7 @@ NAME3=seethree.weave.local
start_suite "Add and remove names on a single host"
weave_on $HOST1 launch-dns 10.2.254.1/24 $WEAVEDNS_ARGS
launch_dns_on $HOST1 10.2.254.1/24
start_container $HOST1 --without-dns $C2/24 --name=c2
start_container_with_dns $HOST1 $C1/24 --name=c1
+1 -1
View File
@@ -16,7 +16,7 @@ check() {
start_suite "Automatic DNS record removal on container death"
weave_on $HOST1 launch-dns 10.2.254.1/24 $WEAVEDNS_ARGS
launch_dns_on $HOST1 10.2.254.1/24
start_container_with_dns $HOST1 $C1/24 --name=c1
start_container $HOST1 $C2/24 $DOPTS
+1 -1
View File
@@ -7,7 +7,7 @@ DNS_ARGS="--no-cache"
start_suite "Resolve a non-weave address"
weave_on $HOST1 launch-dns 10.2.254.1/24 $WEAVEDNS_ARGS
launch_dns_on $HOST1 10.2.254.1/24
start_container_with_dns $HOST1 10.2.1.5/24 --name=c1
+1 -1
View File
@@ -47,7 +47,7 @@ start_suite "Weave run/start/attach/detach with multiple cidr arguments"
# lowest available address in the subnet
weave_on $HOST1 launch -debug -iprange 10.2.3.0/24
weave_on $HOST1 launch-dns 10.254.254.254/24 $WEAVEDNS_ARGS
launch_dns_on $HOST1 10.254.254.254/24
# Run container with three cidrs
CID=$(start_container $HOST1 ip:10.2.1.1/24 10.2.2.1/24 net:10.2.3.0/24 --name=multicidr -h $NAME | cut -b 1-12)
+1 -1
View File
@@ -37,7 +37,7 @@ weave_on $HOST1 launch-proxy
assert_no_resolution
# Assert behaviour with weaveDNS running
weave_on $HOST1 launch-dns 10.2.254.1/24 $WEAVEDNS_ARGS
launch_dns_on $HOST1 10.2.254.1/24
boot_containers
assert_dns_record $HOST1 c1 $C2_NAME $C2
assert_dns_record $HOST1 c2 $C1_NAME $C1
+1 -1
View File
@@ -8,7 +8,7 @@ NAME=seetwo.weave.local
start_suite "Proxy restart reattaches networking to containers"
weave_on $HOST1 launch-dns 10.2.254.1/24 $WEAVEDNS_ARGS
launch_dns_on $HOST1 10.2.254.1/24
weave_on $HOST1 launch-proxy --with-dns
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C2/24 -dt --name=c2 -h $NAME $SMALL_IMAGE /bin/sh
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C1/24 -dt --name=c1 $DNS_IMAGE /bin/sh
+7 -1
View File
@@ -37,7 +37,7 @@ CHECK_ETHWE_UP="grep ^1$ /sys/class/net/ethwe/carrier"
DOCKER_PORT=2375
WEAVEDNS_ARGS="--no-cache"
[ -n "$DEBUG" ] && WEAVEDNS_ARGS="--debug"
[ -n "$DEBUG" ] && WEAVEDNS_ARGS="$WEAVEDNS_ARGS --debug"
remote() {
rem=$1
@@ -102,6 +102,12 @@ exec_on() {
docker -H tcp://$host:$DOCKER_PORT exec $container "$@"
}
launch_dns_on() {
host=$1
shift 1
weave_on $host launch-dns $@ $WEAVEDNS_ARGS
}
start_container() {
host=$1
shift 1