Skip to content

Commit

Permalink
[vs]: update virtual switch (#1148)
Browse files Browse the repository at this point in the history
* [vs]: add zebra/quagga/fpmsyncd in supervisord.conf

* setup the hostname for vs docker

* do not save to the disk for redis db

* install ipaddress module in vs docker

* update sonic-sairedis submodule
  • Loading branch information
lguohan authored Nov 13, 2017
1 parent a6edef2 commit 50b4868
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
11 changes: 9 additions & 2 deletions platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ RUN apt-get install -y net-tools \
iproute \
libpython2.7

RUN pip install setuptools \
py2_ipaddress

COPY \
{% for deb in docker_sonic_vs_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
Expand All @@ -43,15 +46,19 @@ debs/{{ deb }}{{' '}}
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs

RUN sed -ri 's/^daemonize yes$/daemonize no/; \
RUN sed -ri 's/^(save .*$)/# \1/g; \
s/^daemonize yes$/daemonize no/; \
s/^logfile .*$/logfile ""/; \
s/^# syslog-enabled no$/syslog-enabled no/; \
s/^# unixsocket/unixsocket/ \
s/^# unixsocket/unixsocket/; \
s/^client-output-buffer-limit pubsub [0-9]+mb [0-9]+mb [0-9]+/client-output-buffer-limit pubsub 0 0 0/ \
' /etc/redis/redis.conf

COPY ["50-default.conf", "/etc/rsyslog.d/"]
COPY ["start.sh", "orchagent.sh", "/usr/bin/"]
COPY ["brcm.profile.ini", "/usr/share/sonic/device/vswitch/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]

RUN echo "docker-sonic-vs" > /etc/hostname

ENTRYPOINT ["/usr/bin/supervisord"]
2 changes: 2 additions & 0 deletions platform/vs/docker-sonic-vs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ supervisorctl start neighsyncd

supervisorctl start teamsyncd

supervisorctl start fpmsyncd

# Start arp_update when VLAN exists
# VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'`
# if [ "$VLAN" != "" ]; then
Expand Down
24 changes: 24 additions & 0 deletions platform/vs/docker-sonic-vs/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,27 @@ autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

[program:zebra]
command=/usr/lib/quagga/zebra -A 127.0.0.1
priority=10
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

[program:bgpd]
command=/usr/lib/quagga/bgpd -A 127.0.0.1 -F
priority=11
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

[program:fpmsyncd]
command=/usr/bin/fpmsyncd
priority=12
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog
2 changes: 1 addition & 1 deletion src/sonic-sairedis

0 comments on commit 50b4868

Please sign in to comment.