Add conflist and test scripts
authorMichael C Cambria <mcc@node.halfball.org>
Thu, 18 May 2017 20:38:49 +0000 (20:38 +0000)
committerMichael C Cambria <mcc@node.halfball.org>
Thu, 18 May 2017 20:38:49 +0000 (20:38 +0000)
anycast.conflist [new file with mode: 0644]
mcc-add-anycast.sh [new file with mode: 0755]
mcc-del-anycast.sh [new file with mode: 0755]

diff --git a/anycast.conflist b/anycast.conflist
new file mode 100644 (file)
index 0000000..ba2b0be
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "name": "anycast",
+  "cniVersion": "0.3.1",
+  "plugins": [
+    {
+      "type": "bridge",
+      "bridge": "mynet",
+      "ipMasq": true,
+      "isGateway": true,
+      "ipam": {
+      "type": "host-local",
+      "subnet": "10.244.10.0/24",
+      "routes": [
+          { "dst": "0.0.0.0/0"  }
+      ]
+      }
+    },
+    {
+       "type": "anycast",
+       "myAwesomeFlag": true,
+       "anotherAwesomeArg": "172.19.0.1",
+       "StaticIP": "10.244.10.209",
+       "Uplink": "mynet",
+       "viaIP": "10.244.10.1"
+    }
+  ]
+}
+
diff --git a/mcc-add-anycast.sh b/mcc-add-anycast.sh
new file mode 100755 (executable)
index 0000000..fd4a471
--- /dev/null
@@ -0,0 +1,18 @@
+#/bin/bash
+export DEBUG=1
+export NETCONFPATH=/home/mcc/go/src/github.com/containernetworking/plugins
+export CNI_PATH=/home/mcc/go/src/github.com/containernetworking/plugins/bin
+
+export CAP_ARGS='{
+    "advertise": [
+        {
+            "myAwesomeFlag": "true",
+            "anotherAwesomeArg": "172.19.0.1"
+        }
+    ]
+}'
+
+#./cnitool add anycast /var/run/netns/test0
+/home/mcc/go/src/github.com/containernetworking/cni/cnitool/cnitool add anycast /var/run/netns/test0
+
+
diff --git a/mcc-del-anycast.sh b/mcc-del-anycast.sh
new file mode 100755 (executable)
index 0000000..95d309a
--- /dev/null
@@ -0,0 +1,18 @@
+#/bin/bash
+export DEBUG=1
+export NETCONFPATH=/home/mcc/go/src/github.com/containernetworking/plugins
+export CNI_PATH=/home/mcc/go/src/github.com/containernetworking/plugins/bin
+
+export CAP_ARGS='{
+    "advertise": [
+        {
+            "myAwesomeFlag": "true",
+            "anotherAwesomeArg": "172.19.0.1"
+        }
+    ]
+}'
+
+#./cnitool add anycast /var/run/netns/test0
+/home/mcc/go/src/github.com/containernetworking/cni/cnitool/cnitool del anycast /var/run/netns/test0
+
+