diff --git a/playbooks/svos-releases/nh3-svos-45d3a48-v0.0.21-stage.yaml b/playbooks/svos-releases/nh3-svos-45d3a48-v0.0.21-stage.yaml new file mode 100644 index 0000000..c1dc9fc --- /dev/null +++ b/playbooks/svos-releases/nh3-svos-45d3a48-v0.0.21-stage.yaml @@ -0,0 +1,26 @@ +# nh3-svos: STAGE SVOS v0.0.21 (45d3a48) beside the live release. Installs into /opt/svos/releases/45d3a48 and runs the +# new kernel's check-config against the live configuration. Does NOT switch current, stop or start anything. +# svos-dev's request (thread 01M59JY4V62Z43WZ0CWZGERK8M): UI 0.0.25 (the /tasks draft survives a hidden tab); kernel 0.0.21 is a +# version bump; everything else carried from 81cc5a2. Built from the LOCAL tag before the push; the publish +# (nh3-svos-45d3a48-v0.0.21.yaml) first needs origin's v0.0.21 to name the same commit. +steps: + - name: Private staging dir + shell: install -d -m 0700 /tmp/svos-stage-45d3a48 + - {name: stage release, upload: {src: /tmp/claude-1000/-home-lkraven-development-eshpfi-management/e0be18fd-0734-4786-b933-904f0a74d2a2/scratchpad/svos-45d3a48/svos-release-45d3a48.tar.gz, dest: /tmp/svos-stage-45d3a48/release.tar.gz, mode: "0644"}} + - {name: stage uv, upload: {src: /home/lkraven/bin/uv, dest: /tmp/svos-stage-45d3a48/uv, mode: "0755"}} + - {name: stage installer, upload: {src: /tmp/claude-1000/-home-lkraven-development-eshpfi-management/e0be18fd-0734-4786-b933-904f0a74d2a2/scratchpad/svos-45d3a48/install-release.py, dest: /tmp/svos-stage-45d3a48/install-release.py, mode: "0644"}} + - name: Verify staged hashes + shell: cd /tmp/svos-stage-45d3a48 && printf '%s %s\n' 1d5ea371bc222057171c0e9fe5a654970328e6c90c7a3cd01759f6b1b45a78f0 release.tar.gz 83aa128da93e168283ed32cf75cd819fe17b135b3fc1f7ccb3c912eec198d9fb uv | sha256sum -c - + changed_when: "false" + - name: Install release 45d3a48 beside the live one (current NOT switched) + sudo: true + shell: python3 /tmp/svos-stage-45d3a48/install-release.py + creates: /opt/svos/releases/45d3a48/apps-env/pyvenv.cfg +verify: + - name: New kernel 0.0.21 accepts the live configuration as it is + sudo: true + shell: runuser -u svc-svos -- /opt/svos/releases/45d3a48/kernel-env/bin/svos-kernel check-config --data-root /var/lib/svos + changed_when: "false" + - name: current still points at the live release + shell: readlink /opt/svos/current + changed_when: "false" diff --git a/playbooks/svos-releases/nh3-svos-45d3a48-v0.0.21.yaml b/playbooks/svos-releases/nh3-svos-45d3a48-v0.0.21.yaml new file mode 100644 index 0000000..2f38072 --- /dev/null +++ b/playbooks/svos-releases/nh3-svos-45d3a48-v0.0.21.yaml @@ -0,0 +1,26 @@ +# nh3-svos -> SVOS v0.0.21 (45d3a48): UI-only publish. UI 0.0.25 (the /tasks draft runs on its own request channel and +# survives a hidden tab / a session publish that is not ready). Kernel 0.0.21 = a version bump; no app change, no card. +# svos-dev's request, thread 01M59JY4V62Z43WZ0CWZGERK8M. PRE-REQS: the stage playbook; origin's v0.0.21 == 45d3a48a8919 +# (git ls-remote on nh3-dev before this runs). current must move because svos-front-inventory generates from +# /opt/svos/current/static; NOTHING restarts: the kernel, knowledge, judge and voice keep running 15c2d04's code and the +# interface 6d4cb1c's (all identical in code), so keep both dirs until those processes restart. +steps: + - name: Pre-reqs present + sudo: true + shell: test -f /opt/svos/releases/45d3a48/static/index.html && readlink /opt/svos/current + changed_when: "false" + - name: Switch current to 45d3a48 + sudo: true + shell: ln -sfn /opt/svos/releases/45d3a48 /opt/svos/current.new && chgrp -h svc-svos /opt/svos/current.new && mv -T /opt/svos/current.new /opt/svos/current && readlink /opt/svos/current + - name: Front door inventory (UI 0.0.25 live; 81cc5a2 becomes previous) + sudo: true + shell: /usr/local/sbin/svos-front-inventory 2>&1 | grep -E 'GENERATED|updated|root \*|path /assets' | head -4 +verify: + - name: Front door inventory current; health unchanged + sudo: true + shell: /usr/local/sbin/svos-front-inventory --check && curl -s http://127.0.0.1:8400/health && echo + changed_when: "false" + - name: Which release dir each running service maps (nothing restarted) + sudo: true + shell: for u in svos-kernel svos-interface svos-knowledge svos-judge svos-voice; do pid=$(systemctl show $u -p MainPID --value); printf '%s %s\n' $u "$(grep -oE '/opt/svos/releases/[0-9a-f]+' /proc/$pid/maps | sort -u | tr '\n' ' ')"; done + changed_when: "false"