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-sonic-vs]: upgrade sonic-vs docker to stretch #2865

Merged
merged 3 commits into from
May 6, 2019
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NOSTRETCH ?= 0
%::
@echo "+++ --- Making $@ --- +++"
ifeq ($(NOSTRETCH), 0)
BLDENV=stretch make -f Makefile.work stretch
BLDENV=stretch EXTRA_STRETCH_TARGETS=$(notdir $@) make -f Makefile.work stretch
endif
make -f Makefile.work $@

Expand Down
1 change: 1 addition & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ SONIC_BUILD_INSTRUCTION := make \
HTTP_PROXY=$(http_proxy) \
HTTPS_PROXY=$(https_proxy) \
SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) \
EXTRA_STRETCH_TARGETS=$(EXTRA_STRETCH_TARGETS) \
$(SONIC_OVERRIDE_BUILD_VARS)

.PHONY: sonic-slave-build sonic-slave-bash init reset
Expand Down
6 changes: 3 additions & 3 deletions platform/vs/docker-sonic-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ $(DOCKER_SONIC_VS)_DEPENDS += $(SWSS) \
$(PYTHON_SWSSCOMMON) \
$(LIBTEAMDCT) \
$(LIBTEAM_UTILS) \
$(SONIC_DEVICE_DATA) \
$(IPROUTE2)
$(SONIC_DEVICE_DATA)

$(DOCKER_SONIC_VS)_PYTHON_DEBS += $(SONIC_UTILS)

Expand All @@ -36,5 +35,6 @@ $(DOCKER_SONIC_VS)_FILES += $(CONFIGDB_LOAD_SCRIPT) \
$(QOS_CONFIG_TEMPLATE) \
$(SONIC_VERSION)

$(DOCKER_SONIC_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
$(DOCKER_SONIC_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_VS)
SONIC_STRETCH_DOCKERS += $(DOCKER_SONIC_VS)
10 changes: 5 additions & 5 deletions platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM docker-config-engine
FROM docker-config-engine-stretch

ARG docker_container_name
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get install -y gnupg
COPY ["sonic-dev.gpg.key", "/etc/apt/"]
RUN apt-key add /etc/apt/sonic-dev.gpg.key
RUN echo "deb http://packages.microsoft.com/repos/sonic-dev/ jessie main" >> /etc/apt/sources.list
Expand All @@ -21,12 +22,11 @@ RUN apt-get install -y net-tools \
python-ply \
libqt5core5a \
libqt5network5 \
libboost-program-options1.55.0 \
libboost-system1.55.0 \
libboost-thread1.55.0 \
libboost-program-options1.62.0 \
libboost-system1.62.0 \
libboost-thread1.62.0 \
libgmp10 \
libjudydebian1 \
libnanomsg0 \
libdaemon0 \
libjansson4 \
libjemalloc1 \
Expand Down
28 changes: 11 additions & 17 deletions platform/vs/docker-syncd-vs.mk
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
# docker image for vs syncd

DOCKER_SYNCD_VS = docker-syncd-vs.gz
$(DOCKER_SYNCD_VS)_PATH = $(PLATFORM_PATH)/docker-syncd-vs
$(DOCKER_SYNCD_VS)_DEPENDS += $(SYNCD_VS)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SYNCD_VS)_DEPENDS += $(SYNCD_VS_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIREDIS_DBG) \
$(LIBSAIVS_DBG)
endif
$(DOCKER_SYNCD_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_VS)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_VS)
DOCKER_SYNCD_PLATFORM_CODE = vs
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk

$(DOCKER_SYNCD_VS)_CONTAINER_NAME = syncd
$(DOCKER_SYNCD_VS)_RUN_OPT += --net=host --privileged -t
$(DOCKER_SYNCD_VS)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
$(DOCKER_SYNCD_VS)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_SYNCD_VS)_RUN_OPT += -v /host/warmboot:/var/warmboot
$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD_VS)

$(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_VS_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG) \
$(LIBSAIVS_DBG)

$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
2 changes: 1 addition & 1 deletion platform/vs/docker-syncd-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker-config-engine
FROM docker-config-engine-stretch

ARG docker_container_name
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
Expand Down
4 changes: 2 additions & 2 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,11 @@ SONIC_TARGET_LIST += $(addprefix $(TARGET_PATH)/, $(SONIC_SIMPLE_DOCKER_IMAGES))

# Build stretch docker images only in stretch slave docker,
# jessie docker images only in jessie slave docker
DOCKER_IMAGES_FOR_INSTALLERS := $(sort $(foreach installer,$(SONIC_INSTALLERS),$($(installer)_DOCKERS)))
ifeq ($(BLDENV),stretch)
DOCKER_IMAGES_FOR_INSTALLERS := $(sort $(foreach installer,$(SONIC_INSTALLERS),$($(installer)_DOCKERS)))
DOCKER_IMAGES := $(SONIC_STRETCH_DOCKERS)
DOCKER_DBG_IMAGES := $(SONIC_STRETCH_DBG_DOCKERS)
SONIC_STRETCH_DOCKERS_FOR_INSTALLERS = $(filter $(SONIC_STRETCH_DOCKERS),$(DOCKER_IMAGES_FOR_INSTALLERS))
SONIC_STRETCH_DOCKERS_FOR_INSTALLERS = $(filter $(SONIC_STRETCH_DOCKERS),$(DOCKER_IMAGES_FOR_INSTALLERS) $(EXTRA_STRETCH_TARGETS))
SONIC_STRETCH_DBG_DOCKERS_FOR_INSTALLERS = $(filter $(SONIC_STRETCH_DBG_DOCKERS), $(patsubst %.gz,%-$(DBG_IMAGE_MARK).gz, $(SONIC_STRETCH_DOCKERS_FOR_INSTALLERS)))
else
DOCKER_IMAGES := $(filter-out $(SONIC_STRETCH_DOCKERS), $(SONIC_DOCKER_IMAGES))
Expand Down
7 changes: 7 additions & 0 deletions sonic-slave-stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ RUN pip install --force-reinstall --upgrade jinja2>=2.10
# For templating
RUN pip install j2cli

# Remove python-click 6.6
RUN apt-get purge -y python-click
# For sonic utilities testing
RUN pip install click-default-group click natsort tabulate netifaces==0.10.7 fastentrypoints

Expand All @@ -276,6 +278,11 @@ RUN pip3 install redis
# For supervisor build
RUN pip install meld3 mock

# For sonic-utilities build
RUN pip install mockredispy==2.9.3
RUN pip install pytest-runner==4.4
RUN pip install setuptools==40.8.0

# Install dependencies for isc-dhcp-relay build
RUN apt-get -y build-dep isc-dhcp

Expand Down