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

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Accelize/ansible-role-aws-fpga
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.2.1
Choose a base ref
...
head repository: Accelize/ansible-role-aws-fpga
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 4 commits
  • 6 files changed
  • 1 contributor

Commits on Nov 6, 2019

  1. Allow to download AWS SDK

    JGoutin committed Nov 6, 2019
    Copy the full SHA
    8e6e399 View commit details

Commits on Nov 12, 2019

  1. Copy the full SHA
    744959f View commit details

Commits on Nov 21, 2019

  1. Copy the full SHA
    8676ac2 View commit details

Commits on Jan 10, 2020

  1. Update README.md

    JGoutin authored Jan 10, 2020
    Copy the full SHA
    61aedd2 View commit details
Showing with 22 additions and 251 deletions.
  1. +0 −2 .ansible-lint
  2. +14 −37 README.md
  3. +0 −30 defaults/main.yml
  4. +2 −15 meta/main.yml
  5. +6 −34 molecule/default/tests/test_default.py
  6. +0 −133 tasks/main.yml
2 changes: 0 additions & 2 deletions .ansible-lint

This file was deleted.

51 changes: 14 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[![Build Status](https://travis-ci.org/Accelize/ansible-role-aws-fpga.svg?branch=master)](https://travis-ci.org/Accelize/ansible-role-aws-fpga)
:warning: **This role is deprecated and as been merged inside the "accelize.xilinx_xrt" role**

**To handle the backward compatibility, this role now act as a redirection**

AWS FPGA Ansible Role
=====================
@@ -8,65 +10,40 @@ This Ansible role install the [AWS FPGA](https://github.com/aws/aws-fpga) runtim
Requirements
------------

An AWS F1 instance is required as target host for this role.

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

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.
See **accelize.xilinx_xrt** documentation.

Role Variables
--------------

* **aws_fpga_version**: AWS FPGA version; If not specified, use latest version available.
See **accelize.xilinx_xrt** documentation.

* **aws_fpga_allow_non_root**: If `true`, allow FPGA devices access to users in the group specified by *aws_fpga_sdk_group*.
Default to `false`.
* **aws_fpga_sdk_group**: Name of the group of users that can access to FPGA devices.
Default to `fpgauser`.
No effect if *aws_fpga_allow_non_root* is `false`.
* **aws_fpga_sdk_override_group**: If true, do not raise error if the group specified by *aws_fpga_sdk_group* already exists.
Default to `false`. No effect if *aws_fpga_allow_non_root* is `false`.
Following variables that are not in **accelize.xilinx_xrt** still exists for compatibility:

* **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 `2019.1`.
* **xilinx_xrt_ensure_compatible_kernel**: If `true`, ensure the Linux kernel installed is compatible. Default to `true`.

* **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.
If *aws_fpga_xrt* is `true`, the XOCl driver shipped with XRT is installed.

* **aws_fpga_driver**: Ignored. The XOCL diver is installed with the XRT package.

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

```yaml
- hosts: servers
become: true
roles:
- role: accelize.aws_fpga
```
See **accelize.xilinx_xrt** documentation.

Dependencies
------------

None.
- **accelize.xilinx_xrt**.

License
-------

Apache 2.0
Copyright Accelize 2019, Apache 2.0

This Ansible role is not endorsed or affiliated by AWS or Xilinx.
Installed components licences:

* [AWS FPGA license](https://github.com/aws/aws-fpga/blob/master/LICENSE.txt)
* [Xilinx XRT license](https://github.com/Xilinx/XRT/blob/master/LICENSE)
* [AWS FPGA license](https://github.com/aws/aws-fpga/blob/master/LICENSE.txt)

*This Ansible role is not endorsed or affiliated by Xilinx or AWS.*

Author Information
------------------
30 changes: 0 additions & 30 deletions defaults/main.yml

This file was deleted.

17 changes: 2 additions & 15 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -24,20 +24,7 @@ galaxy_info:
- ec2

dependencies:
- role: accelize.linux_kernel
vars:
kernel_version: "{{ aws_linux_kernel_version }}"
when:
# Managed by "accelize.xilinx_xrt" if not RHEL/CentOS 7
- ansible_os_family == 'RedHat'
- ansible_distribution_major_version == "7"
- xilinx_xrt_ensure_compatible_kernel | bool

- role: accelize.xilinx_xrt
when:
- aws_fpga_xrt | bool
# AWS provides special packages for RHEL/CentOS 7
- "ansible_os_family != 'RedHat' or
ansible_distribution_major_version != '7'"
vars:
xilinx_xrt_aws: true
xilinx_xrt_env: aws
xilinx_xrt_install: "{{ aws_fpga_xrt }}"
40 changes: 6 additions & 34 deletions molecule/default/tests/test_default.py
Original file line number Diff line number Diff line change
@@ -1,44 +1,16 @@
import os
from os.path import join
from itertools import product

import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')


def test_fpga_mgnt_installed(host):
def test_aws_fpga_runtime_installed(host):
"""
Test that FPGA management libraries and utilities are installed.
Test that AWS FPGA runtime libraries are installed.
"""
from os.path import join
from itertools import product

usr = ('/usr/local/', '/usr/')
lib_dirs = ('lib', 'lib64')
bin_dirs = 'bin',

def exists(name, *base_paths):
"""
Check if file installed in at least one directory.
Args:
name (str): relative path to file.
base_paths (tuple of str): base paths where file can be installed.
Returns:
bool: True if installed
"""
return any(host.file(join(join(*path), name)).exists
for path in product(*base_paths))

# Libraries
for library in ('libfpga_mgmt.so',
'libfpga_mgmt.so.1',
'libfpga_mgmt.so.1.0.0'):
assert exists(library, usr, lib_dirs), library

# Minimal utilities
for utility in ('fpga-describe-local-image',
'fpga-load-local-image',
'fpga-clear-local-image'):
assert exists(utility, usr, bin_dirs), utility
assert any(host.file(join(join(*path), 'libfpga_mgmt.so')).exists
for path in product(('/usr/local/', '/usr/'), ('lib', 'lib64')))
133 changes: 0 additions & 133 deletions tasks/main.yml

This file was deleted.