Skip to content

Commit 7c541c3

Browse files
authored
Support using images with binaries pre-installed and use for smslabs CI (#166)
* use pre-installed image for smslabs * use node-exporter which supports binaries pre-existing * skip prometheus installs * detect existing prometheus installs * bump base image * fix cluster name in CI * allow overriding prometheus_skip_install
1 parent 57c56f6 commit 7c541c3

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

ansible/monitoring.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@
7676
hosts: prometheus
7777
tags: prometheus
7878
tasks:
79+
- name: Check for existing prometheus binaries
80+
stat:
81+
path: /usr/local/bin/{{ item }}
82+
register: prometheus_binaries
83+
loop:
84+
- prometheus
85+
- promtool
86+
- name: Skip prometheus install if prometheus binaries exist and prometheus_version not defined
87+
# i.e. if prometheus_version isn't defined we don't care, so use what's already there
88+
set_fact:
89+
prometheus_skip_install: "{{ false if prometheus_version is defined else true }}"
90+
when: "{{ (prometheus_binaries.results | map(attribute='stat') | map(attribute='exists')) + [prometheus_skip_install is not defined] }}"
7991
- import_role:
8092
name: cloudalchemy.prometheus
8193

environments/smslabs/builder.pkrvars.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
flavor = "general.v1.tiny"
22
networks = ["c245901d-6b84-4dc4-b02b-eec0fb6122b2"] # stackhpc-ci-geneve
3-
source_image_name = "Rocky-8-GenericCloud-8.5-20211114.2.x86_64"
3+
source_image_name = "openhpc-220413-1545.qcow2"
44
ssh_keypair_name = "slurm-app-ci"
55
security_groups = ["default", "SSH"]
66
ssh_bastion_host = "185.45.78.150"

environments/smslabs/terraform/variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ variable "control_node" {
2626
description = "Mapping {flavor: flavor_name, image: image_name_or_id }"
2727
default = {
2828
flavor: "general.v1.tiny"
29-
image: "Rocky-8-GenericCloud-8.5-20211114.2.x86_64"
29+
image: "openhpc-220413-1545.qcow2"
3030
}
3131
}
3232

@@ -36,7 +36,7 @@ variable "login_nodes" {
3636
default = {
3737
login-0: {
3838
flavor: "general.v1.tiny"
39-
image: "Rocky-8-GenericCloud-8.5-20211114.2.x86_64"
39+
image: "openhpc-220413-1545.qcow2"
4040
}
4141
}
4242
}
@@ -47,7 +47,7 @@ variable "compute_types" {
4747
default = {
4848
small: {
4949
flavor: "general.v1.tiny"
50-
image: "Rocky-8-GenericCloud-8.5-20211114.2.x86_64"
50+
image: "openhpc-220413-1545.qcow2"
5151
}
5252
}
5353
}

requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ roles:
66
version: v0.12.0
77
name: stackhpc.openhpc
88
- src: https://github.com/stackhpc/ansible-node-exporter.git
9-
version: support-rhel-clones
9+
version: feature/no-install
1010
name: cloudalchemy.node_exporter
1111
- src: cloudalchemy.blackbox-exporter
1212
version: 1.0.0

0 commit comments

Comments
 (0)