Skip to content

Commit fa869b5

Browse files
Add rack-aware scripts on all compute nodes
1 parent 17da7d4 commit fa869b5

File tree

4 files changed

+34
-13
lines changed

4 files changed

+34
-13
lines changed

playbooks/new_nodes.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@
155155
vars_files:
156156
- "/opt/oci-hpc/conf/queues.conf"
157157
tasks:
158+
- include_role:
159+
name: rack-aware
160+
when: rack_aware|default(false)|bool
158161
- include_role:
159162
name: spack
160163
when: spack|default(false)|bool

playbooks/resize_add.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@
158158
vars_files:
159159
- "/opt/oci-hpc/conf/queues.conf"
160160
tasks:
161+
- include_role:
162+
name: rack-aware
163+
when: rack_aware|default(false)|bool
161164
- include_role:
162165
name: spack
163166
when: spack|default(false)|bool
Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
1-
- name: copy python3 module installer
2-
copy:
3-
src: install.sh
4-
dest: /opt/oci-hpc/bin/
5-
owner: opc
6-
group: "{{privilege_group_name}}"
7-
mode: '0775'
1+
- name: Install and upgrade pip
2+
shell: "python3 -m ensurepip & sudo python3 -m pip install --upgrade pip"
3+
4+
- name: install pssh and parallel-ssh
5+
pip:
6+
name: ['pssh', 'parallel-ssh']
7+
executable: pip3
8+
state: latest
9+
with_items:
10+
- pssh
11+
- parallel-ssh
12+
ignore_errors: yes
813

9-
- name: install dependencies
10-
command: bash -c "/opt/oci-hpc/bin/install.sh"
14+
- name: Make sure /opt/oci-hpc/bin/ exists
15+
become: true
16+
file:
17+
path: /opt/oci-hpc/bin/
18+
state: directory
19+
recurse: yes
20+
mode: '0755'
21+
owner: "{{ ansible_user }}"
22+
group: "{{ privilege_group_name }}"
1123

12-
- name: copy node_ordering_by_rack.py
24+
- name: copy node_ordering_by_rack.py
1325
copy:
1426
src: node_ordering_by_rack.py
15-
dest: /home/opc/
16-
owner: opc
17-
group: opc
27+
dest: /opt/oci-hpc/bin/
28+
owner: "{{ ansible_user }}"
29+
group: "{{privilege_group_name}}"
1830
mode: '0755'

playbooks/site.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@
259259
vars_files:
260260
- "/opt/oci-hpc/conf/queues.conf"
261261
tasks:
262+
- include_role:
263+
name: rack-aware
264+
when: rack_aware|default(false)|bool
262265
- include_role:
263266
name: spack
264267
when: spack|default(false)|bool

0 commit comments

Comments
 (0)