[docker-syncd-%-rpc]: Integrate syncd dockers with rpc (#431)

* Build docker-syncd-*-rpc for brcm and mlnx

* Fix errors

* Update make files for rpc

* Fix mistypes
This commit is contained in:
pavel-shirshov 2017-03-24 18:36:56 -07:00 committed by GitHub
parent 9e8df96ca7
commit 5314230980
11 changed files with 51 additions and 11 deletions

4
.gitignore vendored
View File

@ -36,4 +36,6 @@ dockers/docker-team/Dockerfile
dockers/docker-teamd/Dockerfile dockers/docker-teamd/Dockerfile
dockers/docker-config-engine/Dockerfile dockers/docker-config-engine/Dockerfile
dockers/docker-base/Dockerfile dockers/docker-base/Dockerfile
platform/broadcom/docker-syncd-brcm/Dockerfile platform/*/docker-syncd-*/Dockerfile
platform/*/docker-syncd-*-rpc/Dockerfile

View File

@ -0,0 +1,8 @@
# docker image for brcm syncd with rpc
DOCKER_SYNCD_BRCM_RPC = docker-syncd-brcm-rpc.gz
$(DOCKER_SYNCD_BRCM_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-brcm-rpc
$(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD) $(LIBTHRIFT)
$(DOCKER_SYNCD_BRCM_RPC)_FILES += $(DSSERVE) $(BCMCMD)
$(DOCKER_SYNCD_BRCM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BRCM)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC)

View File

@ -3,7 +3,19 @@ FROM docker-syncd-brcm
## Make apt-get non-interactive ## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
COPY deps /deps COPY \
{% for deb in docker_syncd_brcm_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
RUN dpkg -r syncd
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
dpkg_apt \
{% for deb in docker_syncd_brcm_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor %}
## Pre-install the fundamental packages ## Pre-install the fundamental packages
RUN apt-get update \ RUN apt-get update \
@ -34,9 +46,6 @@ RUN apt-get update \
&& cd /opt \ && cd /opt \
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
&& dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \ && dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \
&& dpkg -r syncd \
&& dpkg_apt /deps/syncd_*.deb \
&& dpkg_apt /deps/libthrift-0.9.3_*.deb \
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ && apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
&& rm -rf /deps && rm -rf /deps

View File

@ -6,6 +6,7 @@ include $(PLATFORM_PATH)/platform-modules-arista.mk
include $(PLATFORM_PATH)/platform-modules-ingrasys-s9100.mk include $(PLATFORM_PATH)/platform-modules-ingrasys-s9100.mk
include $(PLATFORM_PATH)/docker-orchagent-brcm.mk include $(PLATFORM_PATH)/docker-orchagent-brcm.mk
include $(PLATFORM_PATH)/docker-syncd-brcm.mk include $(PLATFORM_PATH)/docker-syncd-brcm.mk
include $(PLATFORM_PATH)/docker-syncd-brcm-rpc.mk
include $(PLATFORM_PATH)/one-image.mk include $(PLATFORM_PATH)/one-image.mk
include $(PLATFORM_PATH)/one-aboot.mk include $(PLATFORM_PATH)/one-aboot.mk
@ -18,7 +19,8 @@ $(DSSERVE)_URL = "https://sonicstorage.blob.core.windows.net/packages/dsserve?sv
SONIC_ONLINE_FILES += $(BCMCMD) $(DSSERVE) SONIC_ONLINE_FILES += $(BCMCMD) $(DSSERVE)
SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT_IMAGE) \ SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT_IMAGE) \
$(DOCKER_FPM_GOBGP) $(DOCKER_FPM_GOBGP) \
$(DOCKER_SYNCD_BRCM_RPC)
# Inject brcm sai into sairedis # Inject brcm sai into sairedis
$(LIBSAIREDIS)_DEPENDS += $(BRCM_OPENNSL) $(BRCM_SAI) $(BRCM_SAI_DEV) $(LIBSAIREDIS)_DEPENDS += $(BRCM_OPENNSL) $(BRCM_SAI) $(BRCM_SAI_DEV)

View File

@ -0,0 +1,8 @@
# docker image for mlnx syncd with rpc
DOCKER_SYNCD_MLNX_RPC = docker-syncd-mlnx-rpc.gz
$(DOCKER_SYNCD_MLNX_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-mlnx-rpc
$(DOCKER_SYNCD_MLNX_RPC)_DEPENDS += $(SYNCD) $(LIBTHRIFT)
$(DOCKER_SYNCD_MLNX_RPC)_FILES += $(MLNX_FW)
$(DOCKER_SYNCD_MLNX_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_MLNX)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC)

View File

@ -3,7 +3,19 @@ FROM docker-syncd-mlnx
## Make apt-get non-interactive ## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
COPY deps /deps COPY \
{% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
RUN dpkg -r syncd
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
dpkg_apt \
{% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor %}
## Pre-install the fundamental packages ## Pre-install the fundamental packages
RUN apt-get update \ RUN apt-get update \
@ -34,9 +46,6 @@ RUN apt-get update \
&& cd /opt \ && cd /opt \
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
&& dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \ && dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \
&& dpkg -r syncd \
&& dpkg_apt /deps/syncd_*.deb \
&& dpkg_apt /deps/libthrift-0.9.3_*.deb \
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ && apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
&& rm -rf /deps && rm -rf /deps

View File

@ -4,11 +4,13 @@ include $(PLATFORM_PATH)/mft.mk
include $(PLATFORM_PATH)/mlnx-sai.mk include $(PLATFORM_PATH)/mlnx-sai.mk
include $(PLATFORM_PATH)/hw-management.mk include $(PLATFORM_PATH)/hw-management.mk
include $(PLATFORM_PATH)/docker-syncd-mlnx.mk include $(PLATFORM_PATH)/docker-syncd-mlnx.mk
include $(PLATFORM_PATH)/docker-syncd-mlnx-rpc.mk
include $(PLATFORM_PATH)/docker-orchagent-mlnx.mk include $(PLATFORM_PATH)/docker-orchagent-mlnx.mk
include $(PLATFORM_PATH)/one-image.mk include $(PLATFORM_PATH)/one-image.mk
SONIC_ALL += $(SONIC_ONE_IMAGE) \ SONIC_ALL += $(SONIC_ONE_IMAGE) \
$(DOCKER_FPM_GOBGP) $(DOCKER_FPM_GOBGP) \
$(DOCKER_SYNCD_MLNX_RPC)
# Inject mlnx sai into sairedis # Inject mlnx sai into sairedis
$(LIBSAIREDIS)_DEPENDS += $(MLNX_SAI) $(LIBSAIREDIS)_DEPENDS += $(MLNX_SAI)