Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba266ef8d3 | ||
|
|
f434fad3be | ||
|
|
bab758ebf9 | ||
|
|
800f4663b6 | ||
|
|
b1b62afa90 | ||
|
|
6b90ef7078 | ||
|
|
2ed4b45c24 | ||
|
|
47ba9748b4 | ||
|
|
077ad4208f | ||
|
|
c19edec364 | ||
|
|
0c2aa494ae | ||
|
|
73e0a6bb0a | ||
|
|
abf1db0045 | ||
|
|
b40b78ece0 | ||
|
|
3ade796e8d | ||
|
|
7c2e808924 | ||
|
|
7d2227c5a4 | ||
|
|
8a517d5c7c | ||
|
|
48658f011f | ||
|
|
4ebb13fa94 | ||
|
|
ff9a6b91a4 | ||
|
|
86fc37a968 | ||
|
|
37ae169323 | ||
|
|
1ce0df4e94 | ||
|
|
db5ba61915 | ||
|
|
1d9ef76080 |
No files matched your search
@@ -1,3 +1,17 @@
|
||||
## Release 1.4.1
|
||||
|
||||
This is a bug-fix release to cover a few issues that came up since the
|
||||
release of 1.4.0.
|
||||
|
||||
* Weave would fail to launch when `$DOCKER_HOST` was set to a TCP socket secured with TLS #1820/#1822
|
||||
* Weave would fail to stop when run against Docker pre-1.9 #1815/#1817
|
||||
* Issue a warning instead of failing on `--with-dns` option to proxy, which was removed #1810/#1812
|
||||
* Make `weave version` show the plugin version #1797/#1813
|
||||
* Make `weave launch` show when the a container is restarting #1778/#1814
|
||||
* Make `weave launch` fail if the plugin is running, for consistency with router and proxy. #1818/#1819
|
||||
|
||||
More details in the [change log](https://github.com/weaveworks/weave/issues?q=milestone%3A1.4.1).
|
||||
|
||||
## Release 1.4.0
|
||||
|
||||
**Highlights**
|
||||
|
||||
@@ -21,6 +21,7 @@ func main() {
|
||||
justVersion bool
|
||||
logLevel = "info"
|
||||
c = proxy.Config{Image: "weaveworks/weaveexec"}
|
||||
withDNS bool
|
||||
)
|
||||
|
||||
c.Version = version
|
||||
@@ -39,6 +40,7 @@ func main() {
|
||||
mflag.BoolVar(&c.TLSConfig.Enabled, []string{"#tls", "-tls"}, false, "Use TLS; implied by --tlsverify")
|
||||
mflag.StringVar(&c.TLSConfig.Key, []string{"#tlskey", "-tlskey"}, "", "Path to TLS key file")
|
||||
mflag.BoolVar(&c.TLSConfig.Verify, []string{"#tlsverify", "-tlsverify"}, false, "Use TLS and verify the remote")
|
||||
mflag.BoolVar(&withDNS, []string{"#-with-dns", "#w"}, false, "option removed")
|
||||
mflag.BoolVar(&c.WithoutDNS, []string{"-without-dns"}, false, "instruct created containers to never use weaveDNS as their nameserver")
|
||||
mflag.BoolVar(&c.NoMulticastRoute, []string{"-no-multicast-route"}, false, "do not add a multicast route via the weave interface when attaching containers")
|
||||
mflag.Parse()
|
||||
@@ -57,6 +59,10 @@ func main() {
|
||||
Log.Infoln("weave proxy", version)
|
||||
Log.Infoln("Command line arguments:", strings.Join(os.Args[1:], " "))
|
||||
|
||||
if withDNS {
|
||||
Log.Warning("--with-dns option has been removed; DNS is on by default")
|
||||
}
|
||||
|
||||
c.DockerHost = defaultDockerHost
|
||||
if dockerHost := os.Getenv("DOCKER_HOST"); dockerHost != "" {
|
||||
c.DockerHost = dockerHost
|
||||
|
||||
+10
-3
@@ -3,6 +3,8 @@ title: Using Weave Net via Docker Networking
|
||||
layout: default
|
||||
---
|
||||
|
||||
# Weave Plugin
|
||||
|
||||
New in Docker version 1.9 is a plugin mechanism to add different
|
||||
network providers.
|
||||
|
||||
@@ -18,11 +20,11 @@ you remove this container (e.g. using `weave reset`) before removing
|
||||
all endpoints created using `--net=weave`, Docker can
|
||||
[hang](https://github.com/docker/libnetwork/issues/813).
|
||||
|
||||
## Starting a container:
|
||||
## Starting a container
|
||||
|
||||
$ docker run --net=weave -ti ubuntu
|
||||
|
||||
## Using WeaveDNS for Service Discovery:
|
||||
## Using WeaveDNS for Service Discovery
|
||||
|
||||
You need to pass the additional arguments `--dns` and `-dns-search`,
|
||||
for which we provide a helper in the weave script:
|
||||
@@ -46,6 +48,11 @@ store](#cluster-store) (like Docker's overlay driver) and one named
|
||||
* Supports only a single network (we create one named `weave` for you automatically)
|
||||
* Uses Weave's partition tolerant IPAM
|
||||
|
||||
If you do create additional networks using the `weavemesh` driver,
|
||||
containers attached to them will be able to communicate with
|
||||
containers attached to `weave`; there is no isolation between those
|
||||
networks.
|
||||
|
||||
### `weave` driver
|
||||
|
||||
* This runs in what Docker call "global scope"; requires a cluster store
|
||||
@@ -56,7 +63,7 @@ There's no specific documentation from Docker on using a cluster
|
||||
store, but the first part of [Getting Started with Docker Multi-host Networking][docker-net]
|
||||
should point the way.
|
||||
|
||||
Note that in the case of multiple docker networks, all containers are
|
||||
Note that in the case of multiple networks using the `weave` driver, all containers are
|
||||
on the same virtual network but Docker allocates their addresses on
|
||||
different subnets so they cannot talk to each other directly.
|
||||
|
||||
|
||||
+3
-4
@@ -55,9 +55,8 @@ root@ubuntu:/# ping pingme
|
||||
> the hostname is not in the weaveDNS domain the container will *not*
|
||||
> be registered, but will still use weaveDNS for resolution.
|
||||
|
||||
It is also possible to force or forbid an application container's use
|
||||
of weaveDNS with the `--with-dns` and `--without-dns` options to
|
||||
`weave run` and `weave launch-proxy`.
|
||||
To disable application containers' use of weaveDNS, add the
|
||||
`--without-dns` option to `weave run` or `weave launch-proxy`.
|
||||
|
||||
## <a name="how-it-works"></a>How it works
|
||||
|
||||
@@ -100,7 +99,7 @@ In the event that weaveDNS is launched in this way, it's important that
|
||||
other calls to `weave` also specify the bridge device:
|
||||
|
||||
```bash
|
||||
$ sudo DOCKER_BRIDGE=someother weave run --with-dns ...
|
||||
$ sudo DOCKER_BRIDGE=someother weave run ...
|
||||
```
|
||||
|
||||
## <a name="load-balancing"></a>Load balancing
|
||||
|
||||
@@ -30,7 +30,7 @@ check
|
||||
|
||||
# Check we can use weave env/config with unix -Hs specified
|
||||
weave_on $HOST1 stop
|
||||
run_on $HOST1 "COVERAGE=$COVERAGE weave launch-proxy -H unix:///var/run/weave/weave.sock"
|
||||
weave_on $HOST1 launch-proxy -H unix:///var/run/weave/weave.sock
|
||||
assert_raises "run_on $HOST1 'eval \$(weave env) ; docker $CMD'"
|
||||
assert_raises "run_on $HOST1 'docker \$(weave config) $CMD'"
|
||||
|
||||
|
||||
@@ -95,25 +95,19 @@ usage() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
docker_sock() {
|
||||
if [ -z "$DOCKER_HOST" ]; then
|
||||
echo "/var/run/docker.sock"
|
||||
return
|
||||
fi
|
||||
if echo "$DOCKER_HOST" | grep -q "^unix://" >/dev/null; then
|
||||
echo "${DOCKER_HOST#unix://}"
|
||||
fi
|
||||
}
|
||||
|
||||
docker_sock_volume_mount() {
|
||||
if [ -n "$(docker_sock)" ]; then
|
||||
echo "-v $(docker_sock):$(docker_sock)"
|
||||
fi
|
||||
docker_sock_options() {
|
||||
# Pass through DOCKER_HOST if it is a Unix socket;
|
||||
# a TCP socket may be secured by TLS, in which case we can't use it
|
||||
if echo "$DOCKER_HOST" | grep -q "^unix://" >/dev/null; then
|
||||
echo "-v ${DOCKER_HOST#unix://}:${DOCKER_HOST#unix://} -e DOCKER_HOST"
|
||||
else
|
||||
echo "-v /var/run/docker.sock:/var/run/docker.sock"
|
||||
fi
|
||||
}
|
||||
|
||||
exec_remote() {
|
||||
docker $DOCKER_CLIENT_ARGS run --rm --privileged --net=host \
|
||||
$(docker_sock_volume_mount) \
|
||||
$(docker_sock_options) \
|
||||
-v /proc:/hostproc \
|
||||
-e PROCFS=/hostproc \
|
||||
-e DOCKERHUB_USER="$DOCKERHUB_USER" \
|
||||
@@ -128,7 +122,6 @@ exec_remote() {
|
||||
-e WEAVE_NO_FASTDP \
|
||||
-e WEAVE_NO_BRIDGED_FASTDP \
|
||||
-e WEAVE_NO_PLUGIN \
|
||||
-e DOCKER_HOST \
|
||||
-e DOCKER_BRIDGE \
|
||||
-e DOCKER_CLIENT_HOST="$DOCKER_CLIENT_HOST" \
|
||||
-e DOCKER_CLIENT_ARGS \
|
||||
@@ -913,29 +906,27 @@ container_weave_addrs() {
|
||||
# functions for interacting with containers
|
||||
######################################################################
|
||||
|
||||
# Check that a container named $1 with image $2 is not running
|
||||
# Check that a container for component $1 named $2 with image $3 is not running
|
||||
check_not_running() {
|
||||
case $(docker inspect --format='{{.State.Running}} {{.Config.Image}}' $1 2>/dev/null) in
|
||||
"true $2")
|
||||
echo "$1 is already running." >&2
|
||||
RUN_STATUS=$(docker inspect --format='{{.State.Running}} {{.State.Status}} {{.Config.Image}}' $2 2>/dev/null) || true
|
||||
case ${RUN_STATUS%:*} in
|
||||
"true restarting $3")
|
||||
echo "$2 is restarting; you can stop it with 'weave stop-$1'." >&2
|
||||
exit 1
|
||||
;;
|
||||
"true $2:"*)
|
||||
echo "$1 is already running." >&2
|
||||
"true "*" $3")
|
||||
echo "$2 is already running; you can stop it with 'weave stop-$1'." >&2
|
||||
exit 1
|
||||
;;
|
||||
"false $2")
|
||||
docker rm $1 >/dev/null
|
||||
;;
|
||||
"false $2:"*)
|
||||
docker rm $1 >/dev/null
|
||||
"false "*" $3")
|
||||
docker rm $2 >/dev/null
|
||||
;;
|
||||
true*)
|
||||
echo "Found another running container named '$1'. Aborting." >&2
|
||||
echo "Found another running container named '$2'. Aborting." >&2
|
||||
exit 1
|
||||
;;
|
||||
false*)
|
||||
echo "Found another container named '$1'. Aborting." >&2
|
||||
echo "Found another container named '$2'. Aborting." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -1604,14 +1595,14 @@ launch_router() {
|
||||
if [ -z "$IPRANGE_SPECIFIED" ] ; then
|
||||
IPRANGE="10.32.0.0/12"
|
||||
if command_exists netcheck && ! netcheck --ignore-iface=$BRIDGE $IPRANGE ; then
|
||||
echo "ERROR: Default --ipalloc-range $IPRANGE overlaps with existing route on host." >&2
|
||||
echo "You must pick another range and set it on all hosts." >&2
|
||||
echo "ERROR: Default --ipalloc-range $IPRANGE overlaps with existing route on host." >&2
|
||||
echo "You must pick another range and set it on all hosts." >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if [ -n "$IPRANGE" ] && command_exists netcheck && ! netcheck --ignore-iface=$BRIDGE $IPRANGE ; then
|
||||
echo "WARNING: Specified --ipalloc-range $IPRANGE overlaps with existing route on host." >&2
|
||||
echo "Unless this is deliberate, you must pick another range and set it on all hosts." >&2
|
||||
fi
|
||||
else
|
||||
if [ -n "$IPRANGE" ] && command_exists netcheck && ! netcheck --ignore-iface=$BRIDGE $IPRANGE ; then
|
||||
echo "WARNING: Specified --ipalloc-range $IPRANGE overlaps with existing route on host." >&2
|
||||
echo "Unless this is deliberate, you must pick another range and set it on all hosts." >&2
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1624,10 +1615,9 @@ launch_router() {
|
||||
# additional parameters, such as resource limits, to docker
|
||||
# when launching the weave container.
|
||||
ROUTER_CONTAINER=$(docker run --privileged -d --name=$CONTAINER_NAME \
|
||||
$(docker_sock_volume_mount) \
|
||||
$(docker_sock_options) \
|
||||
-p $PORT:$CONTAINER_PORT/tcp -p $PORT:$CONTAINER_PORT/udp \
|
||||
${NETHOST_OPT:-$DNS_PORT_MAPPING} \
|
||||
-e DOCKER_HOST \
|
||||
-e WEAVE_PASSWORD \
|
||||
-e WEAVE_CIDR=none \
|
||||
$WEAVE_DOCKER_ARGS $IMAGE $COVERAGE_ARGS \
|
||||
@@ -1682,12 +1672,11 @@ launch_proxy() {
|
||||
mkdir -p /var/run/weave
|
||||
PROXY_CONTAINER=$(docker run --privileged -d --name=$PROXY_CONTAINER_NAME --net=host \
|
||||
$PROXY_VOLUMES \
|
||||
$(docker_sock_volume_mount) \
|
||||
$(docker_sock_options) \
|
||||
-v /var/run/weave:/var/run/weave \
|
||||
-v /proc:/hostproc \
|
||||
-e PROCFS=/hostproc \
|
||||
-e WEAVE_CIDR=none \
|
||||
-e DOCKER_HOST \
|
||||
-e DOCKER_BRIDGE \
|
||||
-e WEAVE_DEBUG \
|
||||
-e COVERAGE \
|
||||
@@ -1706,16 +1695,17 @@ launch_plugin() {
|
||||
PLUGIN_CONTAINER=$(docker run --privileged -d --name=$PLUGIN_CONTAINER_NAME \
|
||||
--restart=always \
|
||||
--net=host \
|
||||
$(docker_sock_volume_mount) \
|
||||
$(docker_sock_options) \
|
||||
-v /run/docker/plugins:/run/docker/plugins \
|
||||
-e DOCKER_HOST \
|
||||
$PLUGIN_IMAGE "$@")
|
||||
}
|
||||
|
||||
remove_plugin_network() {
|
||||
docker run --rm --net=host \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
$PLUGIN_IMAGE --remove-network
|
||||
if [ -z $WEAVE_NO_PLUGIN ] && check_docker_server_api_version 1.21 ; then
|
||||
docker run --rm --net=host \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
$PLUGIN_IMAGE --remove-network
|
||||
fi
|
||||
}
|
||||
|
||||
stop_plugin() {
|
||||
@@ -1810,6 +1800,9 @@ deprecation_warnings() {
|
||||
-no-default-ipam|--no-default-ipam)
|
||||
deprecation_warning $1 "--no-default-ipalloc"
|
||||
;;
|
||||
--with-dns)
|
||||
echo "Warning: $1 has been removed; DNS is on by default" >&2
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
@@ -1829,6 +1822,7 @@ case "$COMMAND" in
|
||||
[ $# -eq 0 ] || usage
|
||||
ask_version $CONTAINER_NAME $IMAGE || true
|
||||
ask_version $PROXY_CONTAINER_NAME $EXEC_IMAGE --entrypoint=/home/weave/weaveproxy || true
|
||||
ask_version $PLUGIN_CONTAINER_NAME $PLUGIN_IMAGE || true
|
||||
;;
|
||||
# intentionally undocumented since it assumes knowledge of weave
|
||||
# internals
|
||||
@@ -1850,19 +1844,17 @@ EOF
|
||||
;;
|
||||
launch)
|
||||
deprecation_warnings "$@"
|
||||
check_not_running $CONTAINER_NAME $BASE_IMAGE
|
||||
check_not_running $PROXY_CONTAINER_NAME $BASE_EXEC_IMAGE
|
||||
check_not_running router $CONTAINER_NAME $BASE_IMAGE
|
||||
check_not_running proxy $PROXY_CONTAINER_NAME $BASE_EXEC_IMAGE
|
||||
check_not_running plugin $PLUGIN_CONTAINER_NAME $BASE_PLUGIN_IMAGE
|
||||
COMMON_ARGS=$(common_launch_args "$@")
|
||||
launch_router "$@"
|
||||
launch_proxy $COMMON_ARGS
|
||||
if [ -z $WEAVE_NO_PLUGIN ] && check_docker_server_api_version 1.21 ; then
|
||||
check_not_running $PLUGIN_CONTAINER_NAME $BASE_PLUGIN_IMAGE
|
||||
launch_plugin $COMMON_ARGS
|
||||
fi
|
||||
[ -z $WEAVE_NO_PLUGIN ] && check_docker_server_api_version 1.21 && launch_plugin $COMMON_ARGS
|
||||
;;
|
||||
launch-router)
|
||||
deprecation_warnings "$@"
|
||||
check_not_running $CONTAINER_NAME $BASE_IMAGE
|
||||
check_not_running router $CONTAINER_NAME $BASE_IMAGE
|
||||
launch_router "$@"
|
||||
echo $ROUTER_CONTAINER
|
||||
;;
|
||||
@@ -1876,12 +1868,12 @@ EOF
|
||||
;;
|
||||
launch-proxy)
|
||||
deprecation_warnings "$@"
|
||||
check_not_running $PROXY_CONTAINER_NAME $BASE_EXEC_IMAGE
|
||||
check_not_running proxy $PROXY_CONTAINER_NAME $BASE_EXEC_IMAGE
|
||||
launch_proxy "$@"
|
||||
echo $PROXY_CONTAINER
|
||||
;;
|
||||
launch-plugin)
|
||||
check_not_running $PLUGIN_CONTAINER_NAME $BASE_PLUGIN_IMAGE
|
||||
check_not_running plugin $PLUGIN_CONTAINER_NAME $BASE_PLUGIN_IMAGE
|
||||
launch_plugin "$@"
|
||||
echo $PLUGIN_CONTAINER
|
||||
;;
|
||||
|
||||
Reference in new issue
Block a user