Create a plugin for up'ing a lo device

- Believe we need sudo to create netns
- Use syscall instead of relying on ip netns
- Add sudo to .travis.yml
- Needs more -E
- Revert Godeps GoVersion to 1.4.2
- in travis, test command is run with all necessary env vars
- Loopback plugin only works on 'lo' interface
- Update README, add loopback plugin config
- note script dependency on jq

Signed-off-by: Gabe Rosenhouse <grosenhouse@pivotal.io>
This commit is contained in:
Zachary Gershman
2016-02-12 09:30:10 -08:00
committed by zachgersh
parent ebd5be8475
commit 2708bdf2f5
7 changed files with 182 additions and 4 deletions

View File

@@ -24,7 +24,9 @@ This repository includes a number of common plugins that can be found in plugins
Please see Documentation/ folder for documentation about particular plugins.
## Running the plugins
The scripts/ directory contains two scripts, priv-net-run.sh and docker-run.sh, that can be used to exercise the plugins.
The scripts/ directory contains two scripts, `priv-net-run.sh` and `docker-run.sh`, that can be used to exercise the plugins.
**note - priv-net-run.sh depends on `jq`**
Start out by creating a netconf file to describe a network:
@@ -46,6 +48,11 @@ $ cat >/etc/cni/net.d/10-mynet.conf <<EOF
}
}
EOF
$ cat >/etc/cni/net.d/99-loopback.conf <<EOF
{
"type": "loopback"
}
EOF
```
The directory `/etc/cni/net.d` is the default location in which the scripts will look for net configurations.