From 7d3fe6923b9beda96ff71683d9159ed7d67f0954 Mon Sep 17 00:00:00 2001 From: Avinash Sridharan Date: Thu, 30 Mar 2017 22:28:36 +0000 Subject: [PATCH] Documentation: Added documentation for `cnitool`. Added documentation to simplify the usage of `cnitool` and the settings expected to be used with `cnitool`. --- cnitool.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cnitool.md diff --git a/cnitool.md b/cnitool.md new file mode 100644 index 00000000..a4bc7d35 --- /dev/null +++ b/cnitool.md @@ -0,0 +1,16 @@ +# Overview +The `cnitool` is a utility that can be used to test a CNI plugin +without the need for a container runtime. The `cnitool` takes a +`network name` and a `network namespace` and a command to `ADD` or +`DEL`,.i.e, attach or detach containers from a network. The `cnitool` +relies on the following environment variables to operate properly: +* `NETCONFPATH`: This environment variable needs to be set to a + directory. It defaults to `/etc/cni/net.d`. The `cnitool` searches + for CNI configuration files in this directory with the extension + `*.conf` or `*.json`. It loads all the CNI configuration files in + this directory and if it finds a CNI configuration with the `network + name` given to the cnitool it returns the corresponding CNI + configuration, else it returns `nil`. + +* `CNI_PATH`: For a given CNI configuration `cnitool` will search for + the corresponding CNI plugin in this path.