refactor!: rename the project from Monitor to MoShiro

Namespaces, assemblies, projects and directories, the solution, binaries,
images, systemd units, config paths, environment variables, protocol method
names, the media type and the raw chunk magic all move to MoShiro/moshiro.
Existing data and deployments are not compatible and must be recreated.
Also fix the architecture tests after the solution layout change and make
the update tests independent of their order.
This commit is contained in:
justme committed 2026-10-07 01:49:04 +08:00
1 parent 17b35223aa
commit 83e5120377
309 files changed
+1505 -1499

No files matched your search

@@ -1,16 +0,0 @@
[Unit]
Description=Monitor Probe (Podman container)
After=network-online.target
Wants=network-online.target
[Service]
EnvironmentFile=/etc/monitor-update/probe.image
Restart=always
RestartSec=5
TimeoutStopSec=30
ExecStartPre=-/usr/bin/podman rm -f monitor-probe
ExecStart=/usr/bin/podman run --rm --name monitor-probe --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v monitor-probe-config:/etc/monitor -v monitor-probe-status:/etc/monitor/update-status:ro ${IMAGE}
ExecStop=/usr/bin/podman stop -t 20 monitor-probe
[Install]
WantedBy=multi-user.target
@@ -1,16 +0,0 @@
[Unit]
Description=Monitor Probe (Docker container)
After=network-online.target
Wants=network-online.target
[Service]
EnvironmentFile=/etc/monitor-update/probe.image
Restart=always
RestartSec=5
TimeoutStopSec=30
ExecStartPre=-/usr/bin/docker rm -f monitor-probe
ExecStart=/usr/bin/docker run --rm --name monitor-probe --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v monitor-probe-config:/etc/monitor -v monitor-probe-status:/etc/monitor/update-status:ro ${IMAGE}
ExecStop=/usr/bin/docker stop -t 20 monitor-probe
[Install]
WantedBy=multi-user.target
@@ -1,16 +0,0 @@
[Unit]
Description=Monitor Probe (rootless Podman container)
After=network-online.target
Wants=network-online.target
[Service]
EnvironmentFile=%h/.config/monitor/probe.image
Restart=always
RestartSec=5
TimeoutStopSec=30
ExecStartPre=-/usr/bin/podman rm -f monitor-probe
ExecStart=/usr/bin/podman run --rm --name monitor-probe --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v monitor-probe-config:/etc/monitor -v monitor-probe-status:/etc/monitor/update-status:ro ${IMAGE}
ExecStop=/usr/bin/podman stop -t 20 monitor-probe
[Install]
WantedBy=default.target
@@ -1,16 +1,16 @@
[Unit]
Description=Monitor Agent (Podman container)
Description=MoShiro Agent (Podman container)
After=network-online.target
Wants=network-online.target
[Service]
EnvironmentFile=/etc/monitor-update/agent.image
EnvironmentFile=/etc/moshiro-update/agent.image
Restart=always
RestartSec=5
TimeoutStopSec=30
ExecStartPre=-/usr/bin/podman rm -f monitor-agent
ExecStart=/usr/bin/podman run --rm --name monitor-agent --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /:/host/root:ro -e HOST_PROC=/host/proc -e HOST_SYS=/host/sys -e HOST_ROOT=/host/root -v monitor-agent-config:/etc/monitor -v monitor-agent-status:/etc/monitor/update-status:ro ${IMAGE}
ExecStop=/usr/bin/podman stop -t 20 monitor-agent
ExecStartPre=-/usr/bin/podman rm -f moshiro-agent
ExecStart=/usr/bin/podman run --rm --name moshiro-agent --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /:/host/root:ro -e HOST_PROC=/host/proc -e HOST_SYS=/host/sys -e HOST_ROOT=/host/root -v moshiro-agent-config:/etc/moshiro -v moshiro-agent-status:/etc/moshiro/update-status:ro ${IMAGE}
ExecStop=/usr/bin/podman stop -t 20 moshiro-agent
[Install]
WantedBy=multi-user.target
@@ -1,16 +1,16 @@
[Unit]
Description=Monitor Agent (Docker container)
Description=MoShiro Agent (Docker container)
After=network-online.target
Wants=network-online.target
[Service]
EnvironmentFile=/etc/monitor-update/agent.image
EnvironmentFile=/etc/moshiro-update/agent.image
Restart=always
RestartSec=5
TimeoutStopSec=30
ExecStartPre=-/usr/bin/docker rm -f monitor-agent
ExecStart=/usr/bin/docker run --rm --name monitor-agent --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /:/host/root:ro -e HOST_PROC=/host/proc -e HOST_SYS=/host/sys -e HOST_ROOT=/host/root -v monitor-agent-config:/etc/monitor -v monitor-agent-status:/etc/monitor/update-status:ro ${IMAGE}
ExecStop=/usr/bin/docker stop -t 20 monitor-agent
ExecStartPre=-/usr/bin/docker rm -f moshiro-agent
ExecStart=/usr/bin/docker run --rm --name moshiro-agent --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /:/host/root:ro -e HOST_PROC=/host/proc -e HOST_SYS=/host/sys -e HOST_ROOT=/host/root -v moshiro-agent-config:/etc/moshiro -v moshiro-agent-status:/etc/moshiro/update-status:ro ${IMAGE}
ExecStop=/usr/bin/docker stop -t 20 moshiro-agent
[Install]
WantedBy=multi-user.target
@@ -1,16 +1,16 @@
[Unit]
Description=Monitor Agent (rootless Podman container)
Description=MoShiro Agent (rootless Podman container)
After=network-online.target
Wants=network-online.target
[Service]
EnvironmentFile=%h/.config/monitor/agent.image
EnvironmentFile=%h/.config/moshiro/agent.image
Restart=always
RestartSec=5
TimeoutStopSec=30
ExecStartPre=-/usr/bin/podman rm -f monitor-agent
ExecStart=/usr/bin/podman run --rm --name monitor-agent --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /:/host/root:ro -e HOST_PROC=/host/proc -e HOST_SYS=/host/sys -e HOST_ROOT=/host/root -v monitor-agent-config:/etc/monitor -v monitor-agent-status:/etc/monitor/update-status:ro ${IMAGE}
ExecStop=/usr/bin/podman stop -t 20 monitor-agent
ExecStartPre=-/usr/bin/podman rm -f moshiro-agent
ExecStart=/usr/bin/podman run --rm --name moshiro-agent --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /:/host/root:ro -e HOST_PROC=/host/proc -e HOST_SYS=/host/sys -e HOST_ROOT=/host/root -v moshiro-agent-config:/etc/moshiro -v moshiro-agent-status:/etc/moshiro/update-status:ro ${IMAGE}
ExecStop=/usr/bin/podman stop -t 20 moshiro-agent
[Install]
WantedBy=default.target
@@ -1,18 +1,18 @@
[Unit]
Description=Monitor agent (network line quality collector)
Description=MoShiro agent (network line quality collector)
After=network-online.target
Wants=network-online.target
[Service]
Type=exec
User=monitor
Group=monitor
ExecStart=/usr/lib/monitor/monitor-agent --config /etc/monitor/agent.json
User=moshiro
Group=moshiro
ExecStart=/usr/lib/moshiro/moshiro-agent --config /etc/moshiro/agent.json
Restart=always
RestartSec=5
# The agent is a pure collector: it reads its config and identity, never writes files, never starts processes.
ReadOnlyPaths=/etc/monitor
ReadOnlyPaths=/etc/moshiro
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
@@ -0,0 +1,16 @@
[Unit]
Description=MoShiro Probe (Podman container)
After=network-online.target
Wants=network-online.target
[Service]
EnvironmentFile=/etc/moshiro-update/probe.image
Restart=always
RestartSec=5
TimeoutStopSec=30
ExecStartPre=-/usr/bin/podman rm -f moshiro-probe
ExecStart=/usr/bin/podman run --rm --name moshiro-probe --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v moshiro-probe-config:/etc/moshiro -v moshiro-probe-status:/etc/moshiro/update-status:ro ${IMAGE}
ExecStop=/usr/bin/podman stop -t 20 moshiro-probe
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,16 @@
[Unit]
Description=MoShiro Probe (Docker container)
After=network-online.target
Wants=network-online.target
[Service]
EnvironmentFile=/etc/moshiro-update/probe.image
Restart=always
RestartSec=5
TimeoutStopSec=30
ExecStartPre=-/usr/bin/docker rm -f moshiro-probe
ExecStart=/usr/bin/docker run --rm --name moshiro-probe --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v moshiro-probe-config:/etc/moshiro -v moshiro-probe-status:/etc/moshiro/update-status:ro ${IMAGE}
ExecStop=/usr/bin/docker stop -t 20 moshiro-probe
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,16 @@
[Unit]
Description=MoShiro Probe (rootless Podman container)
After=network-online.target
Wants=network-online.target
[Service]
EnvironmentFile=%h/.config/moshiro/probe.image
Restart=always
RestartSec=5
TimeoutStopSec=30
ExecStartPre=-/usr/bin/podman rm -f moshiro-probe
ExecStart=/usr/bin/podman run --rm --name moshiro-probe --network host --read-only --security-opt no-new-privileges --security-opt label=disable --cap-drop all --tmpfs /tmp:rw,noexec,nosuid,size=64m,mode=1777 -v /etc/os-release:/etc/os-release:ro -v moshiro-probe-config:/etc/moshiro -v moshiro-probe-status:/etc/moshiro/update-status:ro ${IMAGE}
ExecStop=/usr/bin/podman stop -t 20 moshiro-probe
[Install]
WantedBy=default.target
@@ -1,19 +1,19 @@
[Unit]
Description=Monitor probe (network line quality measurement origin)
Description=MoShiro probe (network line quality measurement origin)
After=network-online.target
Wants=network-online.target
[Service]
Type=exec
User=monitor
Group=monitor
ExecStart=/usr/lib/monitor/monitor-probe --config /etc/monitor/probe.json
User=moshiro
Group=moshiro
ExecStart=/usr/lib/moshiro/moshiro-probe --config /etc/moshiro/probe.json
Restart=always
RestartSec=5
# The probe is a pure collector: it never starts processes and writes no measurement data.
# The only file the probe writes is agents.json (the latest agent list) next to probe.json.
ReadWritePaths=/etc/monitor
ReadWritePaths=/etc/moshiro
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes