Переписан BGP сервер на FRR
This commit is contained in:
+15
-7
@@ -1,21 +1,27 @@
|
||||
FROM python:3.9-slim
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Установка системных зависимостей
|
||||
# Установка системных зависимостей и FRR
|
||||
RUN apt-get update && apt-get install -y \
|
||||
frr \
|
||||
frr-pythontools \
|
||||
python3 \
|
||||
python3-pip \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
net-tools \
|
||||
procps \
|
||||
vim \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Установка ExaBGP
|
||||
RUN pip install exabgp
|
||||
# Установка Python зависимостей
|
||||
RUN pip3 install watchdog
|
||||
|
||||
# Создание структуры директорий
|
||||
RUN mkdir -p /app/scripts /app/data /app/logs /run/exabgp /var/run/exabgp /usr/local/run/exabgp /usr/local/var/run/exabgp
|
||||
RUN mkdir -p /app/scripts /app/data /app/logs /etc/frr
|
||||
|
||||
# Копирование файлов
|
||||
COPY exabgp.conf /app/exabgp.conf
|
||||
COPY frr.conf /etc/frr/frr.conf
|
||||
COPY scripts/ /app/scripts/
|
||||
COPY data/ /app/data/
|
||||
|
||||
@@ -23,6 +29,7 @@ COPY data/ /app/data/
|
||||
RUN chmod +x /app/scripts/start.sh
|
||||
RUN chmod +x /app/scripts/load_prefixes.py
|
||||
RUN chmod +x /app/scripts/generate_config.py
|
||||
RUN chmod +x /app/scripts/monitor.py
|
||||
|
||||
# Рабочая директория
|
||||
WORKDIR /app
|
||||
@@ -37,7 +44,8 @@ ENV BGP_NEIGHBOR_IP=192.168.1.1
|
||||
ENV BGP_NEIGHBOR_AS=65001
|
||||
ENV BGP_HOLD_TIME=90
|
||||
ENV BGP_KEEPALIVE=30
|
||||
ENV BGP_LOG_LEVEL=INFO
|
||||
ENV BGP_LOG_LEVEL=info
|
||||
ENV FRR_DAEMONS="bgpd zebra"
|
||||
|
||||
# Команда запуска
|
||||
ENTRYPOINT ["/app/scripts/start.sh"]
|
||||
Reference in New Issue
Block a user