Skip to content

Commit ba00f71

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

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.github/workflows/fatimage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
. environments/.stackhpc/activate
6262
cd packer/
6363
packer init .
64-
PACKER_LOG=1 packer build -only openstack.openhpc -on-error=${{ vars.PACKER_ON_ERROR }} -var-file=$PKR_VAR_environment_root/${{ vars.CI_CLOUD }}.pkrvars.hcl openstack.pkr.hcl
64+
PACKER_LOG=1 packer build -on-error=${{ vars.PACKER_ON_ERROR }} -var-file=$PKR_VAR_environment_root/${{ vars.CI_CLOUD }}.pkrvars.hcl openstack.pkr.hcl
6565
env:
6666
PKR_VAR_os_version: ${{ matrix.os_version }}
6767

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: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,21 +159,33 @@ 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
176-
extra_arguments = ["--limit", "builder", "-i", "${var.repo_root}/packer/ansible-inventory.sh", "-vv", "-e", "@${var.repo_root}/packer/${source.name}_extravars.yml"]
188+
extra_arguments = ["--limit", "builder", "-i", "${var.repo_root}/packer/ansible-inventory.sh", "-vv", "-e", "@${var.repo_root}/packer/openhpc_extravars.yml"]
177189
}
178190

179191
post-processor "manifest" {

0 commit comments

Comments
 (0)