The stack side is portable; the router side had no reference material -- a
new operator standing up OBMP has no guide for what to configure on their
devices to feed it. Adds two artifacts, both vendor-neutral in intent,
IOS-XR-specific in syntax:
docs/router-integration.md
Multi-path tour of the four ingest paths (BMP, BGP-LS, gNMI,
NETCONF) with a bring-up checklist and cross-references. The BMP
section is deliberately thin -- it hands off to docs/router-bmp-config.md
for the address-selection, port-choice, and RR-scope activation
detail already covered there.
router-blueprints/iosxr/*.cfg
Copy-paste config fragments, one per ingest path plus a
role-route-reflector overlay. All values are <PLACEHOLDER>
substitutions -- no hardcoded IPs, no lab-gear names. Fragments
align to the ROUTER_FACING_IP / ROUTER_FACING_PORT convention
introduced in docs/router-bmp-config.md.
router-blueprints/README.md
Substitution legend + layout, cross-links to PORTABILITY-FINDINGS.md
finding 4 (why routers can't target HOST_IP on WSL).
Also appends the multi-path guide link to the Greenfield deploy section
in README.md so router-side integration is discoverable from the top.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
116 lines
4.2 KiB
Markdown
116 lines
4.2 KiB
Markdown
# OpenBMP docker files
|
|
Docker files for OpenBMP.
|
|
|
|
## (Prerequisite) Platform Docker Install
|
|
|
|
> Ignore this step if you already have a current docker install
|
|
|
|
> **NOTE**
|
|
> You should use the latest docker version, documented in this section.
|
|
|
|
Follow the instructions on https://docs.docker.com/get-docker/
|
|
|
|
### Optionally add a non-root user to run docker as
|
|
usermod -aG docker ubuntu
|
|
|
|
# Logout and log back so the group takes affect.
|
|
|
|
|
|
### Optionally configure **/etc/default/docker** (e.g. for proxy config)
|
|
|
|
export http_proxy="http://proxy:80/"
|
|
export https_proxy="http://proxy:80/"
|
|
export no_proxy="127.0.0.1,openbmp.org,/var/run/docker.sock"
|
|
|
|
Make sure you can run '**docker run hello-world**' successfully.
|
|
|
|
|
|
## OpenBMP Docker Files
|
|
Each docker file contains a readme file, see below:
|
|
|
|
* [Collector](collector/README.md)
|
|
* [PostgreSQL](postgres/README.md)
|
|
* [PSQL Consumer](psql-app/README.md)
|
|
|
|
|
|
## Greenfield deploy (recommended): deploy.sh
|
|
|
|
Deploying onto a new host? Use `deploy.sh` — it reconciles the host-specific
|
|
`.env` values (HOST_IP, router-facing IP/port, auth mode) *before* running
|
|
setup.sh, guards against the known portability traps
|
|
([docs/PORTABILITY-FINDINGS.md](docs/PORTABILITY-FINDINGS.md)), and brings the
|
|
stack up in stages:
|
|
|
|
```
|
|
git clone <repo-url> && cd obmp-docker
|
|
git checkout <branch> # pin the deploy: note the branch AND commit
|
|
git log -1 --oneline # record what you deployed
|
|
./deploy.sh # interactive; or --wsl/--prod --scope ... --yes
|
|
```
|
|
|
|
A greenfield deploy is only reproducible if the checkout is pinned — "clone
|
|
and run" silently depends on whatever branch was checked out. Record the
|
|
branch + commit with the deployment.
|
|
|
|
Deployment types (`--scope full-stack|remote|central-store`) are described in
|
|
[docs/DEPLOYMENT-TYPES.md](docs/DEPLOYMENT-TYPES.md). Router-side BMP config:
|
|
[docs/router-bmp-config.md](docs/router-bmp-config.md); multi-path integration
|
|
(BGP-LS, gNMI, NETCONF, RR overlay): [docs/router-integration.md](docs/router-integration.md),
|
|
with copy-paste IOS-XR fragments under [router-blueprints/iosxr/](router-blueprints/iosxr/).
|
|
|
|
## Using Docker Compose to run everything
|
|
|
|
> **Quick start:** copy `.env.example` to `.env`, fill it in, and
|
|
> run `./setup.sh` — it creates the data directories, syncs Grafana
|
|
> provisioning, and generates Authelia secrets. Then:
|
|
> ```
|
|
> docker compose up -d # BMP collector core
|
|
> docker compose --profile test --profile auth up -d # full stack
|
|
> ```
|
|
> See [docs/DOCS.md](docs/DOCS.md) section 4 for details and the manual alternative below.
|
|
|
|
### Install Docker Compose
|
|
You will need docker-compose. You can install that via [Docker Compose](https://docs.docker.com/compose/install/)
|
|
instructions. Docker compose will run everything, including handling restarts of containers.
|
|
|
|
#### (1) Mount/Make persistent directories
|
|
Create expected directories. You can choose to mount these as well or update the compose file to change them.
|
|
|
|
> **NOTE**
|
|
> If you are using OSX/Mac, then you will need to update your docker preferences to allow ```/var/openbmp```
|
|
|
|
Make sure to create the **OBMP_DATA_ROOT** directory first.
|
|
```
|
|
export OBMP_DATA_ROOT=/var/openbmp
|
|
sudo mkdir -p $OBMP_DATA_ROOT
|
|
```
|
|
|
|
Create sub directories
|
|
```
|
|
mkdir -p ${OBMP_DATA_ROOT}/config
|
|
mkdir -p ${OBMP_DATA_ROOT}/kafka-data
|
|
mkdir -p ${OBMP_DATA_ROOT}/zk-data
|
|
mkdir -p ${OBMP_DATA_ROOT}/zk-log
|
|
mkdir -p ${OBMP_DATA_ROOT}/postgres/data
|
|
mkdir -p ${OBMP_DATA_ROOT}/postgres/ts
|
|
mkdir -p ${OBMP_DATA_ROOT}/grafana
|
|
mkdir -p ${OBMP_DATA_ROOT}/grafana/dashboards
|
|
|
|
sudo chmod -R 7777 $OBMP_DATA_ROOT
|
|
```
|
|
|
|
> **WARNING:** on a host with an *existing* Postgres data tree, a recursive
|
|
> chmod makes `psql_server.key` group/world-accessible and Postgres will
|
|
> refuse to start. Skip `postgres/` (setup.sh does this for you — see
|
|
> [docs/PORTABILITY-FINDINGS.md](docs/PORTABILITY-FINDINGS.md) finding 10).
|
|
|
|
> In order to init the DB tables, you must create the file ```${OBMP_DATA_ROOT}/config/init_db```. This should
|
|
> only be done once or whenever you want to completely wipe out the DB and start over.
|
|
|
|
Change ```OBMP_DATA_ROOT=<path>``` to where you created the directories above. The default is ```/var/openbmp```
|
|
|
|
```
|
|
OBMP_DATA_ROOT=/var/openbmp docker-compose -p obmp up -d
|
|
```
|
|
|