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

Commit

Permalink
Fix XRT AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
JGoutin committed Jul 25, 2019
1 parent aab8a1e commit 2bc9710
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 14 deletions.
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ 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_Patch1/"
aws_xrt_package: xrt_201830.2.1.0_7.6.1810
21 changes: 11 additions & 10 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,9 +23,10 @@ galaxy_info:
- amazon
- ec2

dependencies:
- role: accelize.xilinx_xrt
when: aws_fpga_xrt | bool
vars:
xilinx_xrt_aws: true
xilinx_xrt_version: 2018.3
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
38 changes: 34 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
delay: 1
when: not libfpga_mgmt.stat.exists

- name: Ensure AWS FPGA build dependencies are present [Debian]
- name: Ensure AWS FPGA build dependencies are present
apt:
name:
- build-essential
Expand All @@ -42,7 +42,7 @@
delay: 1
when: ansible_os_family == 'Debian' and not libfpga_mgmt.stat.exists

- name: Ensure AWS FPGA build dependencies are present [RedHat]
- name: Ensure AWS FPGA build dependencies are present
yum:
name:
- "@Development tools"
Expand All @@ -64,7 +64,7 @@
executable: /bin/bash
when: not libfpga_mgmt.stat.exists

- name: Ensure AWS FPGA driver build dependencies are present [RedHat]
- name: Ensure AWS FPGA driver build dependencies are present
package:
name:
- "kernel-devel-{{ ansible_kernel }}"
Expand All @@ -75,7 +75,7 @@
when: "aws_fpga_driver != '' and ansible_os_family == 'RedHat' and
not libfpga_mgmt.stat.exists"

- name: Ensure AWS FPGA driver build dependencies are present [Debian]
- name: Ensure AWS FPGA driver build dependencies are present
package:
name:
- "linux-headers-{{ ansible_kernel }}"
Expand All @@ -100,6 +100,36 @@
- "/usr/sbin/modprobe {{ aws_fpga_driver }}"
when: aws_fpga_driver != '' and not libfpga_mgmt.stat.exists

- 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 }}"
- 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 2bc9710

Please sign in to comment.