-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use syncd-rpc for docker-syncd-rpc (#522)
* Use syncd rpc for docker-syncd-rpc. Create docker-syncd-rpc for cavium and centec
- Loading branch information
1 parent
d30fbf1
commit 2c4c6e9
Showing
18 changed files
with
170 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# docker image for cavium syncd with rpc | ||
|
||
DOCKER_SYNCD_CAVM_RPC = docker-syncd-cavm-rpc.gz | ||
$(DOCKER_SYNCD_CAVM_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-cavm-rpc | ||
$(DOCKER_SYNCD_CAVM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) $(CAVM_LIBSAI) $(XP_TOOLS) $(REDIS_TOOLS) | ||
$(DOCKER_SYNCD_CAVM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_CAVM) | ||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM_RPC) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
FROM docker-syncd-cavm | ||
|
||
## Make apt-get non-interactive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
COPY \ | ||
{% for deb in docker_syncd_cavm_rpc_debs.split(' ') -%} | ||
debs/{{ deb }}{{' '}} | ||
{%- endfor -%} | ||
debs/ | ||
|
||
RUN dpkg -P syncd | ||
|
||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \ | ||
{% for deb in docker_syncd_cavm_rpc_debs.split(' ') -%} | ||
dpkg_apt debs/{{ deb }}{{'; '}} | ||
{%- endfor %} | ||
|
||
## Pre-install the fundamental packages | ||
RUN apt-get update \ | ||
&& apt-get -y install \ | ||
net-tools \ | ||
python-pip \ | ||
build-essential \ | ||
libssl-dev \ | ||
libffi-dev \ | ||
python-dev \ | ||
wget \ | ||
cmake \ | ||
supervisor \ | ||
&& wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \ | ||
&& tar xvfz 1.0.0.tar.gz \ | ||
&& cd nanomsg-1.0.0 \ | ||
&& mkdir -p build \ | ||
&& cmake . \ | ||
&& make install \ | ||
&& ldconfig \ | ||
&& cd .. \ | ||
&& rm -fr nanomsg-1.0.0 \ | ||
&& rm -f 1.0.0.tar.gz \ | ||
&& pip install cffi==1.7.0 \ | ||
&& pip install --upgrade cffi==1.7.0 \ | ||
&& pip install nnpy \ | ||
&& mkdir -p /opt \ | ||
&& cd /opt \ | ||
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ | ||
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ | ||
&& rm -rf /root/deps | ||
|
||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf | ||
|
||
RUN sed -i 's/read/sysctl -w net.core.rmem_max=509430500 ; \/usr\/bin\/supervisord/' /usr/bin/start.sh | ||
|
||
ENTRYPOINT ["/bin/bash"] | ||
CMD ["/usr/bin/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[program:ptf_nn_agent] | ||
command=/usr/bin/python /opt/ptf_nn_agent.py --device-socket 1@tcp://0.0.0.0:10900 -i 1-3@Ethernet12 --set-iface-rcv-buffer=109430400 | ||
process_name=ptf_nn_agent | ||
stdout_logfile=/tmp/ptf_nn_agent.out.log | ||
stderr_logfile=/tmp/ptf_nn_agent.err.log | ||
redirect_stderr=false | ||
autostart=true | ||
autorestart=true | ||
startsecs=1 | ||
numprocs=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[supervisord] | ||
nodaemon=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# docker image for centec syncd with rpc | ||
|
||
DOCKER_SYNCD_CENTEC_RPC = docker-syncd-centec-rpc.gz | ||
$(DOCKER_SYNCD_CENTEC_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-centec-rpc | ||
$(DOCKER_SYNCD_CENTEC_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT) | ||
$(DOCKER_SYNCD_CENTEC_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_CENTEC) | ||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
FROM docker-syncd-centec | ||
|
||
## Make apt-get non-interactive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
COPY \ | ||
{% for deb in docker_syncd_centec_rpc_debs.split(' ') -%} | ||
debs/{{ deb }}{{' '}} | ||
{%- endfor -%} | ||
debs/ | ||
|
||
RUN dpkg -P syncd | ||
|
||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \ | ||
{% for deb in docker_syncd_centec_rpc_debs.split(' ') -%} | ||
dpkg_apt debs/{{ deb }}{{'; '}} | ||
{%- endfor %} | ||
|
||
## Pre-install the fundamental packages | ||
RUN apt-get update \ | ||
&& apt-get -y install \ | ||
net-tools \ | ||
python-pip \ | ||
build-essential \ | ||
libssl-dev \ | ||
libffi-dev \ | ||
python-dev \ | ||
wget \ | ||
cmake \ | ||
supervisor \ | ||
&& wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \ | ||
&& tar xvfz 1.0.0.tar.gz \ | ||
&& cd nanomsg-1.0.0 \ | ||
&& mkdir -p build \ | ||
&& cmake . \ | ||
&& make install \ | ||
&& ldconfig \ | ||
&& cd .. \ | ||
&& rm -fr nanomsg-1.0.0 \ | ||
&& rm -f 1.0.0.tar.gz \ | ||
&& pip install cffi==1.7.0 \ | ||
&& pip install --upgrade cffi==1.7.0 \ | ||
&& pip install nnpy \ | ||
&& mkdir -p /opt \ | ||
&& cd /opt \ | ||
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ | ||
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ | ||
&& rm -rf /root/deps | ||
|
||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf | ||
|
||
RUN sed -i 's/read/sysctl -w net.core.rmem_max=509430500 ; \/usr\/bin\/supervisord/' /usr/bin/start.sh | ||
|
||
ENTRYPOINT ["/bin/bash"] | ||
CMD ["/usr/bin/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[program:ptf_nn_agent] | ||
command=/usr/bin/python /opt/ptf_nn_agent.py --device-socket 1@tcp://0.0.0.0:10900 -i 1-3@Ethernet12 --set-iface-rcv-buffer=109430400 | ||
process_name=ptf_nn_agent | ||
stdout_logfile=/tmp/ptf_nn_agent.out.log | ||
stderr_logfile=/tmp/ptf_nn_agent.err.log | ||
redirect_stderr=false | ||
autostart=true | ||
autorestart=true | ||
startsecs=1 | ||
numprocs=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[supervisord] | ||
nodaemon=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule sonic-sairedis
updated
from e28e4c to 230f32