banish ~~~bash

Just use indenting, which is much easier on the eye.
This commit is contained in:
Matthias Radestock committed 2016-03-29 10:30:51 +01:00
1 parent a1eb940c51
commit 3453972ac4
30 files changed
+61 -307

No files matched your search

-10
View File
@@ -16,16 +16,12 @@ 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
@@ -37,10 +33,8 @@ 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
@@ -48,9 +42,7 @@ 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.
@@ -68,11 +60,9 @@ for details on the format and contents of this file.
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:
+1 -3
View File
@@ -8,10 +8,8 @@ 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:
@@ -32,4 +30,4 @@ route, add the `--no-multicast-route` flag to `weave launch-plugin`.
**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)
* [How the Weave Network Plugin Works](/site/plugin/plugin-how-it-works.md)
+10 -22
View File
@@ -16,9 +16,7 @@ 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.
@@ -28,38 +26,30 @@ In order to use Weave Net's [Service Discovery](/site/weavedns/overview-using-we
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
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
~~~
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
~~~
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
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
~~~
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
@@ -70,9 +60,7 @@ Unfortunately, [Docker 1.9 may also try to communicate with the plugin before it
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