docs(devops): runbook and verify script for Importer SSH (BIT-1044)

Add operational checklist for Paperclip host to WDMI Importer (192.168.1.123):
network prerequisites, authorized_keys for paperclip@bitreport-cto, Proxmox
alternative path, and an executable acceptance script.

Cross-link from RUNBOOK_REPORTER_WDMI_CACHE_MKDIR.md.

Paperclip-Issue: BIT-1044
Paperclip-Run: b99b90b0-311f-442e-82ce-5c8644abffb1
This commit is contained in:
Peter Spark committed 2026-04-05 19:27:40 +00:00
1 parent 410cd7e0aa
commit c8422fa10f
3 files changed
+112

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
# Acceptance check for BIT-1044: BatchMode SSH from this host to WDMI Importer (LAN).
# See docs/RUNBOOK_DEVOPS_IMPORTER_SSH_BIT1044.md
#
# Usage:
# ./scripts/devops/verify_importer_ssh_bit1044.sh
# IMPORTER_HOST=192.168.1.123 SSH_USER=root ./scripts/devops/verify_importer_ssh_bit1044.sh
# ./scripts/devops/verify_importer_ssh_bit1044.sh --diagnose # print route/neigh/ping, then SSH; exit code from SSH only
set -euo pipefail
readonly IMPORTER_HOST="${IMPORTER_HOST:-192.168.1.123}"
readonly SSH_USER="${SSH_USER:-root}"
readonly CONNECT_TIMEOUT="${SSH_CONNECT_TIMEOUT:-10}"
_diagnose=0
if [[ "${1:-}" == "--diagnose" ]]; then
_diagnose=1
fi
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
sed -n '1,20p' "$0"
exit 0
fi
if [[ -n "${1:-}" && "${1}" != "--diagnose" ]]; then
echo "unknown argument: $1 (use --diagnose or no args)" >&2
exit 2
fi
if ((_diagnose)); then
echo "verify_importer_ssh_bit1044: route to ${IMPORTER_HOST}"
ip route get "${IMPORTER_HOST}" 2>/dev/null || true
echo "verify_importer_ssh_bit1044: neighbour ${IMPORTER_HOST}"
ip neigh show "${IMPORTER_HOST}" 2>/dev/null || true
echo "verify_importer_ssh_bit1044: ping (2 probes, 2s max wait)"
ping -c 2 -W 2 "${IMPORTER_HOST}" 2>&1 || true
fi
echo "verify_importer_ssh_bit1044: ssh BatchMode ${SSH_USER}@${IMPORTER_HOST} echo ok"
exec ssh -o BatchMode=yes -o ConnectTimeout="${CONNECT_TIMEOUT}" -o StrictHostKeyChecking=accept-new \
"${SSH_USER}@${IMPORTER_HOST}" echo ok