diff options
author | pmikus <pmikus@cisco.com> | 2021-06-04 10:34:42 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2021-06-10 07:04:21 +0000 |
commit | f754eac4faf76fdbffac648769c03f5668f9f6a2 (patch) | |
tree | e43e7d6c39c71cd300add9f66fa2fa4a017130f5 /fdio.infra.ansible/roles/vpp_device/tasks/main.yaml | |
parent | 75fe508bc9e03291977c1a28ca0adc31c3149df9 (diff) |
Infra: vpp_device -> Ubuntu 20.04
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: If24c385b93e1ba310ea258984c97494b4cab467c
Diffstat (limited to 'fdio.infra.ansible/roles/vpp_device/tasks/main.yaml')
-rw-r--r-- | fdio.infra.ansible/roles/vpp_device/tasks/main.yaml | 92 |
1 files changed, 80 insertions, 12 deletions
diff --git a/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml b/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml index 33b551715f..aa381f60e2 100644 --- a/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml +++ b/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml @@ -8,10 +8,12 @@ line: "{{ item }}" with_items: - "vfio-pci" + when: + - cpu_microarchitecture == "thunderx2" tags: - load-kernel-modules -- name: VPP_device - Disable ipv6 router advertisement +- name: Disable IPv6 Router Advertisement sysctl: name: "net.ipv6.conf.default.accept_ra" value: "0" @@ -21,7 +23,7 @@ tags: - set-sysctl -- name: VPP_device - Disable ipv6 router advertisement +- name: Disable IPv6 Router Advertisement sysctl: name: "net.ipv6.conf.all.accept_ra" value: "0" @@ -31,45 +33,85 @@ tags: - set-sysctl -- name: VPP_device - Copy csit-initialize-vfs.sh +- name: Disable IPv6 MLDv1 interval + sysctl: + name: "net.ipv6.conf.all.mldv1_unsolicited_report_interval=0" + value: "0" + state: "present" + sysctl_file: "/etc/sysctl.d/90-csit.conf" + reload: "yes" + tags: + - set-sysctl + +- name: Disable IPv6 MLDv2 interval + sysctl: + name: "net.ipv6.conf.all.mldv2_unsolicited_report_interval=0" + value: "0" + state: "present" + sysctl_file: "/etc/sysctl.d/90-csit.conf" + reload: "yes" + tags: + - set-sysctl + +- name: Disable IPv6 Autoconf + sysctl: + name: "net.ipv6.conf.all.autoconf=0" + value: "0" + state: "present" + sysctl_file: "/etc/sysctl.d/90-csit.conf" + reload: "yes" + tags: + - set-sysctl + +- name: Disable IPv6 MC Forwarding + sysctl: + name: "net.ipv6.conf.all.mc_forwarding=0" + value: "0" + state: "present" + sysctl_file: "/etc/sysctl.d/90-csit.conf" + reload: "yes" + tags: + - set-sysctl + +- name: Copy csit-initialize-vfs.sh copy: src: "files/csit-initialize-vfs.sh" dest: "/usr/local/bin/" owner: "root" group: "root" - mode: "744" + mode: 0744 tags: - copy-vf-script -- name: VPP_device - Copy csit-initialize-vfs-data.sh +- name: Copy csit-initialize-vfs-data.sh copy: src: "files/{{ vfs_data_file }}" dest: "/usr/local/bin/csit-initialize-vfs-data.sh" owner: "root" group: "root" - mode: "744" + mode: 0744 tags: copy-vf-data-script when: - vfs_data_file is defined -- name: VPP_device - Copy default csit-initialize-vfs-data.sh +- name: Copy Default csit-initialize-vfs-data.sh copy: src: "files/csit-initialize-vfs-default.sh" dest: "/usr/local/bin/csit-initialize-vfs-data.sh" owner: "root" group: "root" - mode: "744" + mode: 0744 tags: copy-vf-data-script when: - vfs_data_file is not defined -- name: VPP_device - Start csit-initialize-vfs.service +- name: Start csit-initialize-vfs.service copy: src: "files/csit-initialize-vfs.service" dest: "/etc/systemd/system/" owner: "root" group: "root" - mode: "644" + mode: 0644 notify: - "Start csit-initialize-vfs.service" tags: @@ -77,7 +119,7 @@ - meta: flush_handlers -- name: VPP_device - Set hugepages in GRUB +- name: Set Hugepages In GRUB lineinfile: path: "/etc/default/grub" state: "present" @@ -85,8 +127,34 @@ line: "GRUB_CMDLINE_LINUX=\"{% for key, value in grub.items() %}{% if value %}{{key}}={{value}} {% else %}{{key}} {% endif %}{% endfor %}\"" notify: - "Update GRUB" - - "Reboot server" tags: - set-grub +- name: Download iAVF driver + get_url: + url: "{{ iavf_url }}" + dest: "{{ iavf_target_dir }}/iavf-{{ iavf_version }}.tar.gz" + validate_certs: False + mode: 0644 + tags: + - install-iavf + +- name: Extract iAVF driver + unarchive: + remote_src: true + src: "{{ iavf_target_dir }}/iavf-{{ iavf_version }}.tar.gz" + dest: "{{ iavf_target_dir }}/" + creates: "{{ iavf_target_dir }}/iavf-{{ iavf_version }}/src/" + tags: + - install-iavf + +- name: Compile iAVF driver + command: "make install" + args: + chdir: "{{ iavf_target_dir }}/iavf-{{ iavf_version }}/src/" + notify: + - "Reboot server" + tags: + - install-iavf + - meta: flush_handlers |