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.
This commit is contained in:
Achmad
2026-06-24 05:31:51 +00:00
parent 92354252e5
commit 0569cede43
+10 -1
View File
@@ -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" 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 ## 5. Push the systemd unit files
From your laptop. `scp` will prompt for the password. 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) ### 8b. 186 (control plane FIRST, then gateway agent)
```bash ```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 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 daemon-reload
sudo systemctl enable sdp-control-plane.service sudo systemctl enable sdp-control-plane.service
sudo systemctl restart sdp-control-plane.service sudo systemctl restart sdp-control-plane.service