diff --git a/dockers/docker-fpm-gobgp/Dockerfile.j2 b/dockers/docker-fpm-gobgp/Dockerfile.j2 deleted file mode 100644 index 65b104e43b26..000000000000 --- a/dockers/docker-fpm-gobgp/Dockerfile.j2 +++ /dev/null @@ -1,30 +0,0 @@ -FROM docker-fpm-quagga - -## Make apt-get non-interactive -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt-get update - -COPY \ -{% for deb in docker_fpm_gobgp_debs.split(' ') -%} -debs/{{ deb }}{{' '}} -{%- endfor -%} -debs/ - -RUN dpkg -i \ -{% for deb in docker_fpm_gobgp_debs.split(' ') -%} -debs/{{ deb }}{{' '}} -{%- endfor %} - -## Clean up -RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y -RUN rm -rf /debs - -COPY ["start.sh", "/usr/bin/"] -COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] -COPY ["*.j2", "/usr/share/sonic/templates/"] -COPY ["daemons", "/etc/quagga/"] -COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] -COPY ["critical_processes", "/etc/supervisor"] - -ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-fpm-gobgp/critical_processes b/dockers/docker-fpm-gobgp/critical_processes deleted file mode 100644 index 789f4685244a..000000000000 --- a/dockers/docker-fpm-gobgp/critical_processes +++ /dev/null @@ -1,2 +0,0 @@ -program:gobgpd -program:fpmsyncd diff --git a/dockers/docker-fpm-gobgp/daemons b/dockers/docker-fpm-gobgp/daemons deleted file mode 100644 index 6832c3db78d0..000000000000 --- a/dockers/docker-fpm-gobgp/daemons +++ /dev/null @@ -1,31 +0,0 @@ -# This file tells the quagga package which daemons to start. -# -# Entries are in the format: =(yes|no|priority) -# 0, "no" = disabled -# 1, "yes" = highest priority -# 2 .. 10 = lower priorities -# Read /usr/share/doc/quagga/README.Debian for details. -# -# Sample configurations for these daemons can be found in -# /usr/share/doc/quagga/examples/. -# -# ATTENTION: -# -# When activation a daemon at the first time, a config file, even if it is -# empty, has to be present *and* be owned by the user and group "quagga", else -# the daemon will not be started by /etc/init.d/quagga. The permissions should -# be u=rw,g=r,o=. -# When using "vtysh" such a config file is also needed. It should be owned by -# group "quaggavty" and set to ug=rw,o= though. Check /etc/pam.d/quagga, too. -# -# The watchquagga daemon is always started. Per default in monitoring-only but -# that can be changed via /etc/quagga/debian.conf. -# -zebra=yes -bgpd=no -ospfd=no -ospf6d=no -ripd=no -ripngd=no -isisd=no -babeld=no diff --git a/dockers/docker-fpm-gobgp/gobgpd.conf.j2 b/dockers/docker-fpm-gobgp/gobgpd.conf.j2 deleted file mode 100644 index a4fb80bf11ca..000000000000 --- a/dockers/docker-fpm-gobgp/gobgpd.conf.j2 +++ /dev/null @@ -1,28 +0,0 @@ -[global.config] - as = {{ DEVICE_METADATA['localhost']['bgp_asn'] }} - router-id = "{{ LOOPBACK_INTERFACE.keys()[0][1] }}" -{% for neighbor_addr, bgp_session in BGP_NEIGHBOR.iteritems() %} -{% if bgp_session['asn'] | int != 0 %} -[[neighbors]] - [neighbors.config] - peer-as = {{ bgp_session['asn'] }} - neighbor-address = "{{ neighbor_addr }}" - [neighbors.graceful-restart.config] - enabled = true - [[neighbors.afi-safis]] - [neighbors.afi-safis.config] -{% if neighbor_addr | ipv6 %} - afi-safi-name = "ipv6-unicast" -{% else %} - afi-safi-name = "ipv4-unicast" -{% endif %} - [neighbors.afi-safis.mp-graceful-restart.config] - enabled = true -{% endif %} -{% endfor %} -[zebra] - [zebra.config] - enabled = true - url = "unix:/var/run/quagga/zserv.api" - redistribute-route-type-list = ["connect"] - diff --git a/dockers/docker-fpm-gobgp/isolate.j2 b/dockers/docker-fpm-gobgp/isolate.j2 deleted file mode 100755 index 4502ff895777..000000000000 --- a/dockers/docker-fpm-gobgp/isolate.j2 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo Not implemented yet -exit diff --git a/dockers/docker-fpm-gobgp/start.sh b/dockers/docker-fpm-gobgp/start.sh deleted file mode 100755 index cdb0c6301686..000000000000 --- a/dockers/docker-fpm-gobgp/start.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -mkdir -p /etc/quagga - -CFGGEN_PARAMS=" \ - -d \ - -t /usr/share/sonic/templates/gobgpd.conf.j2,/etc/gobgp/gobgpd.conf \ - -t /usr/share/sonic/templates/zebra.conf.j2,/etc/quagga/zebra.conf \ - -t /usr/share/sonic/templates/isolate.j2,/usr/sbin/bgp-isolate \ - -t /usr/share/sonic/templates/unisolate.j2,/usr/sbin/bgp-unisolate \ -" -sonic-cfggen $CFGGEN_PARAMS - -chown root:root /usr/sbin/bgp-isolate -chmod 0755 /usr/sbin/bgp-isolate - -chown root:root /usr/sbin/bgp-unisolate -chmod 0755 /usr/sbin/bgp-unisolate - -mkdir -p /var/sonic -echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status - -rm -f /var/run/rsyslogd.pid - -supervisorctl start rsyslogd - -# Quagga has its own monitor process, 'watchquagga' -service quagga start - -supervisorctl start fpmsyncd diff --git a/dockers/docker-fpm-gobgp/supervisord.conf b/dockers/docker-fpm-gobgp/supervisord.conf deleted file mode 100644 index 625f867950df..000000000000 --- a/dockers/docker-fpm-gobgp/supervisord.conf +++ /dev/null @@ -1,43 +0,0 @@ -[supervisord] -logfile_maxbytes=1MB -logfile_backups=2 -nodaemon=true - -[eventlistener:supervisor-proc-exit-listener] -command=/usr/bin/supervisor-proc-exit-listener --container-name bgp -events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING -autostart=true -autorestart=unexpected -buffer_size=1024 - -[program:start.sh] -command=/usr/bin/start.sh -priority=1 -autostart=true -autorestart=false -stdout_logfile=syslog -stderr_logfile=syslog - -[program:rsyslogd] -command=/usr/sbin/rsyslogd -n -priority=2 -autostart=false -autorestart=unexpected -stdout_logfile=syslog -stderr_logfile=syslog - -[program:gobgpd] -command=/usr/sbin/gobgpd -p -f /etc/gobgp/gobgpd.conf -r -priority=3 -autostart=false -autorestart=false -stdout_logfile=syslog -stderr_logfile=syslog - -[program:fpmsyncd] -command=fpmsyncd -priority=5 -autostart=false -autorestart=false -stdout_logfile=syslog -stderr_logfile=syslog diff --git a/dockers/docker-fpm-gobgp/unisolate.j2 b/dockers/docker-fpm-gobgp/unisolate.j2 deleted file mode 100755 index 69172744bae7..000000000000 --- a/dockers/docker-fpm-gobgp/unisolate.j2 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo Not implemented yet -exit - diff --git a/dockers/docker-fpm-gobgp/zebra.conf.j2 b/dockers/docker-fpm-gobgp/zebra.conf.j2 deleted file mode 100644 index 2da0316ae500..000000000000 --- a/dockers/docker-fpm-gobgp/zebra.conf.j2 +++ /dev/null @@ -1,74 +0,0 @@ -! -{% block banner %} -! =========== Managed by sonic-cfggen DO NOT edit manually! ==================== -! generated by templates/quagga/zebra.conf.j2 using config DB data -! file: zebra.conf -! -{% endblock banner %} -! -{% block sys_init %} -hostname {{ DEVICE_METADATA['localhost']['hostname'] }} -password zebra -enable password zebra -{% endblock sys_init %} -! -{% block interfaces %} -! Enable link-detect (default disabled) -{% for (name, prefix) in INTERFACE|pfx_filter %} -interface {{ name }} -link-detect -! -{% endfor %} -{% for pc in PORTCHANNEL %} -interface {{ pc }} -link-detect -! -{% endfor %} -{% endblock interfaces %} -! -{% block default_route %} -! set static default route to mgmt gateway as a backup to learned default -{% for (name, prefix) in MGMT_INTERFACE|pfx_filter %} -{% if prefix | ipv4 %} -ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200 -{% endif %} -{% endfor %} -{% endblock default_route %} -! -{% block source_loopback %} -{% set lo_ipv4_addrs = [] %} -{% set lo_ipv6_addrs = [] %} -{% if LOOPBACK_INTERFACE %} -{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %} -{% if prefix | ipv6 %} -{% if lo_ipv6_addrs.append(prefix) %} -{% endif %} -{% else %} -{% if lo_ipv4_addrs.append(prefix) %} -{% endif %} -{% endif %} -{% endfor %} -{% endif %} -! Set ip source to loopback for bgp learned routes -route-map RM_SET_SRC permit 10 - set src {{ lo_ipv4_addrs[0] | ip }} -! -{% if lo_ipv6_addrs|length > 0 %} -route-map RM_SET_SRC6 permit 10 - set src {{ lo_ipv6_addrs[0] | ip }} -! -{% endif %} -ip protocol bgp route-map RM_SET_SRC -! -{% if lo_ipv6_addrs|length > 0 %} -ipv6 protocol bgp route-map RM_SET_SRC6 -! -{% endif %} -{% endblock source_loopback %} -! -{% block logging %} -log syslog informational -log facility local4 -{% endblock logging %} -! -