Skip to content

Commit 8e28a92

Browse files
authored
Merge branch 'main' into sms-deployment
2 parents f7e7712 + bd2de50 commit 8e28a92

File tree

11 files changed

+100
-3
lines changed

11 files changed

+100
-3
lines changed

ansible/bootstrap.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
---
22

3+
- hosts: cluster
4+
gather_facts: false
5+
become: yes
6+
tasks:
7+
- name: Check if ansible-init is installed
8+
stat:
9+
path: /etc/systemd/system/ansible-init.service
10+
register: _stat_ansible_init_unitfile
11+
12+
- name: Wait for ansible-init to finish
13+
wait_for:
14+
path: /var/lib/ansible-init.done
15+
timeout: "{{ ansible_init_wait }}" # seconds
16+
when: _stat_ansible_init_unitfile.stat.exists
17+
318
- hosts: localhost
419
gather_facts: false
520
become: false
@@ -235,3 +250,11 @@
235250
tasks:
236251
- include_role:
237252
name: ofed
253+
254+
- hosts: ansible_init
255+
gather_facts: yes
256+
become: yes
257+
tags: linux_ansible_init
258+
tasks:
259+
- include_role:
260+
name: azimuth_cloud.image_utils.linux_ansible_init

ansible/fatimage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@
6868
tasks_from: install-package.yml
6969
vars_from: "Rocky/{{ ansible_distribution_major_version }}.yml"
7070
# # FUTURE: install-apps.yml - this is git clones
71+
7172
- name: Open Ondemand server (apps)
7273
include_role:
7374
name: osc.ood
7475
tasks_from: install-apps.yml
7576
vars_from: "Rocky/{{ ansible_distribution_major_version }}.yml"
77+
7678
- name: Open Ondemand remote desktop
7779
import_role:
7880
name: openondemand
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ansible_init_collections: []
2+
ansible_init_playbooks: []

ansible/roles/cluster_infra/templates/resources.tf.j2

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,23 @@ resource "openstack_compute_instance_v2" "login" {
370370
- "${openstack_compute_keypair_v2.cluster_keypair.public_key}"
371371
{%- endif %}
372372
EOF
373+
374+
metadata = {
375+
{% for playbook in ansible_init_playbooks %}
376+
ansible_init_pb_{{ loop.index0 }}_name = "{{ playbook.name }}"
377+
{% if playbook.stage is defined %}
378+
ansible_init_pb_{{ loop.index0 }}_stage = "{{ playbook.stage }}"
379+
{% endif %}
380+
{% endfor %}
381+
{% for collection in ansible_init_collections %}
382+
ansible_init_coll_{{ loop.index0 }}_name = "{{ collection.name }}"
383+
ansible_init_coll_{{ loop.index0 }}_type = "{{ collection.type }}"
384+
ansible_init_coll_{{ loop.index0 }}_version = "{{ collection.version }}"
385+
{% if collection.source is defined %}
386+
ansible_init_coll_{{ loop.index0 }}_source = "{{ collection.source }}"
387+
{% endif %}
388+
{% endfor %}
389+
}
373390
}
374391

375392
resource "openstack_compute_instance_v2" "control" {
@@ -446,6 +463,23 @@ resource "openstack_compute_instance_v2" "control" {
446463
- [LABEL=home, /exports/home, auto]
447464
{% endif %}
448465
EOF
466+
467+
metadata = {
468+
{% for playbook in ansible_init_playbooks %}
469+
ansible_init_pb_{{ loop.index0 }}_name = "{{ playbook.name }}"
470+
{% if playbook.stage is defined %}
471+
ansible_init_pb_{{ loop.index0 }}_stage = "{{ playbook.stage }}"
472+
{% endif %}
473+
{% endfor %}
474+
{% for collection in ansible_init_collections %}
475+
ansible_init_coll_{{ loop.index0 }}_name = "{{ collection.name }}"
476+
ansible_init_coll_{{ loop.index0 }}_type = "{{ collection.type }}"
477+
ansible_init_coll_{{ loop.index0 }}_version = "{{ collection.version }}"
478+
{% if collection.source is defined %}
479+
ansible_init_coll_{{ loop.index0 }}_source = "{{ collection.source }}"
480+
{% endif %}
481+
{% endfor %}
482+
}
449483
}
450484

451485
{% for partition in openhpc_slurm_partitions %}
@@ -498,6 +532,23 @@ resource "openstack_compute_instance_v2" "{{ partition.name }}" {
498532
- "${openstack_compute_keypair_v2.cluster_keypair.public_key}"
499533
{%- endif %}
500534
EOF
535+
536+
metadata = {
537+
{% for playbook in ansible_init_playbooks %}
538+
ansible_init_pb_{{ loop.index0 }}_name = "{{ playbook.name }}"
539+
{% if playbook.stage is defined %}
540+
ansible_init_pb_{{ loop.index0 }}_stage = "{{ playbook.stage }}"
541+
{% endif %}
542+
{% endfor %}
543+
{% for collection in ansible_init_collections %}
544+
ansible_init_coll_{{ loop.index0 }}_name = "{{ collection.name }}"
545+
ansible_init_coll_{{ loop.index0 }}_type = "{{ collection.type }}"
546+
ansible_init_coll_{{ loop.index0 }}_version = "{{ collection.version }}"
547+
{% if collection.source is defined %}
548+
ansible_init_coll_{{ loop.index0 }}_source = "{{ collection.source }}"
549+
{% endif %}
550+
{% endfor %}
551+
}
501552
}
502553

503554
{% endfor %}

ansible/roles/hpctests/templates/pingmatrix.sh.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ echo UCX_NET_DEVICES: $UCX_NET_DEVICES
1616
module load {{ hpctests_pingmatrix_modules | join(' ' ) }}
1717

1818
mpicc -o nxnlatbw mpi_nxnlatbw.c
19-
mpirun nxnlatbw
19+
20+
# mpirun flags force using UCX TCP transports, overriding higher
21+
# priority of OpenMPI btl/openib component, which is also using RDMA
22+
# https://wiki.stackhpc.com/s/985dae84-7bd8-4924-94b7-9629a7827100
23+
mpirun -mca pml_ucx_tls any -mca pml_ucx_devices any nxnlatbw

ansible/roles/hpctests/templates/pingpong.sh.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ echo UCX_NET_DEVICES: $UCX_NET_DEVICES
1616
module load {{ hpctests_pingpong_modules | join(' ' ) }}
1717

1818
#srun --mpi=pmi2 IMB-MPI1 pingpong # doesn't work in ohpc v2.1
19-
mpirun IMB-MPI1 pingpong
19+
20+
# mpirun flags force using UCX TCP transports, overriding higher
21+
# priority of OpenMPI btl/openib component, which is also using RDMA
22+
# https://wiki.stackhpc.com/s/985dae84-7bd8-4924-94b7-9629a7827100
23+
mpirun -mca pml_ucx_tls any -mca pml_ucx_devices any IMB-MPI1 pingpong
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ansible_init_wait: 1200 # seconds

environments/common/inventory/groups

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,6 @@ freeipa_client
132132

133133
[tuned]
134134
# Hosts to run TuneD configuration
135+
136+
[ansible_init]
137+
# Hosts to run linux-anisble-init

environments/common/layouts/everything

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,7 @@ openhpc
7878

7979
[tuned:children]
8080
# Hosts to run TuneD configuration
81+
82+
[ansible_init:children]
83+
# Hosts to run ansible-init
84+
cluster

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ansible==6.0.0
22
openstacksdk
3-
python-openstackclient
3+
python-openstackclient==6.6.1 # v7.0.0 has a bug re. rebuild
44
python-manilaclient
55
jmespath
66
passlib[bcrypt]==1.7.4

0 commit comments

Comments
 (0)