feat: enhance evobgp with new command-line tools for bundle management, including pull, verify, and apply functionalities. Update go.mod to include necessary dependencies and complete todos in architecture plan for improved observability and deployment practices.
CI / changes (push) Successful in 4s
CI / go (push) Failing after 6s
CI / bird2 (push) Has been skipped
CI / openapi (push) Has been skipped

This commit is contained in:
Denozordec
2026-04-05 14:07:45 +07:00
parent 272542b92a
commit bf52b21150
131 changed files with 9222 additions and 17 deletions
+9
View File
@@ -0,0 +1,9 @@
# BIRD 2 alongside evobgp-agent; share /etc/bird with the agent container (plan §4.1).
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends bird2 \
&& rm -rf /var/lib/apt/lists/*
COPY deploy/bird/bird.conf /etc/bird/bird.conf
RUN mkdir -p /etc/bird/bird.d
EXPOSE 179
# Foreground for Docker; configs on shared volume override this file at runtime.
CMD ["bird", "-f", "-c", "/etc/bird/bird.conf"]
+13
View File
@@ -0,0 +1,13 @@
# evobgp-agent CLI (parse-check, birdc configure); install bird2 so `bird -p` matches bird2 image (plan §13).
FROM golang:1.22-bookworm AS build
WORKDIR /src
COPY go.mod go.sum ./
COPY . .
RUN go build -trimpath -ldflags="-s -w" -o /out/evobgp-agent ./cmd/evobgp-agent
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends bird2 ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /out/evobgp-agent /usr/local/bin/evobgp-agent
WORKDIR /etc/bird
ENTRYPOINT ["/usr/local/bin/evobgp-agent"]
+11
View File
@@ -0,0 +1,11 @@
# Статическая панель EvoBGP (SvelteKit) + nginx как reverse-proxy к evobgp-api (/v1, /metrics).
FROM node:22-alpine AS build
WORKDIR /web
COPY web/package.json web/package-lock.json ./
RUN npm ci
COPY web/ ./
RUN npm run build
FROM nginx:1.27-alpine
COPY deploy/docker/evobgp-web/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /web/build /usr/share/nginx/html
+26
View File
@@ -0,0 +1,26 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
location /v1/ {
proxy_pass http://evobgp-api:8080/v1/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /metrics {
proxy_pass http://evobgp-api:8080/metrics;
proxy_http_version 1.1;
proxy_set_header Host $host;
}
location / {
try_files $uri $uri/ /index.html;
}
}
+18
View File
@@ -0,0 +1,18 @@
# Универсальная сборка бинаря из cmd/* (ARG BIN=evobgp-api | evobgp-all).
# INSTALL_BIRDC=1 ставит bird2 в рантайм-образ для EVOBGP_BIRDC_SOCKET (poll метрик birdc).
FROM golang:1.22-bookworm AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG BIN=evobgp-api
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/evobgp ./cmd/${BIN}
FROM debian:bookworm-slim
ARG INSTALL_BIRDC=0
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
&& if [ "$INSTALL_BIRDC" = "1" ]; then apt-get install -y --no-install-recommends bird2; fi \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /out/evobgp /usr/local/bin/evobgp
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/evobgp"]