reorganization-edit docs for WP

This commit is contained in:
Anita Buehrle committed 2016-03-02 13:54:05 -06:00
1 parent 532a6b69d9
commit bdc9eae000
59 files changed
+3184 -2148

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
---
title: Plugin Command-line Arguments
layout: default
---
If you need to give additional arguments to the plugin independently, don't
use `weave launch`, but instead run:
$ weave launch-router [other peers]
$ weave launch-plugin [plugin arguments]
The plugin command-line arguments are:
* `--log-level=debug|info|warning|error` --tells the plugin
how much information to emit for debugging.
* `--mesh-network-name=<name>` -- set <name> to blank to disable creation
of a default network, or include a name of your own choice.
* `--no-multicast-route` -- stops weave from adding a static IP route for
multicast traffic onto its interface
By default, multicast traffic is routed over the weave network.
To turn this off, e.g. you want to configure your own multicast
route, add the `--no-multicast-route` flag to `weave launch-plugin`.
>>Note: When using the Docker Plugin, there is no need to run eval $(weave env) to enable the Proxy. Because Weave is running as a plugin within Docker, the Weave Docker API Proxy, at present, cannot detect between networks.
**See Also**
* [Using the Weave Net Docker Network Plugin](/site/plugin/weave-plugin-how-to.md)
* [How the Weave Network Plugin Works](/site/plugin/plugin-how-it-works.md)
+34
View File
@@ -0,0 +1,34 @@
---
title: How the Weave Docker Network Plugin Works
layout: default
---
The Weave plugin actually provides *two* network drivers to Docker - one named `weavemesh` that can operate without a cluster store and another one named `weave` that can only work with one (like Docker's overlay driver).
### `weavemesh` driver
* Weave handles all co-ordination between hosts (referred to by Docker as a "local scope" driver)
* Supports a single network only. A network named `weave` is automatically created for you.
* 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 calls "global scope", which requires an external cluster store
* Supports multiple networks that must be created using `docker network create --driver weave ...`
* Used with Docker's cluster-store-based IPAM
There's no specific documentation from Docker on using a cluster
store, but the first part of
[Getting Started with Docker Multi-host Networking](https://github.com/docker/docker/blob/master/docs/userguide/networking/get-started-overlay.md) is a good place to start.
>>**Note:** 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.
**See Also**
* [Using the Weave Net Docker Network Plugin](/site/plugin/weave-plugin-how-to.md)
* [Plugin Command-line Arguments](/site/plugin/plug-in-command-line.md)
+90
View File
@@ -0,0 +1,90 @@
---
title: Using the Weave Net Docker Network Plugin
layout: default
---
Docker versions 1.9 and later have a plugin mechanism for adding
different network providers. Weave installs itself as a network plugin
when you start it with `weave launch`. The Weave Docker Networking plugin is fast and easy to use and
best of all doesn't require an external cluster store in order to use it.
To create a network which can span multiple Docker hosts, the Weave peers must be connected to each other, by specifying the other hosts during `weave launch` or via
[`weave connect`](/site/using-weave/finding-adding-hosts-dynamically.md).
See [Deploying Applications to Weave Net](/site/using-weave/deploying-applications.md#peer-connections) for a discussion on peer connections.
After you've launched Weave and peered your hosts, you can start containers using the following, for example:
$ docker run --net=weave -ti ubuntu
on any of the hosts, and they can all communicate with each other.
>>**Warning!** It is inadvisable to attach containers to the Weave network using the Weave Docker Networking Plugin and Weave Docker API Proxy simultaneously. Such containers will end up with two Weave network interfaces and two IP addresses, which is rarely desirable. To ensure that the proxy is not being used, do not run eval $(weave env), or docker $(weave config).
In order to use Weave's [Service Discovery](/site/weavedns/overview-using-weavedns.md) you
must pass the additional arguments `--dns` and `-dns-search`, for
which a helper is provided in the Weave script:
$ docker run --net=weave -h foo.weave.local $(weave dns-args) -tdi ubuntu
$ docker run --net=weave -h bar.weave.local $(weave dns-args) -ti ubuntu
# ping foo
###Launching Weave and Running Containers Using the Plugin
Just launch the Weave Net router onto each host and make a peer connection with the other hosts:
~~~bash
host1$ weave launch host2
host2$ weave launch host1
~~~
then run your containers using the Docker command-line:
~~~bash
host1$ docker run --net=weave -ti ubuntu
root@1458e848cd90:/# hostname -i
10.32.0.2
~~~
~~~bash
host2$ docker run --net=weave -ti ubuntu
root@8cc4b5dc5722:/# ping 10.32.0.2
PING 10.32.0.2 (10.32.0.2) 56(84) bytes of data.
64 bytes from 10.32.0.2: icmp_seq=1 ttl=64 time=0.116 ms
64 bytes from 10.32.0.2: icmp_seq=2 ttl=64 time=0.052 ms
~~~
### Restarting the Plugin
The plugin is started with a policy of `--restart=always`, so that it is always there after a restart or reboot. If you remove this container (for example, when using `weave reset`) before removing all endpoints created using `--net=weave`, Docker may hang for a long time when it subsequently tries to re-establish communications to the plugin.
Unfortunately, [Docker 1.9 may also try to commmuncate with the plugin before it has even started it](https://github.com/docker/libnetwork/issues/813).
If you are using `systemd`, it is advised that you modify the Docker unit to remove the timeout on startup. This gives Docker enough time to abandon its attempts. For example, in the file `/lib/systemd/system/docker.service`, add the following under `[Service]`:
~~~bash
TimeoutStartSec=0
~~~
###Bypassing the Central Cluster Store When Building Docker Apps
To run a Docker cluster without a central database, you need to ensure the following:
1. Run in "local" scope. This tells Docker to ignore any cross-host coordination.
2. Allow Weave to handle all the cross-host coordination and to set up all networks. This is done by using the `weave launch` command.
3. Provide an IP Address Management (IPAM) driver, which links to Weave Net's own IPAM system
All cross-host coordination is handled by Weave Net's "mesh" communication, using gossipDNS and eventual consistency to avoid the need for constant communication and dependency on a central cluster store.
**See Also**
* [How the Weave Network Plugin Works](/site/plugin/plugin-how-it-works.md)
* [Plugin Command-line Arguments](/site/plugin/plug-in-command-line.md)