Skip to content

Commit

Permalink
tidy up cluster.yml files
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb committed Dec 1, 2022
1 parent 8d6bc2e commit be7b812
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
9 changes: 4 additions & 5 deletions environments/arcus/inventory/cluster.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
all:
vars:
# required:
cluster_name: templatetf # FIXME: needs defining for each arcus cluster!
cluster_name: "{{ lookup('env', 'CI_CLUSTER_NAME'}}"
image_name: openhpc-221118-1422.qcow2 # https://github.com/stackhpc/slurm_image_builder/pull/12
flavor: vm.alaska.cpu.general.small
key_pair: slurm-app-ci
network_name: WCDC-iLab-60
subnet_name: WCDC-iLab-60
openhpc_slurm_partitions:
- name: small
- name: extra

# overrides:
vnic_type: direct
block_device_prefix: sd
home_volume_size: 10
state_volume_size: 10

openhpc_slurm_partitions:
- name: small
- name: extra

# compute must contain child groups matching openhpc_slurm_partitions
compute:
children:
Expand Down
21 changes: 12 additions & 9 deletions environments/common/inventory/cluster.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-format ansible inventory with default hostvars
# This provides defaults when no actual hosts are available, i.e. during provisining or image build. It should be overriden/extended
# using an environment's own cluster.yml file.
# Yaml-format ansible inventory with default hostvars. It should be overriden/extended by an environment's own cluster.yml file.
# NB: This is the lowest-possible priority - it will be overridden by inventory files in other inventories, 'all' group_vars, etc.
# Host and group vars defined here are available even when no hosts have been provisioned (e.g. during provisioning or image build).

all:
vars:
# Must be provided in an environment:
Expand All @@ -12,25 +12,28 @@ all:
network_name: "{{ undef(hint='network_name must be defined') }}"
subnet_name: "{{ undef(hint='subnet_name must be defined') }}"

# tf meta:
# top-level domain for cluster (FQDN is nodename.clustername.tld):
tld: invalid

# terraform lifecycle:
tf_ignore_changes:
- image_name
- user_data

# openstack volume options - note hostvars too:
state_volume_size: 150 # GB
home_volume_size: 100 # GB
block_device_prefix: vd
volumes: []

# tf openstack_networking_port_v2:binding
# terrraform openstack_networking_port_v2:binding
vnic_profile: {}
vnic_type: normal

security_groups: ["default"]

openhpc_cluster_name: "{{ cluster_name }}" # FIXME move to defaults?
block_device_prefix: vd
tld: invalid

# this default works when there are no child groups in the 'compute' group
# and no partition customisation is required
openhpc_slurm_partitions:
- name: "compute"

Expand Down
1 change: 1 addition & 0 deletions environments/common/inventory/group_vars/all/openhpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# See: https://github.com/stackhpc/ansible-role-openhpc
# for variable definitions

openhpc_cluster_name: "{{ cluster_name }}"
openhpc_enable:
control: "{{ inventory_hostname in groups['control'] }}"
batch: "{{ inventory_hostname in groups['compute'] }}"
Expand Down

0 comments on commit be7b812

Please sign in to comment.