Added documentation website content, and a workflow to publish it to GitHub Pages
* Copied, rearranged and modified the contents of the old site directory for Jekyll static site generator, into the website directory * Added some Jekyll-specific things for looks, including: * _config.yaml, Gemfile.* and 404.html files * _data, _layouts and assets directories and their content * Added .github/workflows/github-pages-publish.yml workflow
This commit is contained in:
1 parent
92779f3e57
commit
e2db8a25bd
82 files changed
+6162
No files matched your search
@@ -0,0 +1,6 @@
|
||||
---
|
||||
title: Weave Net Docker Plugin
|
||||
menu_order: 50
|
||||
search_type: Documentation
|
||||
---
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
title: How the Weave Net Docker Network Plugins Work
|
||||
menu_order: 10
|
||||
search_type: Documentation
|
||||
---
|
||||
|
||||
|
||||
The Weave Net legacy 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), while
|
||||
the V2 plugin provides *one* - `weaveworks/net-plugin:latest_release`
|
||||
operating only in swarm mode.
|
||||
|
||||
### weavemesh driver
|
||||
|
||||
* Weave Net 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 Net'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://docs.docker.com/engine/userguide/networking/get-started-overlay/) 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.
|
||||
|
||||
The plugin accepts the following options via `docker network create ... --opt`:
|
||||
|
||||
* `works.weave.multicast` -- tells weave to add a static IP
|
||||
route for multicast traffic onto its interface.
|
||||
|
||||
>**Note:** If you connect a container to multiple Weave networks, at
|
||||
most one of them can have the multicast route enabled. The `weave`
|
||||
network created when the plugin is first launched has the multicast
|
||||
option turned on, but for any networks you create it defaults to off.
|
||||
|
||||
### weaveworks/net-plugin:latest_release driver
|
||||
|
||||
* The driver runs within the plugin V2.
|
||||
* Requires Docker to run in [swarm mode](https://docs.docker.com/engine/swarm/swarm-mode/).
|
||||
* Supports multiple networks.
|
||||
* Used with Docker's IPAM.
|
||||
|
||||
|
||||
**See Also**
|
||||
|
||||
* [Integrating Docker via the Network Plugin (Legacy)]({{ '/install/plugin/plugin' | relative_url }})
|
||||
* [Integrating Docker via the Network Plugin (V2)]({{ '/install/plugin/plugin-v2' | relative_url }})
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
title: Integrating Docker via the Network Plugin (V2)
|
||||
menu_order: 20
|
||||
search_type: Documentation
|
||||
---
|
||||
|
||||
* [Installation](#installation)
|
||||
* [Configuring the Plugin](#configuring)
|
||||
* [Running Services or Containers Using the Plugin](#usage)
|
||||
|
||||
Docker Engine version 1.12 introduced [a new plugin system (V2)](https://docs.docker.com/engine/extend/).
|
||||
This document describes how to use the Network Plugin V2 of Weave Net.
|
||||
|
||||
Before using the plugin, please keep in mind the plugin works only in Swarm
|
||||
mode and requires Docker version 1.13 or later.
|
||||
|
||||
### <a name="installation"></a>Installation
|
||||
|
||||
To install the plugin run the following command on _each_ host already
|
||||
participating in a Swarm cluster, i.e. on all master and worker nodes:
|
||||
|
||||
$ docker plugin install weaveworks/net-plugin:latest_release
|
||||
|
||||
Docker will pull the plugin from Docker Store, and it will ask to grant
|
||||
privileges before installing the plugin. Afterwards, it will start `weaver`
|
||||
process which will try to connect to Swarm masters running Weave Net.
|
||||
|
||||
### <a name="configuring"></a>Configuring the Plugin
|
||||
|
||||
There are several configuration parameters which can be set with:
|
||||
|
||||
$ docker plugin set weaveworks/net-plugin:latest_release PARAM=VALUE
|
||||
|
||||
The parameters include:
|
||||
|
||||
* `WEAVE_PASSWORD` - if non empty, it will instruct Weave Net to encrypt
|
||||
traffic - see [here]({{ '/tasks/manage/security-untrusted-networks' | relative_url }}) for
|
||||
more details.
|
||||
* `WEAVE_MULTICAST` - set to 1 on each host running the plugin to enable
|
||||
multicast traffic on any Weave Net network.
|
||||
* `WEAVE_MTU` - Weave Net defaults to 1376 bytes, but you can set a
|
||||
smaller size if your underlying network has a tighter limit, or set
|
||||
a larger size for better performance if your network supports jumbo
|
||||
frames - see [here]({{ '/tasks/manage/fastdp#mtu' | relative_url }}) for more
|
||||
details.
|
||||
* `IPALLOC_RANGE` - the range of IP addresses used by Weave Net and the subnet
|
||||
they are placed in (CIDR format; default 10.32.0.0/12).
|
||||
See [here]({{ '/tasks/ipam/configuring-weave' | relative_url }}) for more details.
|
||||
|
||||
Before setting any parameter, the plugin has to be disabled with:
|
||||
|
||||
$ docker plugin disable weaveworks/net-plugin:latest_release
|
||||
|
||||
To re-enable the plugin run the following command:
|
||||
|
||||
$ docker plugin enable weaveworks/net-plugin:latest_release
|
||||
|
||||
### <a name="usage"></a>Running Services or Containers Using the Plugin
|
||||
|
||||
After you have launched the plugin, you can create a network for Docker Swarm
|
||||
services by running the following command on any Docker Swarm master node:
|
||||
|
||||
$ docker network create --driver=weaveworks/net-plugin:latest_release mynetwork
|
||||
|
||||
Or you can create a network for any Docker container with:
|
||||
|
||||
$ docker network create --driver=weaveworks/net-plugin:latest_release --attachable mynetwork
|
||||
|
||||
To start a service attached to the network run, for example:
|
||||
|
||||
$ docker service create --network=mynetwork ...
|
||||
|
||||
Or to start a container:
|
||||
|
||||
$ docker run --network=mynetwork ...
|
||||
|
||||
**See Also**
|
||||
|
||||
* [Integrating Docker via the Network Plugin (Legacy)]({{ '/install/plugin/plugin' | relative_url }})
|
||||
* [How the Weave Network Plugins Work]({{ '/install/plugin/plugin-how-it-works' | relative_url }})
|
||||
* [Troubleshooting the V2 plugin]({{ '/troubleshooting#v2plugin' | relative_url }})
|
||||
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: Integrating Docker via the Network Plugin (Legacy)
|
||||
menu_order: 30
|
||||
search_type: Documentation
|
||||
---
|
||||
|
||||
* [Launching Weave Net and Running Containers Using the Plugin](#launching)
|
||||
* [Restarting the Plugin](#restarting)
|
||||
|
||||
Docker versions 1.9 and later have a plugin mechanism for adding
|
||||
different network providers. Weave Net 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, unlike other
|
||||
networking plugins, does not require an external cluster store.
|
||||
|
||||
To create a network which can span multiple Docker hosts, Weave Net peers must be connected to each other, by specifying the other hosts during `weave launch` or via
|
||||
[`weave connect`]({{ '/tasks/manage/finding-adding-hosts-dynamically' | relative_url }}).
|
||||
|
||||
See [Launching Weave Net]({{ '/install/using-weave#peer-connections' | relative_url }}) for a discussion on peer connections.
|
||||
|
||||
After you've launched Weave Net and peered your hosts, you can start containers using the following, for example:
|
||||
|
||||
$ docker run --net=weave -ti weaveworks/ubuntu
|
||||
|
||||
on any of the hosts, and they can all communicate with each other
|
||||
using any protocol, even multicast.
|
||||
|
||||
In order to use Weave Net's [Service Discovery]({{ '/tasks/weavedns/weavedns' | relative_url }}) 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 weaveworks/ubuntu
|
||||
$ docker run --net=weave -h bar.weave.local $(weave dns-args) -ti weaveworks/ubuntu
|
||||
# ping foo
|
||||
|
||||
|
||||
### <a name="launching"></a>Launching Weave Net and Running Containers Using the Plugin
|
||||
|
||||
Just launch the Weave Net router onto each host and make a peer connection with the other hosts:
|
||||
|
||||
host1$ weave launch host2
|
||||
host2$ weave launch host1
|
||||
|
||||
then run your containers using the Docker command-line:
|
||||
|
||||
host1$ docker run --net=weave -ti weaveworks/ubuntu
|
||||
root@1458e848cd90:/# hostname -i
|
||||
10.32.0.2
|
||||
|
||||
host2$ docker run --net=weave -ti weaveworks/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
|
||||
|
||||
|
||||
### <a name="multi"></a>Creating multiple Docker Networks
|
||||
|
||||
Docker enables you to create multiple independent networks and attach
|
||||
different sets of containers to each network. However, coordinating
|
||||
this between hosts requires that you run Docker in ["swarm mode"](https://docs.docker.com/engine/swarm/swarm-mode/) or configure a
|
||||
["key-value store"](https://docs.docker.com/engine/userguide/networking/get-started-overlay/#/set-up-a-key-value-store).
|
||||
|
||||
To operate in swarm mode, you are required to use the plugin v2 of Weave Net.
|
||||
See [Integrating Docker via the Network Plugin (V2)]({{ '/install/plugin/plugin-v2' | relative_url }}) for
|
||||
more details.
|
||||
|
||||
If your Docker installation has a key-value store, create a network
|
||||
based on Weave Net as follows:
|
||||
|
||||
$ docker network create --driver=weave mynetwork
|
||||
|
||||
then use it to connect a container:
|
||||
|
||||
$ docker run --net=mynetwork ...
|
||||
|
||||
or
|
||||
|
||||
$ docker network connect mynetwork somecontainer
|
||||
|
||||
Containers attached to different Docker Networks are
|
||||
[isolated through subnets]({{ '/tasks/manage/application-isolation' | relative_url }}).
|
||||
|
||||
|
||||
### <a name="restarting"></a>Restarting the Plugin
|
||||
|
||||
The plugin, like all Weave Net components, 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 communicate with the plugin before it has even started it](https://github.com/docker/libnetwork/issues/813).
|
||||
|
||||
If you are using `systemd` with Docker 1.9, 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]`:
|
||||
|
||||
TimeoutStartSec=0
|
||||
|
||||
|
||||
**See Also**
|
||||
|
||||
* [How the Weave Network Plugins Work]({{ '/install/plugin/plugin-how-it-works' | relative_url }})
|
||||
Reference in new issue
Block a user