Skip to content

Commit

Permalink
Add ENABLE_SYNCD_RPC option (#642)
Browse files Browse the repository at this point in the history
Under rules/config now there's additional configuration option
ENABLE_SYNCD_RPC that allows building SONIC installer with
docker-syncd-*-rpc for evaluation purposes.

Signed-off-by: marian-pritsak <marianp@mellanox.com>
  • Loading branch information
marian-pritsak authored and lguohan committed May 30, 2017
1 parent 7dfbca6 commit 520fff5
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ DOCKER_MGMT_BUILD = docker build --no-cache \
PLATFORM=$(PLATFORM) \
BUILD_NUMBER=$(BUILD_NUMBER) \
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
PASSWORD=$(PASSWORD) \
USERNAME=$(USERNAME) \
$@
Expand Down
9 changes: 9 additions & 0 deletions platform/broadcom/docker-syncd-brcm-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ $(DOCKER_SYNCD_BRCM_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
$(DOCKER_SYNCD_BRCM_RPC)_FILES += $(DSSERVE) $(BCMCMD)
$(DOCKER_SYNCD_BRCM_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BRCM)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC)
endif

$(DOCKER_SYNCD_BRCM_RPC)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += --net=host --privileged -t
$(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
$(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
$(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
2 changes: 2 additions & 0 deletions platform/broadcom/docker-syncd-brcm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ $(DOCKER_SYNCD_BRCM)_DEPENDS += $(SYNCD)
$(DOCKER_SYNCD_BRCM)_FILES += $(DSSERVE) $(BCMCMD)
$(DOCKER_SYNCD_BRCM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM)
ifneq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM)
endif

$(DOCKER_SYNCD_BRCM)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_BRCM)_RUN_OPT += --net=host --privileged -t
Expand Down
8 changes: 8 additions & 0 deletions platform/cavium/docker-syncd-cavm-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ $(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)
ifeq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM_RPC)
endif

$(DOCKER_SYNCD_CAVM_RPC)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += --net=host --privileged -t
$(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
$(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
2 changes: 2 additions & 0 deletions platform/cavium/docker-syncd-cavm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ $(DOCKER_SYNCD_CAVM)_PATH = $(PLATFORM_PATH)/docker-syncd-cavm
$(DOCKER_SYNCD_CAVM)_DEPENDS += $(SYNCD) $(CAVM_LIBSAI) $(XP_TOOLS) $(REDIS_TOOLS)
$(DOCKER_SYNCD_CAVM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM)
ifneq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM)
endif

$(DOCKER_SYNCD_CAVM)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_CAVM)_RUN_OPT += --net=host --privileged -t
Expand Down
9 changes: 9 additions & 0 deletions platform/centec/docker-syncd-centec-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@ $(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)
ifeq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC)
endif

$(DOCKER_SYNCD_CENTEC_RPC)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += --net=host --privileged -t
$(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
$(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
$(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
2 changes: 2 additions & 0 deletions platform/centec/docker-syncd-centec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ $(DOCKER_SYNCD_CENTEC)_PATH = $(PLATFORM_PATH)/docker-syncd-centec
$(DOCKER_SYNCD_CENTEC)_DEPENDS += $(SYNCD)
$(DOCKER_SYNCD_CENTEC)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC)
ifneq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC)
endif

$(DOCKER_SYNCD_CENTEC)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_CENTEC)_RUN_OPT += --net=host --privileged -t
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
Expand Up @@ -6,3 +6,11 @@ $(DOCKER_SYNCD_MLNX_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
$(DOCKER_SYNCD_MLNX_RPC)_FILES += $(MLNX_FW)
$(DOCKER_SYNCD_MLNX_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_MLNX)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC)
endif

$(DOCKER_SYNCD_MLNX_RPC)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += --net=host --privileged -t
$(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
$(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
2 changes: 2 additions & 0 deletions platform/mellanox/docker-syncd-mlnx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ $(DOCKER_SYNCD_MLNX)_DEPENDS += $(SYNCD) $(MFT) $(PYTHON_SDK_API)
$(DOCKER_SYNCD_MLNX)_FILES += $(MLNX_FW)
$(DOCKER_SYNCD_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX)
ifneq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX)
endif

$(DOCKER_SYNCD_MLNX)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_MLNX)_RUN_OPT += --net=host --privileged -t
Expand Down
4 changes: 4 additions & 0 deletions rules/config
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ DEFAULT_PASSWORD = YourPaSsWoRd
# Quagga will be the default routing-stack for all the SONiC platforms. Other supported
# routing-stacks: frr, gobgp.
SONIC_ROUTING_STACK = quagga

# ENABLE_SYNCD_RPC - build docker-syncd with rpc packages for testing purposes.
# Uncomment to enable:
# ENABLE_SYNCD_RPC = y
4 changes: 4 additions & 0 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ ifeq ($(PASSWORD),)
override PASSWORD := $(DEFAULT_PASSWORD)
endif

ifeq ($(SONIC_ENABLE_SYNCD_RPC),y)
ENABLE_SYNCD_RPC = y
endif

MAKEFLAGS += -j $(SONIC_CONFIG_BUILD_JOBS)

###############################################################################
Expand Down

0 comments on commit 520fff5

Please sign in to comment.