Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.

Commit

Permalink
Add 2019.1 support, update 2018.3 package, enable Ubuntu support
Browse files Browse the repository at this point in the history
  • Loading branch information
JGoutin committed Sep 20, 2019
1 parent effb20c commit 76454a6
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 49 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ An AWS F1 instance is required as target host for this role.

The role requires to be run as root on the target host.

**accelize.xilinx_xrt** role if required to install Xilinx XRT.
CentOS 7 is recommanded since it the only one officially tested by Xilinx/AWS.

**accelize.xilinx_xrt** role if required to install Xilinx XRT on non CentOS 7
systems.

Role Variables
--------------
Expand All @@ -30,7 +33,7 @@ Role Variables
* **aws_fpga_xrt**: If `true`, also install Xilinx XRT.
Default to `true`.
* **xilinx_xrt_version**: If *aws_fpga_xrt* is `true`, Xilinx XRT version to install.
Default to `2018.3`.
Default to `2019.1`.

* **aws_fpga_driver**: FPGA driver name. If specified, install and enable the specified Linux kernel driver.
See [AWS FPGA linux kernel drivers](https://github.com/aws/aws-fpga/tree/master/sdk/linux_kernel_drivers) for the list of available drivers.
Expand Down
13 changes: 9 additions & 4 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ aws_fpga_xrt: true
# FPGA driver to install
aws_fpga_driver: ''

# XRT packages from AWS
s3_dev_ami_url: "https://s3.amazonaws.com/aws-fpga-developer-ami/1.6.0/Patches/\
XRT_2018_3_RC3_Patch2/"
aws_xrt_package: xrt_201830.2.1.0_7.6.1810
# XRT CentOS 7 packages from AWS Developper AMI
xilinx_xrt_version: '2019.1'
xilinx_xrt_packages:
'2019.1': 1.7.0/Patches/XRT_2019_1_RC2/xrt_201910.2.2.0_7.6.1810
'2018.3': 1.6.0/Patches/XRT_2018_3_RC5/xrt_201830.2.1.0_7.6.1810
'2018.2': 1.5.0/Patches/XRT_2018_2_XDF_RC5/xrt_201802.2.1.0_7.5.1804

s3_dev_ami_url: "https://aws-fpga-developer-ami.s3.amazonaws.com/"
xrt_package: "{{ xilinx_xrt_packages[xilinx_xrt_version | string] }}"
23 changes: 12 additions & 11 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ galaxy_info:
- name: EL
versions:
- 7
# - name: Ubuntu
# versions:
# - xenial
# - bionic
- name: Ubuntu
versions:
- xenial
- bionic
galaxy_tags:
- system
- cloud
Expand All @@ -23,10 +23,11 @@ galaxy_info:
- amazon
- ec2

dependencies: []
# TODO: Currently work only on CentOS 7 with a specific XRT package
# - role: accelize.xilinx_xrt
# when: aws_fpga_xrt | bool
# vars:
# xilinx_xrt_aws: true
# xilinx_xrt_version: 2018.3
dependencies:
- role: accelize.xilinx_xrt
when:
- aws_fpga_xrt | bool
# AWS provides special packages for CentOS 7
- ansible_os_family == 'Debian'
vars:
xilinx_xrt_aws: true
63 changes: 31 additions & 32 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,37 @@
executable: /bin/bash
when: not libfpga_mgmt.stat.exists

- name: Download xrt/xrt-aws packages from AWS FPGA developper AMI
get_url:
url: "{{ s3_dev_ami_url }}{{ xrt_package }}-{{ item }}.rpm"
dest: "{{ aws_fpga_src.path }}/{{ xrt_package | basename }}-{{ item }}.rpm"
with_items:
- xrt
- aws
retries: 10
delay: 1
when: (aws_fpga_xrt | bool) and not libfpga_mgmt.stat.exists

- name: Ensure xrt/xrt-aws packages dependencies are present
package:
name:
- "kernel-devel-{{ ansible_kernel }}"
- "kernel-headers-{{ ansible_kernel }}"
- epel-release
state: present
retries: 10
delay: 1
when: (aws_fpga_xrt | bool) and not libfpga_mgmt.stat.exists

- name: Ensure xrt/xrt-aws packages are installed
yum:
name: "{{ aws_fpga_src.path }}/{{ xrt_package | basename }}-{{ item }}.rpm"
state: present
with_items:
- xrt
- aws
when: (aws_fpga_xrt | bool) and not libfpga_mgmt.stat.exists

- name: Ensure AWS FPGA driver build dependencies are present
package:
name:
Expand Down Expand Up @@ -103,38 +134,6 @@
- "/usr/sbin/modprobe {{ aws_fpga_driver }}"
when: aws_fpga_driver != '' and not libfpga_mgmt.stat.exists

# Force the use of as specific XRT, because it is the only version that work
- name: Download xrt/xrt-aws packages
get_url:
url: "{{ s3_dev_ami_url }}{{ aws_xrt_package }}-{{ item }}.rpm"
dest: "{{ aws_fpga_src.path }}/{{ aws_xrt_package }}-{{ item }}.rpm"
with_items:
- xrt
- aws
retries: 10
delay: 1
when: (aws_fpga_xrt | bool) and not libfpga_mgmt.stat.exists

- name: Ensure xrt/xrt-aws packages dependencies are present
package:
name:
- "kernel-devel-{{ ansible_kernel }}"
- "kernel-headers-{{ ansible_kernel }}"
- epel-release
state: present
retries: 10
delay: 1
when: (aws_fpga_xrt | bool) and not libfpga_mgmt.stat.exists

- name: Ensure xrt/xrt-aws packages are installed
yum:
name: "{{ aws_fpga_src.path }}/{{ aws_xrt_package }}-{{ item }}.rpm"
state: present
with_items:
- xrt
- aws
when: (aws_fpga_xrt | bool) and not libfpga_mgmt.stat.exists

- name: Clean up AWS FPGA temporary directory
file:
path: "{{ aws_fpga_src.path }}"
Expand Down

0 comments on commit 76454a6

Please sign in to comment.