diff options
author | vagrant <pmikus@cisco.com> | 2020-02-04 14:16:01 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2020-02-07 20:08:43 +0000 |
commit | 8605f3f406468f57bb9b2eac12a4421f65965300 (patch) | |
tree | 5eef32ff0298ab1c3ac593adced4a502d7c8ea17 /resources/tools/testbed-setup/ansible/roles/dpdk | |
parent | d7e14a0a93e7e06047daeaf6a5575f227aeb925a (diff) |
CSIT Azure integration
+ Terraform
+ Ansible
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I353511c5ef39d8c8d43fedc61c8dbb30b4821e1b
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/dpdk')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml | 25 | ||||
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml | 34 |
2 files changed, 59 insertions, 0 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml new file mode 100644 index 0000000000..27907f7d0e --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml @@ -0,0 +1,25 @@ +--- +# file: roles/dpdk/defaults/main.yaml + +packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}" + +packages_base: + - [] + +packages_by_distro: + ubuntu: + - "build-essential" + - "libnuma-dev" + +packages_by_arch: + aarch64: + - [] + x86_64: + - [] + +dpdk_target_dir: "/opt" +dpdk_version: "dpdk-19.02" +dpdk_url: "https://fast.dpdk.org/rel" +dpdk_build_targets: + aarch64: "arm64-armv8a" + x86_64: "x86_64-native" diff --git a/resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml new file mode 100644 index 0000000000..3c4f69b5a0 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml @@ -0,0 +1,34 @@ +--- +# file: roles/dpdk/tasks/main.yaml + +- name: DPDK - Install Distribution - Release - Machine Prerequisites + package: + name: "{{ packages | flatten(levels=1) }}" + state: latest + update_cache: true + tags: + - install-dependencies + +- name: DPDK - Download Release Archive + get_url: + url: "{{ dpdk_url }}/{{ dpdk_version }}.tar.xz" + dest: "{{ dpdk_target_dir }}/{{ dpdk_version }}.tar.xz" + mode: 0644 + register: "linux__dpdk_downloaded" + tags: + - install-dpdk + +- name: Extract DPDK release archive + become: yes + shell: "cd {{ dpdk_target_dir }}; tar xf {{ dpdk_target_dir }}/{{ dpdk_version }}.tar.xz" + when: "linux__dpdk_downloaded" + register: "linux__dpdk_extracted" + tags: + - install-dpdk + +- name: Compile DPDK release + become: yes + command: "make install T={{ dpdk_build_targets[ansible_machine] }}-linuxapp-gcc DESTDIR={{ dpdk_target_dir }}/{{ dpdk_version }} chdir={{ dpdk_target_dir }}/{{ dpdk_version }}" + when: "linux__dpdk_extracted" + tags: + - install-dpdk |