Move release execution to terra with four-hour actions and scheduled runs
This commit is contained in:
parent
4ab5a63e77
commit
c9e293934d
5 changed files with 42 additions and 25 deletions
|
|
@ -1,5 +1,21 @@
|
|||
# Daily release cycle
|
||||
|
||||
## Terra-only execution (2026-11-08)
|
||||
|
||||
The user requested moving all builds, Flatpak preparation and VM acceptance to
|
||||
terra. The coordinator's worker is now `root@127.0.0.1` (terra itself), with
|
||||
sources, caches and work under `/tank/archipelago/worker` on ZFS. Signing and
|
||||
publication retain their existing coordinator paths. The tall-bridge Flatpak
|
||||
relay is disabled. Existing yabloko inputs/evidence are preserved during migration.
|
||||
|
||||
Each normal worker action has a four-hour RuntimeMaxSec; its SSH waiter allows
|
||||
one additional minute for shutdown/reporting. The coordinator has no aggregate
|
||||
11-hour deadline, so several four-hour actions can complete sequentially.
|
||||
Transport/cleanup timeouts remain short. The timer is configured for the D-090
|
||||
calendar: the 15th and 30th at 00:00 UTC, persistent catch-up enabled. The user
|
||||
explicitly authorized enabling it now; snapshot rollout remains a separate task.
|
||||
Timer enablement and the first terra-only run must be verified operationally.
|
||||
|
||||
Run `20261108T074340Z` built Core/GNOME but KDE ISO packaging exhausted worker
|
||||
space (image 2455054 sectors, available 2445624). The previous 35 GB configured
|
||||
reserve was insufficient for the three-variant peak. Configuration and default
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ Type=oneshot
|
|||
Environment="ARCHIPELAGO_RELEASE_REASON=Operational release cycle (D-090/D-091)"
|
||||
ExecStart=/usr/bin/python3 /opt/archipelago/src/infrastructure/pipeline/release-cycle.py
|
||||
ExecStopPost=/usr/bin/python3 /opt/archipelago/src/infrastructure/pipeline/cycle-terminal.py
|
||||
TimeoutStartSec=11h
|
||||
# Each worker action is bounded to four hours by the release driver.
|
||||
TimeoutStartSec=infinity
|
||||
TimeoutStopSec=2min
|
||||
KillMode=control-group
|
||||
StandardOutput=journal
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
[Unit]
|
||||
Description=Archipelago release cycle at 00:00 UTC / 03:00 MSK
|
||||
Description=Archipelago release cycle on the 15th and 30th at 00:00 UTC
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 00:00:00 UTC
|
||||
OnCalendar=*-*-15,30 00:00:00 UTC
|
||||
Persistent=true
|
||||
AccuracySec=1min
|
||||
Unit=archipelago-release-cycle.service
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
{
|
||||
"coordinator_root": "/opt/archipelago",
|
||||
"worker": "root@yabloko",
|
||||
"worker_root": "/opt/archipelago",
|
||||
"worker_source_root": "/opt/archipelago/kde-next",
|
||||
"worker": "root@127.0.0.1",
|
||||
"worker_root": "/tank/archipelago/worker",
|
||||
"worker_source_root": "/tank/archipelago/worker/release-source",
|
||||
"worker_binary": "/opt/archipelago/revision/target/release/archipelago",
|
||||
"coordinator_tools_image": "sha256:a7f09cdadffecf35297700c8f3513479c92d9a6a14cb6c0f95c71fdfb058a814",
|
||||
"worker_tools_image": "sha256:a7f09cdadffecf35297700c8f3513479c92d9a6a14cb6c0f95c71fdfb058a814",
|
||||
"flatpak_cache": "/opt/archipelago/cache/flatpak",
|
||||
"flatpak_refresh_seconds": 1800,
|
||||
"flatpak_cache": "/tank/archipelago/worker/cache/flatpak",
|
||||
"flatpak_refresh_seconds": 14400,
|
||||
"flatpak_initial_fill_seconds": 14400,
|
||||
"variants": ["core", "gnome", "kde"],
|
||||
"kde_release_decision": "D-091",
|
||||
"kde_flatpak_cache": "/opt/archipelago/cache/flatpak/kde",
|
||||
"kde_flatpak_download_worker": "root@tall-bridge",
|
||||
"kde_flatpak_cache": "/tank/archipelago/worker/cache/flatpak/kde",
|
||||
"kde_ui_actions": "test-lab/probes/kde-ui-actions.json",
|
||||
"kde_ui_calibration": true,
|
||||
"minimum_build_free_bytes": 60000000000,
|
||||
"signing_home": "/opt/archipelago/keys/archipelago-stable",
|
||||
"signing_key": "CF0FED7A412E57010527CD68BFAA5E80EEEACCA2",
|
||||
"public_url": "https://mirror.nw-sys.ru/archipelago",
|
||||
"bootstrap": "/opt/archipelago/cache/bootstrap/archlinux-bootstrap-2026.11.01-x86_64.tar.zst",
|
||||
"bootstrap": "/tank/archipelago/worker/cache/bootstrap/archlinux-bootstrap-2026.11.01-x86_64.tar.zst",
|
||||
"ovmf_code": "/usr/share/OVMF/OVMF_CODE_4M.fd",
|
||||
"ovmf_vars": "/usr/share/OVMF/OVMF_VARS_4M.fd",
|
||||
"build_environment": {
|
||||
"ARCHIPELAGO_PACKAGE_CACHE": "/opt/archipelago/cache/packages",
|
||||
"ARCHIPELAGO_PACKAGE_CACHE": "/tank/archipelago/worker/cache/packages",
|
||||
"ARCHIPELAGO_MIRROR_URL": "https://mirror.nw-sys.ru/archlinux/$repo/os/$arch",
|
||||
"ARCHIPELAGO_FLATPAK_SEED": "/opt/archipelago/cache/flatpak/current",
|
||||
"ARCHIPELAGO_FLATPAK_SEED": "/tank/archipelago/worker/cache/flatpak/current",
|
||||
"ARCHIPELAGO_SOFTWARE_PLUGIN": "/opt/archipelago/evidence/gnome-software-adapter/libgs_plugin_archipelago.so"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,8 +116,8 @@ def main():
|
|||
atomic(run / 'state.json', state)
|
||||
call(['ssh', '-o', 'BatchMode=yes', '-o', 'ConnectTimeout=20', '-o', 'ServerAliveInterval=15', worker,
|
||||
shlex.join(['systemd-run', '--wait', '--pipe', '--unit=' + unit,
|
||||
'--property=RuntimeMaxSec=' + str(timeout - 30),
|
||||
'bash', '-euo', 'pipefail', '-c', script])], timeout)
|
||||
'--property=RuntimeMaxSec=' + str(timeout),
|
||||
'bash', '-euo', 'pipefail', '-c', script])], timeout + 60)
|
||||
def tools(argv, signing=False):
|
||||
mounts = ['--mount', f'type=bind,src={base}/data,dst={base}/data',
|
||||
'--mount', f'type=bind,src={run}/pipeline,dst=/pipeline,readonly']
|
||||
|
|
@ -141,7 +141,7 @@ def main():
|
|||
for v in (desktops if args.core_build else variants)))
|
||||
phase('core-installed-acceptance')
|
||||
remote(f'''mkdir -p {remote_root}/core/vms
|
||||
python3 {remote_root}/probes/core_iso_acceptance.py --iso {shlex.quote(builds['core'])}/output/archipelago-core-latest.iso --workdir {remote_root}/core/vms --production-cli --extensions-sequence --firmware --ovmf-code {shlex.quote(config['ovmf_code'])} --ovmf-vars {shlex.quote(config['ovmf_vars'])} > {remote_root}/core/acceptance.log 2>&1''', 7200)
|
||||
python3 {remote_root}/probes/core_iso_acceptance.py --iso {shlex.quote(builds['core'])}/output/archipelago-core-latest.iso --workdir {remote_root}/core/vms --production-cli --extensions-sequence --firmware --ovmf-code {shlex.quote(config['ovmf_code'])} --ovmf-vars {shlex.quote(config['ovmf_vars'])} > {remote_root}/core/acceptance.log 2>&1''', 14400)
|
||||
call(['rsync', '-a', '--include=*/', '--include=*.json', '--include=*.jsonl', '--include=*.serial', '--exclude=*',
|
||||
f'{worker}:{remote_root}/core/vms/', str(run / 'core/vms') + '/'])
|
||||
call(['rsync', '-a', f'{worker}:{remote_root}/core/acceptance.log', str(run / 'core') + '/'])
|
||||
|
|
@ -150,7 +150,7 @@ python3 {remote_root}/probes/core_iso_acceptance.py --iso {shlex.quote(builds['c
|
|||
remote(shlex.join(['python3', remote_root + '/probes/gnome_native_acceptance.py',
|
||||
'--iso', builds['gnome'] + '/output/archipelago-gnome-probe.iso',
|
||||
'--workdir', remote_root + '/gnome/acceptance', '--unit', vm_unit,
|
||||
'--ovmf-code', config['ovmf_code'], '--ovmf-vars', config['ovmf_vars']]), 7200)
|
||||
'--ovmf-code', config['ovmf_code'], '--ovmf-vars', config['ovmf_vars']]), 14400)
|
||||
call(['rsync', '-a', '--include=*/', '--include=*.json', '--include=*.log', '--include=*.serial',
|
||||
'--include=*.png', '--exclude=*', f'{worker}:{remote_root}/gnome/acceptance/', str(run / 'gnome/acceptance') + '/'])
|
||||
remote('systemctl stop ' + shlex.quote(vm_unit))
|
||||
|
|
@ -167,7 +167,7 @@ python3 {remote_root}/probes/core_iso_acceptance.py --iso {shlex.quote(builds['c
|
|||
command += ['--ui-actions', remote_root + '/source/src/' + str(action_path)]
|
||||
if config.get('kde_ui_calibration'):
|
||||
command += ['--calibrate-ui']
|
||||
remote(shlex.join(command), 7200)
|
||||
remote(shlex.join(command), 14400)
|
||||
call(['rsync', '-a', '--include=*/', '--include=*.json', '--include=*.log', '--include=*.serial',
|
||||
'--include=*.png', '--exclude=*', f'{worker}:{remote_root}/kde/acceptance/', str(run / 'kde/acceptance') + '/'])
|
||||
remote('systemctl stop ' + shlex.quote(kde_vm_unit))
|
||||
|
|
@ -225,7 +225,7 @@ find {remote_root}/probes -type f -name '*.py' -exec sha256sum {{}} + >> {remote
|
|||
remote(shlex.join(['bash', remote_root + '/source/src/infrastructure/pipeline/flatpak-cache.sh',
|
||||
remote_root + '/source/src', config['flatpak_cache'], config['bootstrap'],
|
||||
config['build_environment']['ARCHIPELAGO_PACKAGE_CACHE'], str(refresh), 'gnome', str(initial_fill)]) +
|
||||
' > ' + shlex.quote(remote_root + '/flatpak.log') + ' 2>&1', initial_fill + 600)
|
||||
' > ' + shlex.quote(remote_root + '/flatpak.log') + ' 2>&1', 14400)
|
||||
call(['rsync', '-a', f"{worker}:{config['flatpak_cache']}/status.json", str(run / 'flatpak-status.json')])
|
||||
state['flatpak'] = json.loads((run / 'flatpak-status.json').read_text())
|
||||
if 'kde' in desktops:
|
||||
|
|
@ -239,7 +239,7 @@ find {remote_root}/probes -type f -name '*.py' -exec sha256sum {{}} + >> {remote
|
|||
remote_root + '/source/src', kde_cache, config['bootstrap'],
|
||||
config['build_environment']['ARCHIPELAGO_PACKAGE_CACHE'], str(refresh), 'kde', str(initial_fill)] +
|
||||
([relay] if relay else [])) +
|
||||
' > ' + shlex.quote(remote_root + '/flatpak-kde.log') + ' 2>&1', initial_fill + 600)
|
||||
' > ' + shlex.quote(remote_root + '/flatpak-kde.log') + ' 2>&1', 14400)
|
||||
call(['rsync', '-a', f'{worker}:{kde_cache}/status.json', str(run / 'flatpak-kde-status.json')])
|
||||
state['flatpak_kde'] = json.loads((run / 'flatpak-kde-status.json').read_text())
|
||||
if args.existing:
|
||||
|
|
@ -252,14 +252,14 @@ find {remote_root}/probes -type f -name '*.py' -exec sha256sum {{}} + >> {remote
|
|||
remote(shlex.join(['bash', remote_root + '/source/src/infrastructure/pipeline/build-software-adapter.sh',
|
||||
remote_root + '/source/src', config['flatpak_cache'] + '/tools/root.x86_64',
|
||||
config['build_environment']['ARCHIPELAGO_PACKAGE_CACHE'], remote_root + '/software-adapter']) +
|
||||
' > ' + shlex.quote(remote_root + '/software-adapter.log') + ' 2>&1', 3600)
|
||||
' > ' + shlex.quote(remote_root + '/software-adapter.log') + ' 2>&1', 14400)
|
||||
call(['rsync', '-a', f'{worker}:{remote_root}/software-adapter/', str(run / 'software-adapter') + '/'])
|
||||
if 'kde' in desktops:
|
||||
phase('building-discover-adapter')
|
||||
remote(shlex.join(['bash', remote_root + '/source/src/infrastructure/pipeline/build-discover-adapter.sh',
|
||||
remote_root + '/source/src', config['flatpak_cache'] + '/tools/root.x86_64',
|
||||
config['build_environment']['ARCHIPELAGO_PACKAGE_CACHE'], remote_root + '/discover-adapter']) +
|
||||
' > ' + shlex.quote(remote_root + '/discover-adapter.log') + ' 2>&1', 3600)
|
||||
' > ' + shlex.quote(remote_root + '/discover-adapter.log') + ' 2>&1', 14400)
|
||||
call(['rsync', '-a', f'{worker}:{remote_root}/discover-adapter/', str(run / 'discover-adapter') + '/'])
|
||||
phase('building-core')
|
||||
builds = {v: remote_root + '/' + v + '/build' for v in variants}
|
||||
|
|
@ -286,9 +286,9 @@ find {remote_root}/probes -type f -name '*.py' -exec sha256sum {{}} + >> {remote
|
|||
remote(f'''test "$(df -PB1 {remote_root} | awk 'NR==2 {{print $4}}')" -ge {config.get('minimum_build_free_bytes', 60000000000)}
|
||||
mkdir -p {remote_root}/core {remote_root}/gnome
|
||||
{env} {remote_root}/archipelago build iso {builds['core']} {shlex.quote(config['bootstrap'])} > {remote_root}/core/build.log 2>&1
|
||||
rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extractor {builds['core']}/tools {builds['core']}/composed {builds['core']}/layer''', 10800)
|
||||
rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extractor {builds['core']}/tools {builds['core']}/composed {builds['core']}/layer''', 14400)
|
||||
phase('building-gnome-purpose-and-iso')
|
||||
remote(f'{env} ARCHIPELAGO_CORE_BUILD={builds["core"]} {remote_root}/archipelago build iso --purpose gnome {builds["gnome"]} {shlex.quote(config["bootstrap"])} > {remote_root}/gnome/build.log 2>&1', 10800)
|
||||
remote(f'{env} ARCHIPELAGO_CORE_BUILD={builds["core"]} {remote_root}/archipelago build iso --purpose gnome {builds["gnome"]} {shlex.quote(config["bootstrap"])} > {remote_root}/gnome/build.log 2>&1', 14400)
|
||||
if 'kde' in desktops:
|
||||
phase('building-kde-purpose-and-iso')
|
||||
remote('rm -rf ' + ' '.join(shlex.quote(builds['gnome'] + '/' + name) for name in
|
||||
|
|
@ -301,7 +301,7 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
|
|||
kde_command = shlex.join(['env', *[k + '=' + v for k, v in kde_env.items()],
|
||||
'ARCHIPELAGO_CORE_BUILD=' + builds['core'], remote_root + '/archipelago',
|
||||
'build', 'iso', '--purpose', 'kde', builds['kde'], config['bootstrap']])
|
||||
remote(f'mkdir -p {remote_root}/kde; {kde_command} > {remote_root}/kde/build.log 2>&1', 10800)
|
||||
remote(f'mkdir -p {remote_root}/kde; {kde_command} > {remote_root}/kde/build.log 2>&1', 14400)
|
||||
validate_pair()
|
||||
phase('archiving-artifacts')
|
||||
if shutil.disk_usage(base / 'data').free < config.get('minimum_coordinator_free_bytes', 50000000000):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue