Skip to content

Commit 9c31164

Browse files
sjpbMaxBed4d
authored andcommitted
Add description of image to build (#444)
* add description of image description to build * fix image summary dir logic * bump CI image
1 parent db2ce09 commit 9c31164

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

ansible/cleanup.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,28 @@
3838

3939
- name: Cleanup /tmp
4040
command : rm -rf /tmp/*
41+
42+
- name: Get package facts
43+
package_facts:
44+
45+
- name: Ensure image summary directory exists
46+
file:
47+
path: /var/lib/image/
48+
state: directory
49+
owner: root
50+
group: root
51+
mode: u=rwX,go=rX
52+
53+
- name: Write image summary
54+
copy:
55+
content: "{{ image_info | to_nice_json }}"
56+
dest: /var/lib/image/image.json
57+
vars:
58+
image_info:
59+
branch: "{{ lookup('pipe', 'git rev-parse --abbrev-ref HEAD') }}"
60+
build: "{{ ansible_nodename | split('.') | first }}" # hostname is image name, which contains build info
61+
os: "{{ ansible_distribution }} {{ ansible_distribution_version }}"
62+
kernel: "{{ ansible_kernel }}"
63+
ofed: "{{ ansible_facts.packages['mlnx-ofa_kernel'].0.version | default('-') }}"
64+
cuda: "{{ ansible_facts.packages['cuda'].0.version | default('-') }}"
65+
slurm-ohpc: "{{ ansible_facts.packages['slurm-ohpc'].0.version | default('-') }}"

ansible/fatimage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@
177177

178178
- hosts: builder
179179
become: yes
180-
gather_facts: no
180+
gather_facts: yes
181+
tags: finalise
181182
tasks:
182-
# - meta: end_here
183183
- name: Cleanup image
184184
import_tasks: cleanup.yml
185185

environments/.stackhpc/terraform/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ variable "cluster_image" {
2929
description = "single image for all cluster nodes, keyed by os_version - a convenience for CI"
3030
type = map(string)
3131
default = {
32-
# https://github.com/stackhpc/ansible-slurm-appliance/pull/427
33-
RL8: "openhpc-ofed-RL8-240906-1042-32568dbb"
34-
RL9: "openhpc-ofed-RL9-240906-1041-32568dbb"
32+
# https://github.com/stackhpc/ansible-slurm-appliance/pull/444
33+
RL8: "openhpc-ofed-RL8-241002-1612-1ce702b1"
34+
RL9: "openhpc-ofed-RL9-241003-1052-1ce702b1"
35+
RL9-cuda: "openhpc-cuda-RL9-241002-1612-1ce702b1"
3536
}
3637
}
3738

0 commit comments

Comments
 (0)