fixed formatting for wp and spellcheck
This commit is contained in:
1 parent
d68c1a8187
commit
b3b93b28df
37 files changed
+283
-120
No files matched your search
@@ -13,14 +13,19 @@ manager built by Google.
|
||||
|
||||
The Weave Net CNI plugin is installed when you run `weave setup`, if
|
||||
your machine has the directories normally used to host CNI plugins.
|
||||
|
||||
To create those directories, run (as root):
|
||||
|
||||
~~~bash
|
||||
mkdir -p /opt/cni/bin
|
||||
mkdir -p /etc/cni/net.d
|
||||
~~~
|
||||
|
||||
Then run:
|
||||
|
||||
~~~bash
|
||||
weave setup
|
||||
~~~
|
||||
|
||||
###Launching Weave Net
|
||||
|
||||
@@ -32,8 +37,10 @@ See [Deploying Applications to Weave Net](/site/using-weave/deploying-applicatio
|
||||
As well as launching Weave Net, you have to run an extra command to
|
||||
perform some additional configuration of the Weave bridge:
|
||||
|
||||
~~~bash
|
||||
weave launch <peer hosts>
|
||||
weave expose
|
||||
~~~
|
||||
|
||||
###Configuring Kubernetes to use the CNI Plugin
|
||||
|
||||
@@ -41,14 +48,16 @@ After you've launched Weave and peered your hosts, you can configure
|
||||
Kubernetes to use Weave, by adding the following options to the
|
||||
`kubelet` command:
|
||||
|
||||
~~~bash
|
||||
--network-plugin=cni --network-plugin-dir=/etc/cni/net.d
|
||||
~~~
|
||||
|
||||
See the [`kubelet` documentation](http://kubernetes.io/v1.1/docs/admin/kubelet.html)
|
||||
for more details.
|
||||
|
||||
Now, whenever Kubernetes starts a pod, it will be attached to the Weave network.
|
||||
|
||||
###The CNI network configuration file
|
||||
###Using the CNI network configuration file
|
||||
|
||||
All CNI plugins are configured by a JSON file in the directory
|
||||
`/etc/cni/net.d/`. `weave setup` installs a minimal configuration
|
||||
@@ -57,13 +66,13 @@ file named `10-weave.conf`, which you can alter to suit your needs.
|
||||
See the [CNI Spec]](https://github.com/appc/cni/blob/master/SPEC.md#network-configuration)
|
||||
for details on the format and contents of this file.
|
||||
|
||||
By default, the Weave CNI plugin will add a default route out via the Weave bridge, so your containers can access resources on the internet. If you do not want this, add a section to the config file specifying no routes:
|
||||
By default, the Weave CNI plugin adds a default route out via the Weave bridge, so your containers can access resources on the internet. If you do not want this, add a section to the config file that specifies no routes:
|
||||
|
||||
```
|
||||
~~~bash
|
||||
"ipam": {
|
||||
"routes": [ ]
|
||||
}
|
||||
```
|
||||
~~~
|
||||
|
||||
The following other fields in the spec are supported:
|
||||
|
||||
@@ -73,5 +82,5 @@ The following other fields in the spec are supported:
|
||||
|
||||
###Caveats
|
||||
|
||||
- The Weave router container must be running for CNI to allocate addresses
|
||||
- The Weave Net router container must be running for CNI to allocate addresses
|
||||
- The CNI plugin does not add entries to Weave DNS.
|
||||
@@ -8,8 +8,10 @@ layout: default
|
||||
If you need to give additional arguments to the plugin independently, don't
|
||||
use `weave launch`, but instead run:
|
||||
|
||||
~~~bash
|
||||
$ weave launch-router [other peers]
|
||||
$ weave launch-plugin [plugin arguments]
|
||||
~~~
|
||||
|
||||
The plugin command-line arguments are:
|
||||
|
||||
@@ -25,7 +27,7 @@ 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.
|
||||
>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**
|
||||
|
||||
|
||||
@@ -24,7 +24,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](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.
|
||||
>**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**
|
||||
|
||||
@@ -16,20 +16,23 @@ See [Deploying Applications to Weave Net](/site/using-weave/deploying-applicatio
|
||||
|
||||
After you've launched Weave Net and peered your hosts, you can start containers using the following, for example:
|
||||
|
||||
~~~bash
|
||||
$ 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).
|
||||
>**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 Net'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:
|
||||
|
||||
~~~bash
|
||||
$ 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 Net and Running Containers Using the Plugin
|
||||
@@ -63,7 +66,7 @@ PING 10.32.0.2 (10.32.0.2) 56(84) bytes of data.
|
||||
|
||||
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).
|
||||
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`, 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]`:
|
||||
|
||||
|
||||
Reference in new issue
Block a user