summaryrefslogtreecommitdiffstats
path: root/src/arm/cni-deploy/roles/multus/tasks/main.yml
diff options
context:
space:
mode:
authorYibo Cai <yibo.cai@arm.com>2018-07-31 13:08:38 +0800
committerYibo Cai <yibo.cai@arm.com>2018-08-02 10:31:19 +0800
commit2e2a9c8f10c0b320dd621a86237707acb3441a21 (patch)
treef41c89561e3cd36034459f485d3f1e4ff7750cc4 /src/arm/cni-deploy/roles/multus/tasks/main.yml
parent20518dc93167aff1c83bf2995acc3e75e5a02c3d (diff)
src/arm: add k8s cni deployment tasks
Deploy Multus, SRIOV, Vhostuser(VPP+DPDK) with CRD. Change-Id: I787d5fd61c75f17d50fbaf8f86c08bdc44c557b8 Signed-off-by: Yibo Cai <yibo.cai@arm.com>
Diffstat (limited to 'src/arm/cni-deploy/roles/multus/tasks/main.yml')
-rw-r--r--src/arm/cni-deploy/roles/multus/tasks/main.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/arm/cni-deploy/roles/multus/tasks/main.yml b/src/arm/cni-deploy/roles/multus/tasks/main.yml
new file mode 100644
index 0000000..a200215
--- /dev/null
+++ b/src/arm/cni-deploy/roles/multus/tasks/main.yml
@@ -0,0 +1,24 @@
+---
+- name: Build Multus CNI
+ shell: >
+ docker run --rm --network host -v /opt/cni/bin:/opt/cni/bin golang:1.9
+ bash -c "git clone {{ multus_repo }} multus_cni && cd multus_cni &&
+ git checkout {{ multus_commit }} && ./build && cp bin/multus /opt/cni/bin/"
+ args:
+ creates: /opt/cni/bin/multus
+
+- name: Remove default CNI configuration
+ shell: rm -f /etc/cni/net.d/*
+ args:
+ warn: "no"
+
+- name: Set Multus as default CNI
+ copy:
+ src: 10-multus.conf
+ dest: /etc/cni/net.d/
+ notify:
+ - Restart kubelet
+
+- name: Import CRD task
+ import_tasks: crd.yml
+ when: inventory_hostname == groups["kube-master"][0]