docs(snapshot): sync workspace documentation

This commit is contained in:
u1
2026-03-29 13:14:30 +02:00
parent 93a6e4aa2f
commit 0d3d110026
37 changed files with 8500 additions and 123 deletions

71
rpc/baremetal-iac.md Normal file
View File

@@ -0,0 +1,71 @@
# Bare metal (mevnode) jako IaC: runner na VPS
Cel: utrzymywać `mevnode-baremetal` (Solana RPC box) jako **IaC w Git**, wdrażane z VPS.
Dlaczego z VPS:
- masz stały “runner” (k3s box), który i tak żyje 24/7,
- łatwiej ograniczyć dostęp do bare metalu (WireGuard + allowlist),
- nie mieszasz kluczy i narzędzi na laptopie.
## Założenia
- Na VPS masz alias SSH `mevnode-baremetal` (w `~/.ssh/config`).
- Na bare metalu w `root/.ssh/authorized_keys` jest publiczny klucz z VPS.
- Repo `trade` jest dostępne na VPS (clone).
## Katalog IaC w repo
W tym repo jest starter Ansible:
- `infra/baremetal-solana-rpc/` — Agave (systemd) + opcjonalny Geyser + monitoring.
Sekrety (identity keypair, tokeny) **nie są w repo**.
## Setup na VPS (runner)
1) Zainstaluj Ansible (Ubuntu/Debian na VPS):
```bash
sudo apt-get update
sudo apt-get install -y ansible
```
2) Clone repo (jeśli nie masz):
```bash
git clone <YOUR_REPO_URL> trade
cd trade
```
3) Uzupełnij inventory/vars (lokalne, nie commitujemy):
```bash
cd infra/baremetal-solana-rpc/ansible
cp inventory/hosts.ini.example inventory/hosts.ini
cp group_vars/solana_rpc.yml.example group_vars/solana_rpc.yml
```
4) Dostosuj `group_vars/solana_rpc.yml` pod Wasz WireGuard IP, ścieżki danych i opcje Geyser.
5) Wdroż:
```bash
ansible-playbook -i inventory/hosts.ini playbook.yml
```
## Co to już robi (MVP)
- instaluje pakiety bazowe + `chrony`,
- przygotowuje usera `solana` + katalogi danych/logów,
- wrzuca systemd unit `solana-rpc` (Agave),
- (opcjonalnie) wrzuca config Yellowstone i podpina plugin,
- instaluje monitoring (node_exporter + probe RPC) opisany w `doc/rpc/baremetal-monitoring.md`.
## Co dalej (kolejne warstwy)
- WireGuard + firewall (żeby RPC/WS/gRPC nie wisiały publicznie),
- ograniczenie `RPC/WS` bind do WG IP,
- rotacja logów / limity journald,
- backup identity keypair + runbook odtwarzania.