sam 2634aada24 Parameterize HOST_IP everywhere -- portable to another lab host
Removes hardcoded 10.40.40.202 references so a fresh clone + .env-only
edit can stand the stack up on a new compute node.

  * docker-compose.yml: rib-poller PG_DSN now uses ${HOST_IP:-...}.
  * obmp-rib-poller/poller.py: default PG_DSN host falls back to
    ${HOST_IP} env (compose passes it; manual runs honour $HOST_IP too).
  * cml/gobgp_peering_config.py: GOBGP_IP read from $HOST_IP or the
    HOST_IP= line in repo-root .env, with a small _env_default helper.
  * cml/proxmox_bmp_config.py: COLLECTOR_HOST resolved the same way.

For gobgp/gobgpd.conf and gobgp-evpn/gobgpd.conf -- jauderho/gobgp is
distroless (no shell), so we can't sed-substitute at container start.
Pattern instead:

  * gobgpd.conf is now gobgpd.conf.tmpl with __HOST_IP__ placeholders
    (committed). The rendered gobgpd.conf is gitignored.
  * setup.sh renders the .tmpl(s) to .conf using $HOST_IP from .env.
  * compose `command` stays the simple `gobgpd -f /config/gobgpd.conf`.

After cloning on a new host:  cp .env.example .env  -> edit HOST_IP ->
./setup.sh -> docker compose up -d. Verified locally by force-recreating
gobgp; all 6 sessions (4 cores + 2 Bromirski) re-established in <60s.

Known portability gaps still to address (separate work):
  * Hardcoded lab-router inventories in cml/*.py and
    obmp-rib-poller/poller.py.
  * The /etc/cron.d/openbmp */5 -> */15 edit inside obmp-psql-app is
    not persistent (regenerated by config_cron on every container start).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 18:34:51 -07:00
..

gobgp-evpn — modular EVPN test-route injector

A profile-gated, non-production GoBGP instance for exercising the EVPN ingestion pipeline (roadmap E5). The CML IOS-XR lab cannot originate EVPN routes, so this container synthesises them.

What it does

gobgp-evpn runs GoBGP with no BGP peers, BMP-exporting its local RIB (route-monitoring-policy = local-rib) to the OpenBMP collector. Routes injected with inject-evpn.sh are parsed by the collector and published to the openbmp.parsed.evpn Kafka topic, where the EVPN consumer picks them up and writes the evpn_rib table.

Usage

# start the injector (not started by a normal `docker compose up`)
docker compose --profile evpn-test up -d gobgp-evpn

# push synthetic type-2 / type-3 / type-5 EVPN routes
bash gobgp-evpn/inject-evpn.sh

# inspect what GoBGP holds
docker exec obmp-gobgp-evpn gobgp global rib -a evpn

# stop it when done testing
docker compose --profile evpn-test stop gobgp-evpn

Notes

  • Local AS 65010, router-id 10.40.40.251 — distinct from the production gobgp global-table feed (AS 65001).
  • It is not part of the default stack: the evpn-test Compose profile keeps it out of production and lets it be started/stopped on demand.

Collector type-5 limitation

The OpenBMP collector 2.2.3 parses EVPN type-2 (MAC/IP) and type-3 (inclusive multicast) cleanly, but mis-decodes type-5 (IP-prefix): the IP prefix bleeds into the RD field on the openbmp.parsed.evpn topic (observed garbage RDs such as 6154:3523870730). inject-evpn.sh therefore injects only type-2 and type-3. Full type-5 support needs a newer collector or the GoBMP path — see docs/ROADMAP.md Track E (E5).