From 1bf69f74d9ea3d5cd6c907df0331ba9bae31ffdd Mon Sep 17 00:00:00 2001 From: mariojmdavid Date: Tue, 23 Aug 2016 16:53:46 +0100 Subject: [PATCH] update for latest powerfit version --- .travis.yml | 29 +++++++++++++++++++++++++++++ README.md | 9 +++++++-- defaults/main.yml | 2 +- docker-powerfit/Dockerfile | 3 ++- docker-powerfit/README.md | 9 +++++++-- tasks/main.yml | 19 ++++++++++++++++--- tests/test.yml | 4 ++++ 7 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 .travis.yml create mode 100644 tests/test.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..49e7e1c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/README.md b/README.md index c57051d..c21e54d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![License](http://img.shields.io/:license-apache-blue.svg?style=flat-square)](http://www.apache.org/licenses/LICENSE-2.0.html) + Role and Dockerfile for disvis and powerfit application ======================================================= @@ -137,8 +139,11 @@ Apache v2 Author Information ------------------ -Mario David: mariojmdavid@gmail.com -LIP and Indigo-DataCloud project +Mario David: + +LIP Lisbon: http://www.lip.pt + +Indigo DataCloud: https://www.indigo-datacloud.eu/ Acknowledgments --------------- diff --git a/defaults/main.yml b/defaults/main.yml index e5ddfae..7dc94ed 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,7 +3,7 @@ nvidia_driver_version: 352.93 # Haddocking application: disvis or powerfit -haddock_app: disvis +haddock_app: powerfit # Variables related to NVIDIA url and executable base_url: http://us.download.nvidia.com/XFree86/Linux-x86_64 diff --git a/docker-powerfit/Dockerfile b/docker-powerfit/Dockerfile index b85dca2..bafb88e 100644 --- a/docker-powerfit/Dockerfile +++ b/docker-powerfit/Dockerfile @@ -1,7 +1,8 @@ -# docker build -t powerfit . +# docker build --rm -t powerfit . FROM indigodatacloud/ubuntu-sshd:14.04 MAINTAINER Mario David +LABEL description="Run Powerfit application" RUN ansible-galaxy install indigo-dc.disvis-powerfit && \ ansible-playbook /etc/ansible/roles/indigo-dc.disvis-powerfit/tests/powerfit.yml diff --git a/docker-powerfit/README.md b/docker-powerfit/README.md index b48946f..4e75b2a 100644 --- a/docker-powerfit/README.md +++ b/docker-powerfit/README.md @@ -1,3 +1,5 @@ +[![License](http://img.shields.io/:license-apache-blue.svg?style=flat-square)](http://www.apache.org/licenses/LICENSE-2.0.html) + docker-powerfit =============== @@ -68,8 +70,11 @@ Apache v2 Author Information ------------------ -Mario David: mariojmdavid@gmail.com -LIP and Indigo-DataCloud project +Mario David: + +LIP Lisbon: http://www.lip.pt + +Indigo DataCloud: https://www.indigo-datacloud.eu/ Acknowledgments --------------- diff --git a/tasks/main.yml b/tasks/main.yml index 70eef99..e62a66b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -22,9 +22,19 @@ - name: clone git repositories git: repo={{ item.repo }} dest={{ item.dest }} clone=yes with_items: - - { repo: "https://github.com/haddocking/{{ haddock_app }}.git", dest: "/usr/local/{{ haddock_app }}" } - { repo: "https://github.com/clMathLibraries/clFFT.git", dest: "/usr/local/clFFT" } - - { repo: "https://github.com/geggo/gpyfft.git", dest: "/usr/local/gpyfft" } + +- name: clone git repositories powerfit + git: repo={{ item.repo }} dest={{ item.dest }} version="redo-rotation" clone=yes + with_items: + - { repo: "https://github.com/haddocking/{{ haddock_app }}.git", dest: "/usr/local/{{ haddock_app }}" } + when: haddock_app == "powerfit" + +- name: clone git repositories disvis + git: repo={{ item.repo }} dest={{ item.dest }} clone=yes + with_items: + - { repo: "https://github.com/haddocking/{{ haddock_app }}.git", dest: "/usr/local/{{ haddock_app }}" } + when: haddock_app == "disvis" - name: wget nvidia driver get_url: url={{ nvidia_url }} dest=/usr/local mode=700 @@ -59,11 +69,14 @@ - name: pip install pyopencl==2015.1 pip: name=pyopencl version=2015.1 state=present +- name: pip install gpyfft + pip: name="git+https://github.com/geggo/gpyfft.git" editable=false state=present + - name: pip install gpyfft and {{ haddock_app }} pip: name={{ item }} state=present with_items: - - "file:///usr/local/gpyfft" - "file:///usr/local/{{ haddock_app }}" - name: unarchive powerfit examples unarchive: src=http://www.lip.pt/~david/powerfit-example.tgz dest=/home copy=no + when: haddock_app == "powerfit" diff --git a/tests/test.yml b/tests/test.yml new file mode 100644 index 0000000..019d8e4 --- /dev/null +++ b/tests/test.yml @@ -0,0 +1,4 @@ +--- +- hosts: localhost + roles: + - ansible-role-disvis-powerfit