Skip to content

Commit 2b719b2

Browse files
authored
Merge pull request #12 from stackhpc/fix/update-min-disk
Update UI compute minimum disk and home volume size
2 parents 19a7032 + f60aabd commit 2b719b2

File tree

5 files changed

+54
-25
lines changed

5 files changed

+54
-25
lines changed

group_vars/openstack.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ terraform_project_path: "{{ playbook_dir }}/terraform"
1717
terraform_state: "{{ cluster_state | default('present') }}"
1818
cluster_ssh_user: rocky
1919

20-
state_volume_size: 150 # GB
20+
# Set the size of the state volume to metrics_db_maximum_size + 10
21+
state_volume_size: "{{ metrics_db_maximum_size + 10 }}"
2122

2223
state_volume_device_path: "{{ cluster_state_volume_device_path | default('/dev/vdb') }}"
23-
home_volume_device_path: "{{ cluster_home_volume_device_path | default('/dev/vdc') }}"
24+
home_volume_device_path: "{{ cluster_home_volume_device_path | default('/dev/vdc') }}"

group_vars/prometheus.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ openondemand_address: "{{ hostvars[groups['openondemand'].0].api_address if 'ope
66
# Override group_var set in ansible-slurm-appliance all group - unless
77
# OOD is being deployed then there won't be an OOD group
88
prometheus_scrape_configs: "{{ prometheus_scrape_configs_default + (openondemand_scrape_configs if ( 'openondemand' in groups ) else [] ) }}"
9+
10+
# Set Prometheus storage retention size
11+
prometheus_storage_retention_size: "{{ metrics_db_maximum_size }}GB"

roles/cluster_infra/templates/resources.tf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ resource "openstack_blockstorage_volume_v3" "state" {
8181
resource "openstack_blockstorage_volume_v3" "home" {
8282
name = "{{ cluster_name }}-home"
8383
description = "Home for control node"
84-
size = "{{ home_volme_size }}"
84+
size = "{{ home_volume_size }}"
8585
}
8686

8787

roles/persist_openhpc_secrets/tasks/main.yml

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,34 @@
22

33
- name: Check if OpenHPC secrets exist
44
stat:
5-
path: /etc/ansible/facts.d/openhpc_secrets.fact
5+
path: "{{ appliances_state_dir }}/ansible/facts.d/openhpc_secrets.fact"
66
register: openhpc_secrets_stat
77

8-
- name: Persist OpenHPC secrets
9-
block:
10-
- name: Ensure Ansible facts directory exists
11-
file:
12-
path: /etc/ansible/facts.d
13-
state: directory
14-
recurse: yes
15-
16-
- name: Write OpenHPC secrets
17-
template:
18-
src: openhpc_secrets.fact
19-
dest: /etc/ansible/facts.d/openhpc_secrets.fact
20-
21-
- name: Re-read facts after adding custom fact
22-
ansible.builtin.setup:
23-
filter: ansible_local
8+
- name: Ensure Ansible facts directories exist
9+
file:
10+
path: "{{ item }}"
11+
state: directory
12+
owner: root
13+
mode: 0600
14+
loop:
15+
- "{{ appliances_state_dir }}/ansible.facts.d"
16+
- "/etc/ansible/facts.d"
17+
18+
- name: Write OpenHPC secrets
19+
template:
20+
src: openhpc_secrets.fact
21+
dest: "{{ appliances_state_dir }}/ansible.facts.d/openhpc_secrets.fact"
22+
owner: root
23+
mode: 0600
2424
when: "not openhpc_secrets_stat.stat.exists"
25+
26+
- name: Symlink persistent facts to facts_path
27+
file:
28+
state: link
29+
src: "{{ appliances_state_dir }}/ansible.facts.d/openhpc_secrets.fact"
30+
dest: /etc/ansible/facts.d/openhpc_secrets.fact
31+
owner: root
32+
33+
- name: Read facts
34+
ansible.builtin.setup:
35+
filter: ansible_local

ui-meta/slurm-infra.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,31 @@ parameters:
2727
immutable: true
2828
options:
2929
min_ram: 2048
30-
min_disk: 10
30+
min_disk: 20
3131

32-
- name: home_volme_size
33-
label: Home volume size
34-
description: The size in GB of the volume to use for home directories
32+
- name: home_volume_size
33+
label: Home volume size (GB)
34+
description: The size of the cloud volume to use for home directories
3535
kind: integer
3636
immutable: true
3737
options:
38-
min: 1
38+
min: 10
3939
default: 100
4040

41+
- name: metrics_db_maximum_size
42+
label: Metrics database size (GB)
43+
description: |
44+
The oldest metrics records in the [Prometheus](https://prometheus.io/) database will be
45+
discarded to ensure that the database does not grow larger than this size.
46+
47+
**A cloud volume of this size +10GB will be created to hold and persist the metrics
48+
database and important Slurm files.**
49+
kind: integer
50+
immutable: true
51+
options:
52+
min: 10
53+
default: 10
54+
4155
- name: cluster_run_validation
4256
label: Post-configuration validation
4357
description: >-

0 commit comments

Comments
 (0)