20260713 unify installer scripts and RTR registration

This commit is contained in:
2026-07-13 12:46:40 +08:00
parent b66b425512
commit 9f4f4cf069
20 changed files with 346 additions and 100 deletions

View File

@@ -3,7 +3,7 @@
## Install
```bash
./install.sh
./scripts/install.sh
```
The installer is idempotent:
@@ -17,13 +17,13 @@ The installer is idempotent:
## Start
```bash
./start.sh
./scripts/start.sh
```
Start without waiting for the first snapshot:
```bash
./start.sh --no-wait-first-run
./scripts/start.sh --no-wait-first-run
```
If you intentionally want to run this package on a different host architecture through QEMU/binfmt, first set:
@@ -32,20 +32,20 @@ If you intentionally want to run this package on a different host architecture t
ALLOW_CROSS_ARCH=1
```
Then rerun `./install.sh` or `./self-check.sh`, and only then will the scripts attempt to enable the matching binfmt handler.
Then rerun `./scripts/install.sh` or `./scripts/self-check.sh`, and only then will the scripts attempt to enable the matching binfmt handler.
## Stop and Restart
```bash
./stop.sh
./restart.sh
./scripts/stop.sh
./scripts/restart.sh
```
## Status Checks
```bash
./status.sh
./self-check.sh
./scripts/status.sh
./scripts/self-check.sh
```
Important checks:
@@ -73,15 +73,20 @@ Important checks:
To verify RTR report ingestion:
```bash
./scripts/register_rtr_monitor.sh --report-dir /root/rpki/report --dry-run
./scripts/register_rtr_monitor.sh --report-dir /root/rpki/report
./scripts/status.sh
curl -s "http://127.0.0.1:${METRICS_PORT:-9556}/metrics" | grep '^ours_rp_rtr_' | head
```
Registration accepts only an absolute directory on the same host. The command retains a timestamped `.env` backup and updates only the metrics, Prometheus, and Grafana sidecars; the `ours-rp-soak` container ID must remain unchanged.
## Upgrade
Extract the new package into a new directory and explicitly reuse the existing `.env` through the upgrade script:
```bash
./upgrade.sh --reuse-env-from /path/to/old-installer/.env
./scripts/upgrade.sh --reuse-env-from /path/to/old-installer/.env
```
If the new package directory already has a `.env`, the upgrade script keeps it.
@@ -125,8 +130,8 @@ PERIODIC_SNAPSHOT_MAX_DELTAS=100
## Cleanup
```bash
./cleanup.sh --keep-runs 100
./cleanup.sh --keep-runs 100 --execute
./scripts/cleanup.sh --keep-runs 100
./scripts/cleanup.sh --keep-runs 100 --execute
```
Cleanup is dry-run by default. Add `--execute` after reviewing the output.