hecate: define explicit worker inventory for recovery
This commit is contained in:
parent
773e0234b8
commit
cff88e4944
@ -62,7 +62,26 @@ control_planes:
|
||||
- titan-0a
|
||||
- titan-0b
|
||||
- titan-0c
|
||||
workers: []
|
||||
workers:
|
||||
- titan-04
|
||||
- titan-05
|
||||
- titan-06
|
||||
- titan-07
|
||||
- titan-08
|
||||
- titan-09
|
||||
- titan-10
|
||||
- titan-11
|
||||
- titan-12
|
||||
- titan-13
|
||||
- titan-14
|
||||
- titan-15
|
||||
- titan-17
|
||||
- titan-18
|
||||
- titan-19
|
||||
- titan-20
|
||||
- titan-21
|
||||
- titan-22
|
||||
- titan-24
|
||||
local_bootstrap_paths:
|
||||
- infrastructure/core
|
||||
- clusters/atlas/flux-system
|
||||
|
||||
@ -62,7 +62,26 @@ control_planes:
|
||||
- titan-0a
|
||||
- titan-0b
|
||||
- titan-0c
|
||||
workers: []
|
||||
workers:
|
||||
- titan-04
|
||||
- titan-05
|
||||
- titan-06
|
||||
- titan-07
|
||||
- titan-08
|
||||
- titan-09
|
||||
- titan-10
|
||||
- titan-11
|
||||
- titan-12
|
||||
- titan-13
|
||||
- titan-14
|
||||
- titan-15
|
||||
- titan-17
|
||||
- titan-18
|
||||
- titan-19
|
||||
- titan-20
|
||||
- titan-21
|
||||
- titan-22
|
||||
- titan-24
|
||||
local_bootstrap_paths:
|
||||
- infrastructure/core
|
||||
- clusters/atlas/flux-system
|
||||
|
||||
@ -208,6 +208,27 @@ migrate_hecate_config() {
|
||||
role="$(read_hecate_role)"
|
||||
local inventory_block
|
||||
local managed_block
|
||||
local workers_block
|
||||
workers_block='workers:
|
||||
- titan-04
|
||||
- titan-05
|
||||
- titan-06
|
||||
- titan-07
|
||||
- titan-08
|
||||
- titan-09
|
||||
- titan-10
|
||||
- titan-11
|
||||
- titan-12
|
||||
- titan-13
|
||||
- titan-14
|
||||
- titan-15
|
||||
- titan-17
|
||||
- titan-18
|
||||
- titan-19
|
||||
- titan-20
|
||||
- titan-21
|
||||
- titan-22
|
||||
- titan-24'
|
||||
if [[ "${role}" == "coordinator" ]]; then
|
||||
inventory_block='ssh_node_hosts:
|
||||
titan-db: 192.168.22.10
|
||||
@ -315,6 +336,11 @@ migrate_hecate_config() {
|
||||
changed=1
|
||||
fi
|
||||
fi
|
||||
if grep -Eq '^workers:[[:space:]]*\[\][[:space:]]*$' "${CONF_DIR}/hecate.yaml"; then
|
||||
perl -0pi -e 's#workers:\s*\[\]\n#'"${workers_block}"'\n#s' "${CONF_DIR}/hecate.yaml"
|
||||
echo "[install] hydrated workers inventory for startup/shutdown orchestration"
|
||||
changed=1
|
||||
fi
|
||||
|
||||
if [[ -n "${managed_block}" ]]; then
|
||||
if grep -Eq '^ssh_managed_nodes:[[:space:]]*\[\][[:space:]]*$' "${CONF_DIR}/hecate.yaml"; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user