wobcom / fernglas

BMP based looking glass
European Union Public License 1.2
24 stars 3 forks source link

Documentation on how to add communities #19

Open funzoneq opened 5 months ago

funzoneq commented 5 months ago

Hi,

In your DENOG presentation and on the demo, you use nice names for BGP communities. I can't find anywhere in the documentation on how to accomplish this. Can you share some details on how configure this?

Thanks!

vista- commented 5 months ago

By default, the NLNOG RING communities (https://github.com/NLNOG/lg.ring.nlnog.net/tree/main/communities) get automatically embedded in the released binaries like so: https://github.com/wobcom/fernglas/blob/main/src/api.rs#L27

During build time, the directory containing the NLNOG RING community files get fed into a Python script (https://github.com/wobcom/fernglas/blob/main/contrib/print_communities.py), which outputs the communities.json in the dictionary format that Fernglas expects.

The configuration option communities_file under the api configuration can be used to override this behaviour, and you can point Fernglas to your own communities.json instead.