forked from marvel-nccr/quantum-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook-build-qe.yml
130 lines (113 loc) · 4.06 KB
/
playbook-build-qe.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
- name: Install ansible prerequisites
hosts: "{{ build_hosts | default('vagrant-ssh') }}"
gather_facts: false
pre_tasks:
- name: test configuration
debug:
msg: RUNNING PLAYBOOK FOR '{{ vm_name }}' VERSION '{{ vm_version }}'
tags: [init]
- name: testing ansible environment
debug:
msg: Connecting to host '{{ inventory_hostname }}' as user '{{ ansible_user }}'
tags: [init]
- name: Make local dist folder
local_action:
module: file
state: directory
path: "{{ local_dist_folder }}/"
when: release_notes_locally is defined and release_notes_locally
tags: [init]
- name: set up the VM (QE Only)
hosts: "{{ build_hosts | default('vagrant-ssh') }}"
roles:
- name: add user {{ vm_user }} with key
role: marvel-nccr.add_user
tags: [add_user]
vars:
add_user_name: "{{ vm_user }}"
add_user_password: "{{ vm_password }}"
add_user_groups:
- "{{ vm_user }}"
- sudo
add_user_passwordless_sudo: true
- role: marvel-nccr.simulationbase
tags: [simulationbase]
vars:
simulationbase_vm_user: "{{ vm_user }}"
simulationbase_hostname: "{{ vm_hostname }}"
simulationbase_codes_folder: "{{ vm_codes_folder }}"
simulationbase_tmz: Europe/Zurich
- role: marvel-nccr.ubuntu_desktop
tags: [ubuntu_desktop]
vars:
ubuntu_desktop_browser: "{{ vm_browser }}"
ubuntu_desktop_vm_user: "{{ vm_user }}"
when: not vm_headless
- role: marvel-nccr.quantum_mobile_customizations
tags: [qm_customizations]
vars:
qm_customizations_browser: "{{ vm_browser }}"
qm_customizations_vm_user: "{{ vm_user }}"
qm_customizations_vm_password: "{{ vm_password }}"
qm_customizations_vm_name: "{{ vm_name }}"
qm_customizations_vm_version: "{{ vm_version }}"
qm_customizations_vm_author: "{{ vm_author }}"
qm_customizations_headless: "{{ vm_headless }}"
qm_customizations_examples_folder: "{{ vm_examples_folder }}"
qm_customizations_data_folder: "{{ vm_data_folder }}"
qm_customizations_readme_file: "{{ vm_readme_file }}"
qm_customizations_homepage: "https://quantum-mobile.readthedocs.io"
qm_customizations_urls:
Quantum ESPRESSO: http://www.quantum-espresso.org/
- role: marvel-nccr.editors
tags: [editors]
vars:
editors_vm_user: "{{ vm_user }}"
- role: marvel-nccr.slurm
tags: [slurm]
- role: marvel-nccr.quantum_espresso
tags: [quantum_espresso]
vars:
quantum_espresso_data_folder: "{{ vm_data_folder }}"
- role: geerlingguy.nodejs # this is used by jupyterlab and aiidalab
tags: [aiida, nodejs]
become: true
become_user: "{{ root_user }}"
vars:
nodejs_version: 12.x
nodejs_install_npm_user: "{{ root_user }}"
- role: marvel-nccr.aiida
tags: [aiida]
become: true
become_user: "{{ vm_user }}"
vars:
aiida_source_folder: "{{ vm_codes_folder }}"
aiida_data_folder: "{{ vm_data_folder }}/aiida"
aiida_computer_cpus: "{{ vm_cpus }}"
aiida_computer_scheduler: "{{ vm_scheduler }}"
aiida_examples_folder: "{{ vm_examples_folder }}"
aiida_venv: "{{ aiida_venv_base }}/aiida"
aiida_jupyter_venv: "{{ aiida_venv_base }}/jupyter"
aiida_venv_constraints: "{{ vm_data_folder }}/aiida/constraints.txt"
aiida_plugins:
aiida-quantumespresso:
version: "3.4.0"
code_prefix: qe
codes_var: "quantum_espresso_executables"
omit_plugins: ["quantumespresso.hp", "wannier90"]
- name: aiidalab
role: marvel-nccr.aiidalab
become: true
become_user: "{{ vm_user }}"
tags: [aiidalab]
vars:
aiidalab_aiida_venv: "{{ aiida_venv_base }}/aiida"
aiidalab_aiida_jupyter_venv: "{{ aiida_venv_base }}/jupyter"
aiidalab_aiida_venv_constraints: "{{ vm_data_folder }}/aiida/constraints.txt"
post_tasks:
- name: Check package version integrity in virtualenv
command: "{{ aiida_venv }}/bin/pip check --no-color"
become: true
become_user: "{{ vm_user }}"
changed_when: false
tags: [aiida, aiidalab, pipcheck]