Skip to content

Commit 6c8bf78

Browse files
authored
Update grafana to v10 using Ark rpms (#664)
* allow setting packer cleanup option on fatimage builds * use grafana packages from ark/pulp * bump CI image * disable grafana repo when templating so existing logic works * bump grafana from v9 to v10 * bump CI image * fix site failing to template out dnf password for grafana repofile * bump CI image * avoid leaking Ark creds from local build into site.yml * bump CI image
1 parent b5ff56a commit 6c8bf78

File tree

7 files changed

+37
-4
lines changed

7 files changed

+37
-4
lines changed

.github/workflows/fatimage.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
- LEAFCLOUD
1111
- SMS
1212
- ARCUS
13+
cleanup_on_failure:
14+
description: Cleanup Packer resources on failure
15+
type: boolean
16+
required: true
17+
default: true
1318

1419
jobs:
1520
openstack:
@@ -78,7 +83,7 @@ jobs:
7883
packer init .
7984
8085
PACKER_LOG=1 packer build \
81-
-on-error=${{ vars.PACKER_ON_ERROR }} \
86+
-on-error=${{ github.event.inputs.cleanup_on_failure && 'cleanup' || 'abort' }} \
8287
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
8388
-var "source_image_name=${{ matrix.build.source_image_name }}" \
8489
-var "image_name=${{ matrix.build.image_name }}" \

ansible/roles/dnf_repos/defaults/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ dnf_repos_filenames:
88
appstream: 'Rocky-AppStream'
99
crb: 'Rocky-PowerTools'
1010
extras: 'Rocky-Extras'
11+
grafana: 'grafana'
1112
'9':
1213
baseos: 'rocky'
1314
appstream: 'rocky'
1415
crb: 'rocky'
1516
extras: 'rocky-extras'
17+
grafana: 'grafana'
1618

1719
dnf_repos_version_filenames: "{{ dnf_repos_filenames[ansible_distribution_major_version] }}"
1820

@@ -33,6 +35,9 @@ dnf_repos_default_repolist:
3335
- file: ceph
3436
name: Ceph
3537
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.ceph[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
38+
- file: "{{ dnf_repos_version_filenames.grafana }}"
39+
name: grafana
40+
base_url: "{{ dnf_repos_pulp_content_url }}/{{ appliances_pulp_repos.grafana[ansible_distribution_major_version] | appliances_repo_to_subpath }}"
3641

3742
dnf_repos_openhpc_repolist:
3843
- name: OpenHPC

ansible/roles/pulp_site/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ pulp_site_rpm_info:
2828
subpath: "{{ appliances_pulp_repos.openhpc_updates[pulp_site_target_distribution_version_major] | appliances_repo_to_subpath }}"
2929
- name: "ceph-{{ pulp_site_target_distribution_version_major }}-{{ appliances_pulp_repos.ceph[pulp_site_target_distribution_version_major].timestamp }}"
3030
subpath: "{{ appliances_pulp_repos.ceph[pulp_site_target_distribution_version_major] | appliances_repo_to_subpath }}"
31+
- name: "grafana-{{ pulp_site_target_distribution_version_major }}-{{ appliances_pulp_repos.grafana.timestamp[pulp_site_target_distribution_version_major].timestamp }}
32+
subpath: "{{ appliances_pulp_repos.grafana[pulp_site_target_distribution_version_major] | appliances_repo_to_subpath }}"
3133

3234
pulp_site_rpm_repo_defaults:
3335
remote_username: "{{ pulp_site_upstream_username }}"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"cluster_image": {
3-
"RL8": "openhpc-RL8-250423-1606-b61e2f1a",
4-
"RL9": "openhpc-RL9-250423-1606-b61e2f1a"
3+
"RL8": "openhpc-RL8-250506-1259-abb6394b",
4+
"RL9": "openhpc-RL9-250506-1259-abb6394b"
55
}
66
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{ ansible_managed | comment }}
2+
[grafana]
3+
baseurl = {{ appliances_pulp_url }}/pulp/content/{{ appliances_pulp_repos.grafana[ansible_distribution_major_version] | appliances_repo_to_subpath }}
4+
enabled = 0
5+
name = grafana
6+
async = 1
7+
gpgcheck = 0
8+
{% if 'dnf_repos' in group_names and dnf_repos_password is defined %}
9+
password = {{ dnf_repos_password }}
10+
username = {{ dnf_repos_username }}
11+
{% endif %}

environments/common/inventory/group_vars/all/grafana.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# See: https://github.com/cloudalchemy/ansible-grafana
44
# for variable definitions.
5-
grafana_version: '9.5.21'
5+
grafana_version: '10.4.18'
66

77
# need to copy some role defaults here so we can use in inventory:
88
grafana_port: 3000
@@ -108,3 +108,6 @@ _grafana_auth_anon_cfg:
108108
org_role: Viewer
109109
grafana_auth: "{{ _grafana_auth_anon_cfg if grafana_auth_anonymous | bool else {} }}"
110110
_grafana_auth_is_anonymous: "{{ grafana_auth.anonymous | default({}) | length > 0 }}"
111+
112+
# use ark or pulp for grafana as upstream packages disappear:
113+
grafana_yum_repo_template: "{{ appliances_repository_root }}/environments/common/files/grafana/grafana.repo.j2"

environments/common/inventory/group_vars/all/timestamps.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,10 @@ appliances_pulp_repos:
6767
'9':
6868
path: OpenHPC/3/updates/EL_9
6969
timestamp: 20241218T154614
70+
grafana:
71+
'8':
72+
path: grafana/oss/rpm
73+
timestamp: 20250505T025259
74+
'9':
75+
path: grafana/oss/rpm
76+
timestamp: 20250505T025259

0 commit comments

Comments
 (0)