forked from bbmri-nl/dnaseq-pipeline-deployment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
97 lines (73 loc) · 4.6 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
- hosts: all
#remote_user: root
#become_user: root
#become: true
roles:
- role: easybuild-install
vars:
NGS_DNA_VERSION: "3.3.1"
#HPC_ENV_PREFIX: "/apps"
GROUP: "bbmri"
#DEFAULT_USER: "vagrant"
#HPC_GROUP_PREFIX: "/groups/{{ GROUP }}"
HPC_EBCONFIGS_PREFIX: "{{ HPC_ENV_PREFIX }}/software/easyconfigs"
BBMRI_RELEASE_VERSION: "2.8.6-BBMRI"
TMP: "tmp01"
BASE: "{{ HPC_GROUP_PREFIX }}/{{ TMP }}"
tasks:
#- easybuild: easyconfigs="test"
#- group: name={{ GROUP }} state=present
#- user: name=vagrant shell=/bin/bash groups=easybuild,bbmri,vagrant append=yes
- name: Create user groups dir
file: path={{ HPC_GROUP_PREFIX }} state=directory state=directory mode=0775 recurse=yes
- name: Create user groups dir
file: path={{ HPC_GROUP_PREFIX }} state=directory state=directory mode=0775 recurse=yes
- name: Create user software dir
file: path={{ HPC_ENV_PREFIX }}/software state=directory mode=0775 recurse=yes
- name: Create user data dir
file: path={{ HPC_ENV_PREFIX }}/data state=directory mode=0775 recurse=yes
# - name: Create user reference_dir dir
# file: path={{ reference_dir }} state=directory mode=0775 recurse=yes
- name: Create user generatedscripts dir
file: path={{ BASE }}/generatedscripts state=directory mode=0775 recurse=yes
- name: Create user Samplesheets dir
file: path={{ BASE }}/Samplesheets state=directory mode=0775 recurse=yes
- name: Create user projects dir
file: path={{ BASE }}/projects state=directory mode=0775 recurse=yes
- name: Create user logs dir
file: path={{ BASE }}/logs state=directory mode=0775 recurse=yes
- name: Create user tmp dir
file: path={{ BASE }}/tmp state=directory mode=0775 recurse=yes
- name: Create user HPC_EBCONFIGS_PREFIX dir
file: path={{ HPC_EBCONFIGS_PREFIX }} state=directory mode=0775 recurse=yes
- name: Download Easybuild Configs
get_url: url="https://github.com/molgenis/easybuild-easyconfigs/archive/{{ BBMRI_RELEASE_VERSION }}.tar.gz" dest="{{ HPC_EBCONFIGS_PREFIX }}/{{ BBMRI_RELEASE_VERSION }}.tar.gz" timeout=300
- name: extract Easybuild Configs
unarchive:
src: "{{ HPC_EBCONFIGS_PREFIX }}/{{ BBMRI_RELEASE_VERSION }}.tar.gz"
dest: "{{ HPC_EBCONFIGS_PREFIX }}"
remote_src: yes
# - name: Dirty unarchive
# command: tar x -C {{ HPC_EBCONFIGS_PREFIX }} -f {{ HPC_EBCONFIGS_PREFIX }}/{{ BBMRI_RELEASE_VERSION }}.tar.gz
# - name: Download reference set
# get_url: url="https://barmsijs.lumc.nl/bios/bios-reference-empty.tar.gz" dest="{{ reference_dir }}/bios-reference.tar.gz" mode=0775 timeout=300
# - name: extract reference set
# command: tar x -C {{ reference_dir }} -f {{ reference_dir }}/bios-reference.tar.gz
# Copy source files for EB to VM.
# Download resources manually, and fix scr location if necessary
- copy: src=~/Downloads/gmp-6.0.0a.tar.bz2 dest={{ HPC_ENV_PREFIX }}/sources/g/GCC/ mode=0644
- copy: src=~/Downloads/mpc-1.0.2.tar.gz dest={{ HPC_ENV_PREFIX }}/sources/g/GCC/ mode=0644
- copy: src=~/Downloads/gcc-4.9.3.tar.bz2 dest={{ HPC_ENV_PREFIX }}/sources/g/GCC/ mode=0644
- copy: src=~/Downloads/mpfr-3.1.2.tar.gz dest={{ HPC_ENV_PREFIX }}/sources/g/GCC/ mode=0644
- copy: src=~/Downloads/GenomeAnalysisTK-3.7.tar.bz2 dest={{ HPC_ENV_PREFIX }}/sources/g/GATK/ mode=0644
- copy: src=~/Downloads/jdk-8u45-linux-x64.tar.gz dest={{ HPC_ENV_PREFIX }}/sources/j/Java/ mode=0644
- copy: src=~/Downloads/bzip2-1.0.6.tar.gz dest={{ HPC_ENV_PREFIX }}/sources/b/bzip2/ mode=0644
- copy: src=~/Downloads/argparse-1.2.1.tar.gz dest={{ HPC_ENV_PREFIX }}/sources/p/Python/extensions/ mode=0644
#- copy: src=~/Downloads/.bashrc dest=/etc/skel/.bashrc owner=root group=root mode=0644 ##TODO: add blockinfile in template
# - name: Deploy FastQC
# shell: source /usr/share/lmod/lmod/init/profile && source {{ HPC_ENV_PREFIX }}/modules/modules.bashrc && module load EasyBuild && eb {{ HPC_EBCONFIGS_PREFIX }}/easybuild-easyconfigs-{{ BBMRI_RELEASE_VERSION }}/easybuild/easyconfigs/f/FastQC/FastQC-0.10.1-Java-1.7.0_80.eb --robot --robot-paths="{{ HPC_EBCONFIGS_PREFIX }}/easybuild-easyconfigs-{{ BBMRI_RELEASE_VERSION }}/easybuild/easyconfigs/:"
# become_user: easybuild
# become: true
- name: Deploy NGS_DNA
shell: source {{ lmod_prefix }}/init/profile && source {{ HPC_ENV_PREFIX }}/modules/modules.bashrc && module load EasyBuild && eb {{ HPC_EBCONFIGS_PREFIX }}/easybuild-easyconfigs-{{ BBMRI_RELEASE_VERSION }}/easybuild/easyconfigs/n/NGS_DNA/NGS_DNA-{{ NGS_DNA_VERSION }}.eb --robot --robot-paths="{{ HPC_EBCONFIGS_PREFIX }}/easybuild-easyconfigs-{{ BBMRI_RELEASE_VERSION }}/easybuild/easyconfigs/:"