Infra: Ansible E810 ddp/driver 63/31963/2
authorpmikus <pmikus@cisco.com>
Tue, 13 Apr 2021 12:01:20 +0000 (12:01 +0000)
committerPeter Mikus <pmikus@cisco.com>
Tue, 13 Apr 2021 12:07:13 +0000 (12:07 +0000)
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: I383ae63bdfb24a9e8a5cd629a711537607ebf4e9

fdio.infra.ansible/roles/intel/defaults/main.yaml [new file with mode: 0644]
fdio.infra.ansible/roles/intel/tasks/main.yaml [new file with mode: 0644]
fdio.infra.ansible/sut.yaml
fdio.infra.ansible/tg.yaml

diff --git a/fdio.infra.ansible/roles/intel/defaults/main.yaml b/fdio.infra.ansible/roles/intel/defaults/main.yaml
new file mode 100644 (file)
index 0000000..df86d65
--- /dev/null
@@ -0,0 +1,26 @@
+---
+# file: roles/mellanox/defaults/main.yaml
+
+packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+
+packages_base:
+  - []
+
+packages_by_distro:
+  ubuntu:
+    - []
+
+packages_by_arch:
+  aarch64:
+    - []
+  x86_64:
+    - []
+
+intel_download_url: "https://downloadmirror.intel.com"
+intel_ice_version: "1.4.11"
+intel_ice_driver_url: "{{ intel_download_url }}/29746/eng/ice-{{ intel_ice_version }}.tar.gz"
+intel_ice_driver_dir: "/opt"
+
+intel_ddp_version: "1.3.28.0"
+intel_ddp_profile_url: "{{ intel_download_url }}/29889/eng/800%20Series%20Comms%20Binary%20Package%20{{ intel_ddp_version }}.zip"
+intel_ddp_profile_dir: "/opt"
\ No newline at end of file
diff --git a/fdio.infra.ansible/roles/intel/tasks/main.yaml b/fdio.infra.ansible/roles/intel/tasks/main.yaml
new file mode 100644 (file)
index 0000000..63ab5e0
--- /dev/null
@@ -0,0 +1,128 @@
+---
+# file: roles/intel/tasks/main.yaml
+
+- name: Inst - Check Presence of Intel E810 Hardware
+  shell: "lspci -d 8086:1592"
+  register: intel_e810_pcis
+  failed_when: no
+  changed_when: no
+  tags:
+    - intel-inst
+
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+    - intel_e810_pcis.stdout_lines | length > 0
+  tags:
+    - intel-inst-prerequisites
+
+- name: Inst - Prerequisites
+  package:
+    name: "{{ packages | flatten(levels=1) }}"
+    state: latest
+  when:
+    - intel_e810_pcis.stdout_lines | length > 0
+  tags:
+    - intel-inst-prerequisites
+
+- name: Inst - Get Network Adapter Driver
+  get_url:
+    url: "{{ intel_ice_driver_url }}"
+    dest: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}.tar.gz"
+    mode: 0644
+  when:
+    - intel_e810_pcis.stdout_lines | length > 0
+  tags:
+    - intel-inst
+
+- name: Inst - Extract Network Adapter Driver
+  unarchive:
+    remote_src: true
+    src: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}.tar.gz"
+    dest: "{{ intel_ice_driver_dir }}/"
+    creates: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}"
+  register: intel_driver_extracted
+  when:
+    - intel_e810_pcis.stdout_lines | length > 0
+  tags:
+    - intel-inst
+
+- name: Inst - Network Adapter Driver
+  command: "make install; modprobe -r ice; modprobe ice"
+  args:
+    chdir: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}/src"
+  failed_when: no
+  when:
+    - intel_e810_pcis.stdout_lines | length > 0
+    - intel_driver_extracted
+  tags:
+    - intel-inst
+
+- name: Inst - Get Dynamic Device Personalization (DDP) Package
+  get_url:
+    url: "{{ intel_ddp_profile_url }}"
+    dest: "{{ intel_ddp_profile_dir }}/800-Series-Comms-Binary-Package-{{ intel_ddp_version }}.zip"
+    mode: 0644
+  when:
+    - intel_e810_pcis.stdout_lines | length > 0
+  tags:
+    - intel-inst
+
+- name: Inst - Extract Dynamic Device Personalization (DDP) Package
+  unarchive:
+    remote_src: true
+    src: "{{ intel_ddp_profile_dir }}/800-Series-Comms-Binary-Package-{{ intel_ddp_version }}.zip"
+    dest: "{{ intel_ddp_profile_dir }}/"
+    creates: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.zip"
+  register: intel_driver_extracted
+  when:
+    - intel_e810_pcis.stdout_lines | length > 0
+  tags:
+    - intel-inst
+
+- name: Inst - Extract Dynamic Device Personalization (DDP) Package
+  unarchive:
+    remote_src: true
+    src: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.zip"
+    dest: "{{ intel_ddp_profile_dir }}/"
+  register: intel_driver_extracted
+  when:
+    - intel_e810_pcis.stdout_lines | length > 0
+  tags:
+    - intel-inst
+
+- name: Inst - Copy Dynamic Device Personalization (DDP) Package
+  copy:
+    src: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.pkg"
+    dest: "/lib/firmware/updates/intel/ice/ddp/ice-{{ intel_ddp_version }}.pkg"
+    remote_src: yes
+    follow: yes
+  when:
+    - intel_e810_pcis.stdout_lines | length > 0
+  tags:
+    - intel-inst
+
+- name: Inst - Link Dynamic Device Personalization (DDP) Package
+  file:
+    src: "ice-{{ intel_ddp_version }}.pkg"
+    dest: "/lib/firmware/updates/intel/ice/ddp/ice.pkg"
+    state: link
+  when:
+    - intel_e810_pcis.stdout_lines | length > 0
+  tags:
+    - intel-inst
+
+- name: Inst - Extract Dynamic Device Personalization (DDP) Package (cleanup)
+  file:
+    path: "{{ item }}"
+    state: absent
+  with_items:
+    - "{{ intel_ddp_profile_dir }}/E810 DDP for Comms TechGuide_Rev2.3.pdf"
+    - "{{ intel_ddp_profile_dir }}/Intel_800_series_market_segment_DDP_license.txt"
+  when:
+    - intel_e810_pcis.stdout_lines | length > 0
+  tags:
+    - intel-inst
index 2a413d7..3a0054f 100644 (file)
@@ -22,6 +22,8 @@
       tags: kernel
     - role: mellanox
       tags: mellanox
+    - role: intel
+      tags: intel
     - role: docker
       tags: docker
     - role: vpp
index 01d2cbc..10e1340 100644 (file)
@@ -22,6 +22,8 @@
       tags: kernel
     - role: mellanox
       tags: mellanox
+    - role: intel
+      tags: intel
     - role: docker
       tags: docker
     - role: iperf

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.