[Mellanox][SAISERVER] Support Mellanox saiserverv1 and saiserverv2 docker (#9686)
* support saiserverv1 and saiserverv2 docker * add saiserver into buster and revert some changes * update thrift version
This commit is contained in:
parent
86017096b2
commit
c8db7a2d52
@ -16,15 +16,16 @@
|
|||||||
#
|
#
|
||||||
# docker image for mlnx saiserver
|
# docker image for mlnx saiserver
|
||||||
|
|
||||||
DOCKER_SAISERVER_MLNX = docker-saiserver-mlnx.gz
|
DOCKER_SAISERVER_MLNX = docker-saiserver$(SAITHRIFT_VER)-mlnx.gz
|
||||||
$(DOCKER_SAISERVER_MLNX)_PATH = $(PLATFORM_PATH)/docker-saiserver-mlnx
|
$(DOCKER_SAISERVER_MLNX)_PATH = $(PLATFORM_PATH)/docker-saiserver-mlnx
|
||||||
$(DOCKER_SAISERVER_MLNX)_DEPENDS += $(SAISERVER) $(PYTHON_SDK_API)
|
$(DOCKER_SAISERVER_MLNX)_DEPENDS += $(SAISERVER) $(PYTHON_SDK_API)
|
||||||
$(DOCKER_SAISERVER_MLNX)_PYTHON_DEBS += $(MLNX_SFPD)
|
$(DOCKER_SAISERVER_MLNX)_PYTHON_DEBS += $(MLNX_SFPD)
|
||||||
$(DOCKER_SAISERVER_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
|
$(DOCKER_SAISERVER_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
|
||||||
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_MLNX)
|
SONIC_DOCKER_IMAGES += $(DOCKER_SAISERVER_MLNX)
|
||||||
SONIC_STRETCH_DOCKERS += $(DOCKER_SAISERVER_MLNX)
|
SONIC_BUSTER_DOCKERS += $(DOCKER_SAISERVER_MLNX)
|
||||||
|
|
||||||
|
$(DOCKER_SAISERVER_MLNX)_CONTAINER_NAME = saiserver$(SAITHRIFT_VER)
|
||||||
|
|
||||||
$(DOCKER_SAISERVER_MLNX)_CONTAINER_NAME = saiserver
|
|
||||||
$(DOCKER_SAISERVER_MLNX)_RUN_OPT += --privileged -t
|
$(DOCKER_SAISERVER_MLNX)_RUN_OPT += --privileged -t
|
||||||
$(DOCKER_SAISERVER_MLNX)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
$(DOCKER_SAISERVER_MLNX)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||||
$(DOCKER_SAISERVER_MLNX)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
$(DOCKER_SAISERVER_MLNX)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
## See the License for the specific language governing permissions and
|
## See the License for the specific language governing permissions and
|
||||||
## limitations under the License.
|
## limitations under the License.
|
||||||
##
|
##
|
||||||
FROM docker-config-engine-stretch
|
{% from "dockers/dockerfile-macros.j2" import install_debian_packages %}
|
||||||
|
FROM docker-config-engine-buster
|
||||||
|
|
||||||
ARG docker_container_name
|
ARG docker_container_name
|
||||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||||
@ -22,7 +23,11 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
|
|||||||
## Make apt-get non-interactive
|
## Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update
|
## Pre-install the fundamental packages
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y install \
|
||||||
|
gdb \
|
||||||
|
libboost-atomic1.71.0
|
||||||
|
|
||||||
COPY \
|
COPY \
|
||||||
{% for deb in docker_saiserver_mlnx_debs.split(' ') -%}
|
{% for deb in docker_saiserver_mlnx_debs.split(' ') -%}
|
||||||
@ -38,15 +43,7 @@ debs/
|
|||||||
|
|
||||||
RUN apt-get install -y --no-install-recommends libxml2 iptables libbsd0 protobuf-c-compiler protobuf-compiler python-protobuf libprotobuf-c1 python-future python-ipaddr libnet1 pkg-config asciidoc xmlto
|
RUN apt-get install -y --no-install-recommends libxml2 iptables libbsd0 protobuf-c-compiler protobuf-compiler python-protobuf libprotobuf-c1 python-future python-ipaddr libnet1 pkg-config asciidoc xmlto
|
||||||
|
|
||||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
{{ install_debian_packages(docker_saiserver_mlnx_debs.split(' ')) }}
|
||||||
{% for deb in docker_saiserver_mlnx_debs.split(' ') -%}
|
|
||||||
dpkg_apt debs/{{ deb }}{{'; '}}
|
|
||||||
{%- endfor %}
|
|
||||||
|
|
||||||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
|
||||||
{% for deb in docker_saiserver_mlnx_pydebs.split(' ') -%}
|
|
||||||
dpkg_apt debs/{{ deb }}{{'; '}}
|
|
||||||
{%- endfor %}
|
|
||||||
|
|
||||||
COPY ["start.sh", "/usr/bin/"]
|
COPY ["start.sh", "/usr/bin/"]
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ stdout_logfile=syslog
|
|||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
|
|
||||||
[program:saiserver]
|
[program:saiserver]
|
||||||
command=/usr/bin/saiserver -p /etc/sai/profile.ini -f /etc/sai/portmap.ini
|
command=/usr/sbin/saiserver -p /etc/sai/profile.ini -f /etc/sai/portmap.ini
|
||||||
priority=3
|
priority=3
|
||||||
autostart=false
|
autostart=false
|
||||||
autorestart=false
|
autorestart=false
|
||||||
|
@ -18,19 +18,28 @@
|
|||||||
|
|
||||||
SAI_VER = 0.9.4
|
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)_SRC_PATH = $(SRC_PATH)/sonic-sairedis/SAI
|
||||||
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(PYTHON_THRIFT) $(THRIFT_COMPILER) $(MLNX_SAI) $(MLNX_SAI_DEV)
|
ifeq ($(SAITHRIFT_V2),y)
|
||||||
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT) $(MLNX_SAI)
|
$(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT_0_14_1) $(LIBTHRIFT_0_14_1_DEV) $(PYTHON3_THRIFT_0_14_1) $(THRIFT_0_14_1_COMPILER)
|
||||||
|
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT_0_14_1)
|
||||||
|
$(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 += $(MLNX_SAI) $(MLNX_SAI_DEV)
|
||||||
|
$(LIBSAITHRIFT_DEV)_RDEPENDS += $(MLNX_SAI)
|
||||||
|
|
||||||
SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV)
|
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)))
|
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(PYTHON_SAITHRIFT)))
|
||||||
|
|
||||||
SAISERVER = saiserver_$(SAI_VER)_amd64.deb
|
SAISERVER = saiserver$(SAITHRIFT_VER)_$(SAI_VER)_amd64.deb
|
||||||
$(SAISERVER)_RDEPENDS += $(LIBTHRIFT) $(MLNX_SAI)
|
$(SAISERVER)_RDEPENDS += $(LIBSAITHRIFT_DEV)
|
||||||
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(SAISERVER)))
|
$(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)
|
$(SAISERVER_DBG)_RDEPENDS += $(SAISERVER)
|
||||||
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(SAISERVER_DBG)))
|
$(eval $(call add_extra_package,$(LIBSAITHRIFT_DEV),$(SAISERVER_DBG)))
|
||||||
|
Loading…
Reference in New Issue
Block a user