File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ PLUGIN_VERSION=v0.5
4+ CNI_VERSION=v0.4.0
5+
6+ # Create default CNI directories.
7+ mkdir -p /etc/cni/net.d
8+ mkdir -p /opt/cni/bin
9+
10+ # Install ebtables.
11+ if [ ! -e /sbin/ebtables ]
12+ then
13+ apt-get update
14+ apt-get install -y ebtables
15+ fi
16+ /sbin/ebtables --list
17+
18+ # Install Azure CNI plugins.
19+ /usr/bin/curl -sSL https://github.com/Azure/azure-container-networking/releases/download/${PLUGIN_VERSION} /azure-vnet-amd64-${PLUGIN_VERSION} .tgz > /opt/cni/bin/azure.tgz
20+ tar -xzf /opt/cni/bin/azure.tgz -C /opt/cni/bin
21+
22+ # Install loopback plugin.
23+ /usr/bin/curl -sSL https://github.com/containernetworking/cni/releases/download/${CNI_VERSION} /cni-amd64-${CNI_VERSION} .tgz > /opt/cni/bin/cni.tgz
24+ tar -xzf /opt/cni/bin/cni.tgz -C /opt/cni/bin ./loopback
25+
26+ # Cleanup.
27+ rm /opt/cni/bin/* .tgz
28+ chown root:root /opt/cni/bin/*
You can’t perform that action at this time.
0 commit comments