You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLI tool for syncing RIPE NCC route objects and RPKI ROAs from a YAML config file.
4
+
5
+
## Requirements
6
+
7
+
- Python 3.14+
8
+
-[uv](https://docs.astral.sh/uv/)
9
+
-[1Password CLI](https://developer.1password.com/docs/cli/) (`op`) for credential access
10
+
11
+
## Installation
12
+
13
+
```bash
14
+
uv sync
15
+
```
16
+
17
+
## Configuration
18
+
19
+
Copy `config.example.yaml` and fill in your values:
20
+
21
+
```yaml
22
+
ripe:
23
+
maintainer: "MAINT-AS12345"
24
+
sso_emails:
25
+
- "admin@example.com"
26
+
routes:
27
+
- prefix: "192.0.2.0/24"
28
+
origin: "AS12345"
29
+
description: "Example IPv4 prefix"
30
+
- prefix: "2001:db8::/32"
31
+
origin: "AS12345"
32
+
roas:
33
+
- prefix: "192.0.2.0/24"
34
+
origin: "AS12345"
35
+
max_length: 24
36
+
- prefix: "2001:db8::/32"
37
+
origin: "AS12345"
38
+
```
39
+
40
+
`roas` is optional. If omitted, only route objects are synced. ROA sync only manages prefixes explicitly listed — other ROAs in the account are left untouched.
41
+
42
+
## Credentials
43
+
44
+
The following secrets are read from 1Password via the `op` CLI:
45
+
46
+
| Secret | Used for |
47
+
|--------|----------|
48
+
| `op://Code/Mozilla - RIPE NNC/username` | RIPE DB REST API (Basic auth) |
49
+
| `op://Code/Mozilla - RIPE NNC/credential` | RIPE DB REST API (Basic auth) |
50
+
| `op://Code/Mozilla - RIPE NNC/RPKI API Key` | RIPE RPKI Management API |
51
+
52
+
## Usage
53
+
54
+
```bash
55
+
# Dry-run against the RIPE test database (default)
56
+
uv run rir-updater config.yaml
57
+
58
+
# Dry-run against production
59
+
uv run rir-updater config.yaml --production
60
+
61
+
# Apply changes to production
62
+
uv run rir-updater config.yaml --production --commit
63
+
64
+
# Set up the RIPE test database with objects replicated from production
65
+
uv run rir-updater config.yaml --setup-test
66
+
```
67
+
68
+
### Test database bootstrap
69
+
70
+
The first time you use `--setup-test`, the mntner must be created manually via the RIPE web UI at [apps-test.db.ripe.net](https://apps-test.db.ripe.net) — the API does not allow creating the first mntner programmatically due to a circular person↔mntner dependency. The tool will print instructions if the mntner is not found.
0 commit comments