Skip to content

Commit c0f2046

Browse files
committed
add build of OFED image to CI
1 parent 8114bb1 commit c0f2046

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

ansible/bootstrap.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,4 +201,3 @@
201201
tasks:
202202
- include_role:
203203
name: ofed
204-
tasks_from: main.yml

packer/openstack.pkr.hcl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,18 +159,30 @@ source "openstack" "openhpc" {
159159
image_visibility = "${var.image_visibility}"
160160
}
161161

162-
# The "fat" image build with all binaries:
162+
# "fat" image builds:
163163
build {
164+
165+
# non-CUDA:
164166
source "source.openstack.openhpc" {
167+
name = "openhpc"
165168
floating_ip_network = "${var.floating_ip_network}"
166169
source_image = "${var.fatimage_source_image[var.os_version]}"
167170
source_image_name = "${var.fatimage_source_image_name[var.os_version]}" # NB: must already exist in OpenStack
168171
image_name = "${source.name}-${var.os_version}-${local.timestamp}-${substr(local.git_commit, 0, 8)}" # similar to name from slurm_image_builder
169172
}
170173

174+
# CUDA:
175+
source "source.openstack.openhpc" {
176+
name = "openhpc-cuda" # this is the only difference from the above
177+
floating_ip_network = "${var.floating_ip_network}"
178+
source_image = "${var.fatimage_source_image[var.os_version]}"
179+
source_image_name = "${var.fatimage_source_image_name[var.os_version]}"
180+
image_name = "${source.name}-${var.os_version}-${local.timestamp}-${substr(local.git_commit, 0, 8)}"
181+
}
182+
171183
provisioner "ansible" {
172184
playbook_file = "${var.repo_root}/ansible/fatimage.yml"
173-
groups = ["builder", "control", "compute", "login"]
185+
groups = concat(["builder", "control", "compute", "login"], [for g in split("-", "${source.name}"): g if g != "openhpc"])
174186
keep_inventory_file = true # for debugging
175187
use_proxy = false # see https://www.packer.io/docs/provisioners/ansible#troubleshooting
176188
extra_arguments = ["--limit", "builder", "-i", "${var.repo_root}/packer/ansible-inventory.sh", "-vv", "-e", "@${var.repo_root}/packer/${source.name}_extravars.yml"]

0 commit comments

Comments
 (0)