Newer
Older
Chris Hines
committed
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
- name: define ucx_src_url
set_fact:
ucx_src_url: "http://consistency0/src/ucx_1_8_0.tar.gz"
when: ucx_src_url is not defined
- name: define slurm_src_url
set_fact:
slurm_src_url: "http://consistency0/src/slurm-{{ slurm_version }}.tar.bz2"
when: slurm_src_url is not defined
- name: Create ucx directory if it does not exist
file:
path: "{{ src_base }}"
state: directory
owner: "{{ ansible_user }}"
group: root
mode: u=rwx,g=rx,o=rx
become: true
- name: remove all install
file:
path: "{{ slurm_src_dir }}"
state: absent
become: true
when: force_slurm_recompile is defined
- name: remove all install
file:
path: "{{ slurm_dir }}"
state: absent
become: true
when: force_slurm_recompile is defined
- name: download slurm
get_url:
url: "{{ slurm_src_url }}"
checksum: "{{ slurm_src_checksum }}"
dest: "{{ src_base }}/slurm_src"
when: slurm_src_checksum is defined
- name: download slurm
get_url:
url: "{{ slurm_src_url }}"
dest: "{{ src_base }}/slurm_src"
when: slurm_src_checksum is not defined
- name: unarchive slurm
unarchive:
src: "{{ src_base }}/slurm_src"
dest: "{{ src_base }}"
remote_src: yes
creates: "{{ slurm_src_dir }}"
- name: stat srun
stat: path="{{ slurm_dir }}/bin/srun"
register: stat_srun
- name: stat ucx
stat:
path: "{{ ucx_dir }}"
register: stat_ucx
- name: Create ucx directory if it does not exist
file:
path: "{{ ucx_dir }}"
state: directory
owner: root
group: root
mode: u=rwx,g=rx,o=rx
become: true
when: not stat_ucx.stat.exists
- name: download ucx
get_url:
url: "{{ ucx_src_url }}"
checksum: "{{ ucx_src_checksum }}"
dest: "{{ src_base }}/ucx_src"
when: ucx_src_checksum is defined
- name: download ucx
get_url:
url: "{{ ucx_src_url }}"
dest: "{{ src_base }}/ucx_src"
when: ucx_src_checksum is not defined
- name: unarchive ucx
unarchive:
args:
src: "{{ src_base }}/ucx_src"
copy: no
dest: "{{ src_base }}"
creates: "{{ ucx_src_dir }}"
become: true
register: newucx
- name: install ucx
shell: "./contrib/configure-release --prefix={{ ucx_dir }} && make -j8 && make install"
args:
chdir: "{{ ucx_src_dir }}"
creates: "{{ ucx_dir }}/bin/ucx_info"
become: true
# when: not stat_ucx.stat.exists
- name: configure slurm centos
command: "{{ slurm_src_dir }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam --with-pmix={{ pmix_dir }} --with-ucx={{ ucx_dir }}"
args:
creates: "{{ slurm_dir }}/bin/srun"
chdir: "{{ slurm_src_dir }}"
when:
- force_slurm_recompile is defined or not stat_srun.stat.exists
- ansible_os_family == 'RedHat'
- name: configure slurm ubuntu
command: "{{ slurm_src_dir }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam --with-pmix --with-ucx={{ ucx_dir }}"
args:
creates: "{{ slurm_dir }}/bin/srun"
chdir: "{{ slurm_src_dir }}"
when:
- force_slurm_recompile is defined or not stat_srun.stat.exists
- ansible_os_family == 'Debian'
- name: build slurm
command: make
args:
creates: "{{ slurm_dir }}/bin/srun"
chdir: "{{ slurm_src_dir }}"
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: install slurm
shell: make install
become: true
args:
chdir: "{{ slurm_src_dir }}"
creates: "{{ slurm_dir }}/bin/srun"
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: build pam_slurm
shell: "make && make install"
args:
chdir: "{{ slurm_src_dir }}/contribs/pam"
when: force_slurm_recompile is defined or not stat_srun.stat.exists
become: true
- name: build pam_slurm_adopt
make:
chdir: "{{ slurm_src_dir }}/contribs/pam_slurm_adopt"
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: install pam_slurm_adopt
make:
chdir: "{{ slurm_src_dir }}/contribs/pam_slurm_adopt"
target: install
when: force_slurm_recompile is defined or not stat_srun.stat.exists
become: true
- name: remove exist-slurm-latest-link
file:
path: /opt/slurm-latest
state: absent
become: true
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: put slurm-latest-link
file:
src: "{{ slurm_dir }}"
dest: /opt/slurm-latest
state: link
become: true
when: force_slurm_recompile is defined or not stat_srun.stat.exists
- name: add slurm log rotate config
template: src=slurmlog.j2 dest=/etc/logrotate.d/slurm mode=644
become: true