[mellanox]: Integrate CRIU tool to SYNCD docker container (#2061)
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
This commit is contained in:
parent
ef4ee9f242
commit
514b38f348
8
platform/mellanox/criu.mk
Normal file
8
platform/mellanox/criu.mk
Normal file
@ -0,0 +1,8 @@
|
||||
CRIU_VERSION = 3.10
|
||||
|
||||
export CRIU_VERSION
|
||||
|
||||
CRIU = criu_$(CRIU_VERSION)-1_amd64.deb
|
||||
$(CRIU)_SRC_PATH = $(PLATFORM_PATH)/criu
|
||||
$(CRIU)_DEPENDS += $(LIBNL3_DEV)
|
||||
SONIC_MAKE_DEBS += $(CRIU)
|
14
platform/mellanox/criu/Makefile
Normal file
14
platform/mellanox/criu/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
.ONESHELL:
|
||||
SHELL = /bin/bash
|
||||
.SHELLFLAGS += -e
|
||||
|
||||
MAIN_TARGET = criu_$(CRIU_VERSION)-1_amd64.deb
|
||||
|
||||
CRIU_DEPS = iptables,protobuf-c-compiler,protobuf-compiler,python-protobuf,libprotobuf-c1,python-future,python-ipaddr,libnet1,pkg-config,asciidoc,xmlto
|
||||
|
||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
rm -rf criu
|
||||
git clone -b v$(CRIU_VERSION) https://github.com/checkpoint-restore/criu.git
|
||||
pushd criu
|
||||
RUNDIR=/run/criu make
|
||||
sudo checkinstall --default --install=no --fstrans=no --pkgversion=$(CRIU_VERSION) --maintainer='@' --requires=$(CRIU_DEPS) --pakdir=$(DEST)
|
@ -2,7 +2,7 @@
|
||||
|
||||
DOCKER_SYNCD_MLNX = docker-syncd-mlnx.gz
|
||||
$(DOCKER_SYNCD_MLNX)_PATH = $(PLATFORM_PATH)/docker-syncd-mlnx
|
||||
$(DOCKER_SYNCD_MLNX)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API) $(MLNX_SFPD)
|
||||
$(DOCKER_SYNCD_MLNX)_DEPENDS += $(SYNCD) $(PYTHON_SDK_API) $(MLNX_SFPD) $(CRIU)
|
||||
$(DOCKER_SYNCD_MLNX)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX)
|
||||
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||
@ -13,3 +13,4 @@ $(DOCKER_SYNCD_MLNX)_CONTAINER_NAME = syncd
|
||||
$(DOCKER_SYNCD_MLNX)_RUN_OPT += --net=host --privileged -t
|
||||
$(DOCKER_SYNCD_MLNX)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||
$(DOCKER_SYNCD_MLNX)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||
$(DOCKER_SYNCD_MLNX)_RUN_OPT += --tmpfs /run/criu
|
||||
|
@ -14,7 +14,7 @@ debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN apt-get install -y libxml2
|
||||
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 -i \
|
||||
{% for deb in docker_syncd_mlnx_debs.split(' ') -%}
|
||||
|
@ -230,7 +230,20 @@ RUN apt-get update && apt-get install -y \
|
||||
# For bash
|
||||
texi2html \
|
||||
# For initramfs
|
||||
bash-completion
|
||||
bash-completion \
|
||||
#For Mellanox CRIU build
|
||||
libprotobuf-dev \
|
||||
libprotobuf-c0-dev \
|
||||
protobuf-c-compiler \
|
||||
protobuf-compiler \
|
||||
python-protobuf \
|
||||
pkg-config \
|
||||
libnet1-dev \
|
||||
libnet-dev \
|
||||
libaio-dev \
|
||||
asciidoc \
|
||||
xmlto \
|
||||
checkinstall
|
||||
|
||||
# For linux build
|
||||
RUN apt-get -y build-dep linux
|
||||
|
Loading…
Reference in New Issue
Block a user