contrib: cni: provide example CNI configurations

This also updates the readme to no longer contain CNI configuration
information (which had incorrect steps), and rather just points to the
example configs.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
Aleksa Sarai 2016-12-24 11:13:11 +11:00
parent 792f585c44
commit 9088a12c75
No known key found for this signature in database
GPG key ID: 9E18AA267DDB8DB4
4 changed files with 39 additions and 35 deletions

View file

@ -0,0 +1,15 @@
{
"cniVersion": "0.2.0",
"name": "ocid-bridge",
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.88.0.0/16",
"routes": [
{ "dst": "0.0.0.0/0" }
]
}
}

View file

@ -0,0 +1,4 @@
{
"cniVersion": "0.2.0",
"type": "loopback"
}

16
contrib/cni/README.md Normal file
View file

@ -0,0 +1,16 @@
## `contrib/cni` ##
There are a wide variety of different [CNI][cni] network configurations. This
directory just contains some example configurations that can be used as the
basis for your own configurations (distibutions should package these files in
example directories).
To use these configurations, place them in `/etc/cni/net.d` (or the directory
specified by `ocid.network.network_dir` in your `ocid.conf`).
In addition, you need to install the [CNI plugins][cni] necessary into
`/opt/cni/bin` (or the directory specified by `ocid.network.plugin_dir`). The
two plugins necessary for the example CNI configurations are `loopback` and
`bridge`.
[cni]: https://github.com/containernetworking/cni