From 0569cede433d9fdd7b28fb349e37d354c8a77e1b Mon Sep 17 00:00:00 2001 From: Achmad Date: Wed, 24 Jun 2026 05:31:51 +0000 Subject: [PATCH] DEPLOY.md: pre-create ~/SDP/data on 186; create it in step 6a too The control plane binary will create the data dir on first start, but doing it before systemd starts the service means the ReadWritePaths scope has somewhere to point at, and faster diagnosis if anything else is wrong. --- DEPLOY.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/DEPLOY.md b/DEPLOY.md index 6faf2b7..994b0af 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -94,6 +94,14 @@ ssh administrator@172.18.136.92 "chmod +x ~/SDP/bin/agent-micro" ssh administrator@172.18.139.186 "chmod +x ~/SDP/bin/control-plane ~/SDP/bin/agent-gateway" ``` +**Pre-create the control plane's data dir on 186** (SQLite + log files live here): + +```bash +ssh administrator@172.18.139.186 "mkdir -p ~/SDP/data && ls -ld ~/SDP/data" +``` + +Should print `drwxr-xr-x ... administrator administrator ... /home/administrator/SDP/data`. The control plane binary creates it on first run too, but doing it now means the systemd unit's `ReadWritePaths` check has somewhere to point at. + ## 5. Push the systemd unit files From your laptop. `scp` will prompt for the password. @@ -123,8 +131,9 @@ Status should be `active (running)`. Journal should show a clean startup, then e ### 8b. 186 (control plane FIRST, then gateway agent) ```bash -ssh administrator@172.18.139.186 sudo install -m 644 -o root -g root /tmp/sdp-control-plane.service /etc/systemd/system/sdp-control-plane.service +sudo mkdir -p /home/administrator/SDP/data +sudo chown administrator:administrator /home/administrator/SDP/data sudo systemctl daemon-reload sudo systemctl enable sdp-control-plane.service sudo systemctl restart sdp-control-plane.service