rpki/deploy/bird/README.md
2026-05-08 09:54:00 +08:00

2.4 KiB

BIRD Minimal RTR Client Config

This folder provides a minimal BIRD setup for black-box interop testing against this repository's RTR server defaults.

Server defaults in this repo:

  • TCP: 0.0.0.0:323
  • SSH: 0.0.0.0:22 (when enabled on server)

Files

  • Dockerfile: builds a minimal BIRD2 runtime image.
  • bird.conf.example: sample /etc/bird/bird.conf.
  • bird.conf.ssh.example: sample SSH transport /etc/bird/bird.conf.
  • entrypoint.sh: starts BIRD in foreground mode.
  • docker-compose.yml: one-click local TCP test client.
  • docker-compose.ssh.yml: compose override for SSH transport.

By default, the container uses event-driven observation and prints snapshots only when BIRD reports RPKI-related changes.

Docker quick start

From repository root:

docker compose -f deploy/bird/docker-compose.yml up --build

Use another terminal to inspect:

docker logs -f bird-rpki-client

If protocol state is up, the RTR client path is working.

Detached mode:

docker compose -f deploy/bird/docker-compose.yml up -d --build
docker logs -f bird-rpki-client

Stop:

docker compose -f deploy/bird/docker-compose.yml down

SSH quick start

Start server in SSH mode first:

docker compose -f deploy/server/docker-compose.ssh.yml up -d --build

Start BIRD client with SSH override:

docker compose \
  -f deploy/bird/docker-compose.yml \
  -f deploy/bird/docker-compose.ssh.yml \
  up --build

In detached mode, observe with:

docker logs -f bird-rpki-client

Notes

  • This setup renders bird.conf.template at startup and uses RPKI_HOST / RPKI_PORT for the RTR endpoint.
  • network_mode: host expects your RTR server to be reachable at host.docker.internal:323 from the container.
  • Observation is controlled by env vars: OBSERVE_MODE (event by default, interval as fallback), OBSERVE_DEBOUNCE_SECS (default 1), OBSERVE_INTERVAL (seconds, used when OBSERVE_MODE=interval), and OBSERVE_PROTO.
  • SSH mode mounts ../../certs into /config/ssh and expects: bird-rtr-client.pem and ssh_host_rsa_key.pub.
  • Entrypoint auto-generates /run/bird/known_hosts from /config/ssh/ssh_host_rsa_key.pub for BIRD SSH host-key verification.
  • If your environment does not support Docker host networking, switch to a bridge network and replace remote addresses accordingly.