Skip to content

Commit 19be1be

Browse files
committed
do both OFED and non-ofed builds in CI
1 parent 9ec9f24 commit 19be1be

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

openstack.pkr.hcl

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,31 @@ source "openstack" "openhpc" {
3333
ssh_bastion_host = "128.232.222.183"
3434
ssh_bastion_username = "${var.ssh_bastion_username}"
3535
ssh_bastion_private_key_file = "~/.ssh/id_rsa"
36-
image_name = "${source.name}-${local.timestamp}.qcow2"
3736
ports = [var.port_id]
3837
}
3938

4039
build {
4140
source "source.openstack.openhpc" {
41+
name = "inbox"
42+
image_name = "openhpc-${local.timestamp}.qcow2"
43+
}
44+
45+
source "source.openstack.openhpc" {
46+
name = "ofed"
47+
image_name = "openhpc-${local.timestamp}-ofed.qcow2"
4248
}
4349

4450
provisioner "ansible" {
4551
playbook_file = "playbooks/build.yml" # can't use ansible FQCN here
4652
use_proxy = false # see https://www.packer.io/docs/provisioners/ansible#troubleshooting
47-
extra_arguments = ["-v"]
53+
override = {
54+
inbox = {
55+
extra_arguments = ["-v"]
56+
}
57+
ofed = {
58+
extra_arguments = concat(["-v"], ["-e", "ofed_install=yes"])
59+
}
60+
}
4861
ansible_ssh_extra_args = ["-o ProxyCommand='ssh ${var.ssh_bastion_username }@${ var.ssh_bastion_host} -W %h:%p'"]
4962
}
5063

roles/builder/defaults/main/ofed.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ofed_install: false
12
ofed_version: 5.6-1.0.3.3
23
ofed_download_url: https://content.mellanox.com/ofed/MLNX_OFED-{{ ofed_version }}/MLNX_OFED_SRC-{{ ofed_version }}.tgz
34
ofed_tmp_dir: /tmp

roles/builder/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
- import_tasks: dnf_repos.yml
2828
- import_tasks: ofed.yml
29+
when: "{{ ofed_install | default(false) }}"
2930
- import_tasks: dnf_packages.yml
3031
- import_tasks: prometheus.yml
3132
- import_tasks: nodeexporter.yml

0 commit comments

Comments
 (0)