diff options
author | Yibo Cai <yibo.cai@arm.com> | 2018-07-31 13:08:38 +0800 |
---|---|---|
committer | Yibo Cai <yibo.cai@arm.com> | 2018-08-02 10:31:19 +0800 |
commit | 2e2a9c8f10c0b320dd621a86237707acb3441a21 (patch) | |
tree | f41c89561e3cd36034459f485d3f1e4ff7750cc4 /src/arm/cni-deploy/roles/sriov/tasks | |
parent | 20518dc93167aff1c83bf2995acc3e75e5a02c3d (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/sriov/tasks')
-rw-r--r-- | src/arm/cni-deploy/roles/sriov/tasks/crd.yml | 13 | ||||
-rw-r--r-- | src/arm/cni-deploy/roles/sriov/tasks/main.yml | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/arm/cni-deploy/roles/sriov/tasks/crd.yml b/src/arm/cni-deploy/roles/sriov/tasks/crd.yml new file mode 100644 index 0000000..5cc7892 --- /dev/null +++ b/src/arm/cni-deploy/roles/sriov/tasks/crd.yml @@ -0,0 +1,13 @@ +--- +- name: Copy SRIOV template + template: + src: sriov-obj.yml.j2 + dest: /tmp/sriov-obj.yml + +- name: Copy SRIOV testpod template + template: + src: sriov-testpod.yml.j2 + dest: /root/sriov-testpod.yml + +- name: Create SRIOV network object + shell: kubectl apply -f /tmp/sriov-obj.yml diff --git a/src/arm/cni-deploy/roles/sriov/tasks/main.yml b/src/arm/cni-deploy/roles/sriov/tasks/main.yml new file mode 100644 index 0000000..9c190ad --- /dev/null +++ b/src/arm/cni-deploy/roles/sriov/tasks/main.yml @@ -0,0 +1,12 @@ +--- +- name: Build SRIOV CNI + shell: > + docker run --rm --network host -v /opt/cni/bin:/opt/cni/bin golang:1.9 + bash -c "git clone {{ sriov_repo }} sriov_cni && cd sriov_cni && + git checkout {{ sriov_commit }} && ./build && cp bin/sriov /opt/cni/bin/" + args: + creates: /opt/cni/bin/sriov + +- name: Import CRD task + import_tasks: crd.yml + when: inventory_hostname == groups["kube-master"][0] |