Run weave run with the local docker
We want to be compatible with whatever docker the user has; `weave run` is the only command that passes on arbitrary args to docker (i.e., that doesn't have a fixed set of docker features that it needs). To make this workable we still need to do some things on the remote host: the IP attachment and figuring out the DNS settings (since those may depend on the bridge IP).
This commit is contained in:
1 parent
84ce0663f8
commit
93f16d91ce
4 files changed
+72
-29
No files matched your search
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
start_suite "Run weave with --local"
|
||||
|
||||
run_on $HOST1 sudo ./weave --local reset
|
||||
|
||||
run_on $HOST1 sudo ./weave --local launch
|
||||
assert_raises "docker_on $HOST1 ps | grep weave" 0
|
||||
|
||||
docker_on $HOST1 rm -f c1 || true
|
||||
run_on $HOST1 sudo ./weave --local run 10.2.6.5/24 -ti --name=c1 ubuntu
|
||||
ok=$(docker -H tcp://$HOST1:2375 exec -i c1 sh -c "ifconfig | grep ethwe")
|
||||
assert "test -n \"$ok\" && echo pass" "pass"
|
||||
|
||||
docker_on $HOST1 rm -f c1 || true
|
||||
|
||||
end_suite
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ ip_prefix = "192.168.48"
|
||||
ip_suffix_base = 10
|
||||
|
||||
def configure_docker(host, hostname, ip)
|
||||
pkgs = "lxc-docker"
|
||||
pkgs = "lxc-docker ethtool"
|
||||
|
||||
host.vm.box = "phusion/ubuntu-14.04-amd64"
|
||||
host.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box"
|
||||
|
||||
+2
-1
@@ -16,6 +16,7 @@ for HOST in $HOSTS; do
|
||||
docker_on $HOST load -i ../weaveexec.tar
|
||||
run_on $HOST mkdir -p bin
|
||||
cat ../bin/docker-ns | run_on $HOST sh -c "cat > $DOCKER_NS"
|
||||
run_on $HOST chmod a+x $DOCKER_NS
|
||||
cat ../weave | run_on $HOST sh -c "cat > ./weave"
|
||||
run_on $HOST chmod a+x $DOCKER_NS ./weave
|
||||
run_on $HOST sudo service docker restart
|
||||
done
|
||||
Reference in new issue
Block a user