Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Mar 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ dockers/docker-team/Dockerfile
dockers/docker-teamd/Dockerfile
dockers/docker-config-engine/Dockerfile
dockers/docker-base/Dockerfile
platform/broadcom/docker-syncd-brcm/Dockerfile
platform/*/docker-syncd-*/Dockerfile
platform/*/docker-syncd-*-rpc/Dockerfile

8 changes: 8 additions & 0 deletions platform/broadcom/docker-syncd-brcm-rpc.mk
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,19 @@ FROM docker-syncd-brcm
## Make apt-get non-interactive
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
RUN apt-get update \
Expand Down Expand Up @@ -34,9 +46,6 @@ RUN apt-get update \
&& cd /opt \
&& 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 -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 \
&& rm -rf /deps

Expand Down
4 changes: 3 additions & 1 deletion platform/broadcom/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include $(PLATFORM_PATH)/platform-modules-arista.mk
include $(PLATFORM_PATH)/platform-modules-ingrasys-s9100.mk
include $(PLATFORM_PATH)/docker-orchagent-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-aboot.mk

Expand All @@ -18,7 +19,8 @@ $(DSSERVE)_URL = "https://sonicstorage.blob.core.windows.net/packages/dsserve?sv
SONIC_ONLINE_FILES += $(BCMCMD) $(DSSERVE)

SONIC_ALL += $(SONIC_ONE_IMAGE) $(SONIC_ONE_ABOOT_IMAGE) \
$(DOCKER_FPM_GOBGP)
$(DOCKER_FPM_GOBGP) \
$(DOCKER_SYNCD_BRCM_RPC)

# Inject brcm sai into sairedis
$(LIBSAIREDIS)_DEPENDS += $(BRCM_OPENNSL) $(BRCM_SAI) $(BRCM_SAI_DEV)
Expand Down
8 changes: 8 additions & 0 deletions platform/mellanox/docker-syncd-mlnx-rpc.mk
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,19 @@ FROM docker-syncd-mlnx
## Make apt-get non-interactive
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
RUN apt-get update \
Expand Down Expand Up @@ -34,9 +46,6 @@ RUN apt-get update \
&& cd /opt \
&& 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 -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 \
&& rm -rf /deps

Expand Down
4 changes: 3 additions & 1 deletion platform/mellanox/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ include $(PLATFORM_PATH)/mft.mk
include $(PLATFORM_PATH)/mlnx-sai.mk
include $(PLATFORM_PATH)/hw-management.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)/one-image.mk

SONIC_ALL += $(SONIC_ONE_IMAGE) \
$(DOCKER_FPM_GOBGP)
$(DOCKER_FPM_GOBGP) \
$(DOCKER_SYNCD_MLNX_RPC)

# Inject mlnx sai into sairedis
$(LIBSAIREDIS)_DEPENDS += $(MLNX_SAI)
Expand Down