[SAIServerV2] Build SAI Serverv2 docker (#9509)
Support saiserver v2 with python3 and thrift 0.13.0 add variables to support the saiserverv2 build different thrift in saithrift depends on saiserver version build differernt versions of saiserver make the saiserver and saiserver docker with version number test done: build two different versions of sasiserver in local build environment add saiserver to buster Co-authored-by: richard.yu <richard.yu@microsoft.comwq>
This commit is contained in:
parent
09b3efccc9
commit
49382d773e
@ -270,6 +270,7 @@ SONIC_BUILD_INSTRUCTION := make \
|
||||
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
|
||||
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
|
||||
SONIC_INSTALL_DEBUG_TOOLS=$(INSTALL_DEBUG_TOOLS) \
|
||||
SONIC_SAITHRIFT_V2=$(SAITHRIFT_V2) \
|
||||
MDEBUG=$(MDEBUG) \
|
||||
PASSWORD=$(PASSWORD) \
|
||||
USERNAME=$(USERNAME) \
|
||||
|
@ -1,13 +1,16 @@
|
||||
# docker image for brcm saiserver
|
||||
|
||||
DOCKER_SAISERVER_BRCM = docker-saiserver-brcm.gz
|
||||
DOCKER_SAISERVER_BRCM = docker-saiserver$(SAITHRIFT_VER)-brcm.gz
|
||||
$(DOCKER_SAISERVER_BRCM)_PATH = $(PLATFORM_PATH)/docker-saiserver-brcm
|
||||
$(DOCKER_SAISERVER_BRCM)_DEPENDS += $(SAISERVER)
|
||||
$(DOCKER_SAISERVER_BRCM)_FILES += $(DSSERVE) $(BCMCMD)
|
||||
$(DOCKER_SAISERVER_BRCM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_BRCM)
|
||||
SONIC_BUSTER_DOCKERS += $(DOCKER_SAISERVER_BRCM)
|
||||
|
||||
#Support two versions of saiserver
|
||||
$(DOCKER_SAISERVER_BRCM)_CONTAINER_NAME = saiserver$(SAITHRIFT_VER)
|
||||
|
||||
$(DOCKER_SAISERVER_BRCM)_CONTAINER_NAME = saiserver
|
||||
$(DOCKER_SAISERVER_BRCM)_RUN_OPT += --privileged -t
|
||||
$(DOCKER_SAISERVER_BRCM)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SAISERVER_BRCM)_RUN_OPT += -v /var/run/docker-saiserver:/var/run/sswsyncd
|
||||
|
@ -2,19 +2,28 @@
|
||||
|
||||
SAI_VER = 0.9.4
|
||||
|
||||
LIBSAITHRIFT_DEV = libsaithrift-dev_$(SAI_VER)_amd64.deb
|
||||
LIBSAITHRIFT_DEV = libsaithrift$(SAITHRIFT_VER)-dev_$(SAI_VER)_amd64.deb
|
||||
$(LIBSAITHRIFT_DEV)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
|
||||
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(PYTHON_THRIFT) $(THRIFT_COMPILER) $(BRCM_SAI) $(BRCM_SAI_DEV)
|
||||
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT) $(BRCM_SAI)
|
||||
#Support two different versions of thrift
|
||||
ifeq ($(SAITHRIFT_V2),y)
|
||||
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT_0_13_0) $(LIBTHRIFT_DEV_0_13_0) $(PYTHON3_THRIFT_0_13_0) $(THRIFT_COMPILER_0_13_0)
|
||||
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT_0_13_0)
|
||||
$(LIBSAITHRIFT_DEV)_BUILD_ENV = SAITHRIFTV2=true SAITHRIFT_VER=v2
|
||||
else
|
||||
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(PYTHON_THRIFT) $(THRIFT_COMPILER)
|
||||
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT)
|
||||
endif
|
||||
$(LIBSAITHRIFT_DEV)_DEPENDS += $(BRCM_SAI) $(BRCM_SAI_DEV)
|
||||
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(BRCM_SAI)
|
||||
SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV)
|
||||
|
||||
PYTHON_SAITHRIFT = python-saithrift_$(SAI_VER)_amd64.deb
|
||||
PYTHON_SAITHRIFT = python-saithrift$(SAITHRIFT_VER)_$(SAI_VER)_amd64.deb
|
||||
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(PYTHON_SAITHRIFT)))
|
||||
|
||||
SAISERVER = saiserver_$(SAI_VER)_amd64.deb
|
||||
$(SAISERVER)_RDEPENDS += $(LIBTHRIFT) $(BRCM_SAI)
|
||||
SAISERVER = saiserver$(SAITHRIFT_VER)_$(SAI_VER)_amd64.deb
|
||||
$(SAISERVER)_RDEPENDS += $(LIBSAITHRIFT_DEV)
|
||||
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(SAISERVER)))
|
||||
|
||||
SAISERVER_DBG = saiserver-dbg_$(SAI_VER)_amd64.deb
|
||||
SAISERVER_DBG = saiserver$(SAITHRIFT_VER)-dbg_$(SAI_VER)_amd64.deb
|
||||
$(SAISERVER_DBG)_RDEPENDS += $(SAISERVER)
|
||||
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(SAISERVER_DBG)))
|
||||
|
6
slave.mk
6
slave.mk
@ -151,6 +151,11 @@ ifeq ($(SONIC_INSTALL_DEBUG_TOOLS),y)
|
||||
INSTALL_DEBUG_TOOLS = y
|
||||
endif
|
||||
|
||||
ifeq ($(SONIC_SAITHRIFT_V2),y)
|
||||
SAITHRIFT_V2 = y
|
||||
SAITHRIFT_VER = v2
|
||||
endif
|
||||
|
||||
ifeq ($(SONIC_INCLUDE_SFLOW),y)
|
||||
INCLUDE_SFLOW = y
|
||||
endif
|
||||
@ -281,6 +286,7 @@ $(info "FRR_USER_UID" : "$(FRR_USER_UID)")
|
||||
$(info "FRR_USER_GID" : "$(FRR_USER_GID)")
|
||||
endif
|
||||
$(info "ENABLE_SYNCD_RPC" : "$(ENABLE_SYNCD_RPC)")
|
||||
$(info "SAITHRIFT_V2" : "$(SAITHRIFT_V2)")
|
||||
$(info "ENABLE_ORGANIZATION_EXTENSIONS" : "$(ENABLE_ORGANIZATION_EXTENSIONS)")
|
||||
$(info "HTTP_PROXY" : "$(HTTP_PROXY)")
|
||||
$(info "HTTPS_PROXY" : "$(HTTPS_PROXY)")
|
||||
|
@ -110,6 +110,13 @@ RUN apt-get update && apt-get install -y \
|
||||
libxml-simple-perl \
|
||||
graphviz \
|
||||
aspell \
|
||||
# For SAI meta rpc build - make rpc
|
||||
libgetopt-long-descriptive-perl \
|
||||
libconst-fast-perl \
|
||||
libtemplate-perl \
|
||||
libnamespace-autoclean-perl \
|
||||
libmoose-perl \
|
||||
libmoosex-aliases-perl \
|
||||
# For linux build
|
||||
bc \
|
||||
fakeroot \
|
||||
|
Loading…
Reference in New Issue
Block a user