Add infra to support building Bullseye base image with Buster containers

All docker containers will be built as Buster containers, from a Buster
slave. The base image and remaining packages that are installed onto the
host system will be built for Bullseye, from a Bullseye slave.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This commit is contained in:
Saikrishna Arcot 2021-06-30 12:45:40 -07:00 committed by Saikrishna Arcot
parent d7e5372e54
commit 6105684b9e
25 changed files with 87 additions and 8 deletions

View File

@ -3,7 +3,7 @@
NOJESSIE ?= 1
NOSTRETCH ?= 0
NOBUSTER ?= 0
NOBULLSEYE ?= 1
NOBULLSEYE ?= 0
ifeq ($(NOJESSIE),0)
BUILD_JESSIE=1
@ -35,7 +35,7 @@ ifeq ($(NOSTRETCH), 0)
EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=stretch make -f Makefile.work stretch
endif
ifeq ($(NOBUSTER), 0)
BLDENV=buster make -f Makefile.work $@
EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=buster make -f Makefile.work buster
endif
ifeq ($(NOBULLSEYE), 0)
BLDENV=bullseye make -f Makefile.work $@

View File

@ -51,3 +51,5 @@ $(DOCKER_SONIC_VS)_FILES += $(CONFIGDB_LOAD_SCRIPT) \
$(DOCKER_SONIC_VS)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)
SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_VS)
SONIC_BUSTER_DOCKERS += $(DOCKER_SONIC_VS)

View File

@ -15,3 +15,5 @@ $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0
$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
SONIC_BUSTER_DOCKERS += $(DOCKER_SYNCD_BASE)

View File

@ -14,3 +14,4 @@ STRACE = strace
$(DOCKER_BASE_BUSTER)_DBG_IMAGE_PACKAGES += $(GDB) $(GDBSERVER) $(VIM) $(OPENSSH) $(SSHPASS) $(STRACE)
SONIC_DOCKER_IMAGES += $(DOCKER_BASE_BUSTER)
SONIC_BUSTER_DOCKERS += $(DOCKER_BASE_BUSTER)

View File

@ -23,3 +23,4 @@ $(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS = $($(DOCKER_BASE_BUSTER)_DBG_DEPENDS
$(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES = $($(DOCKER_BASE_BUSTER)_DBG_IMAGE_PACKAGES)
SONIC_DOCKER_IMAGES += $(DOCKER_CONFIG_ENGINE_BUSTER)
SONIC_BUSTER_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER)

View File

@ -28,3 +28,6 @@ $(DOCKER_DATABASE)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_DATABASE)_BASE_IMAGE_FILES += redis-cli:/usr/bin/redis-cli
$(DOCKER_DATABASE)_FILES += $(SYSCTL_NET_CONFIG) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_DATABASE)_FILES += $(UPDATE_CHASSISDB_CONFIG_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_DATABASE)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_DATABASE_DBG)

View File

@ -56,3 +56,6 @@ $(DOCKER_DHCP_RELAY)_CLI_SHOW_PLUGIN = /cli/show/plugins/show_dhcp_relay.py
$(DOCKER_DHCP_RELAY)_CLI_CLEAR_PLUGIN = /cli/clear/plugins/clear_dhcp6relay_counter.py
$(DOCKER_DHCP_RELAY)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_DHCP_RELAY)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_DHCP_RELAY_DBG)

View File

@ -39,3 +39,6 @@ $(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TSA:/usr/bin/TSA
$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TSB:/usr/bin/TSB
$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TSC:/usr/bin/TSC
$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TS:/usr/bin/TS
SONIC_BUSTER_DOCKERS += $(DOCKER_FPM_FRR)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_FPM_FRR_DBG)

View File

@ -25,3 +25,6 @@ $(DOCKER_ICCPD)_RUN_OPT += --privileged -t
$(DOCKER_ICCPD)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_ICCPD)_BASE_IMAGE_FILES += mclagdctl:/usr/bin/mclagdctl
SONIC_BUSTER_DOCKERS += $(DOCKER_ICCPD)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_ICCPD_DBG)

View File

@ -35,3 +35,6 @@ $(DOCKER_LLDP)_RUN_OPT += -v /usr/share/sonic/scripts:/usr/share/sonic/scripts:r
$(DOCKER_LLDP)_BASE_IMAGE_FILES += lldpctl:/usr/bin/lldpctl
$(DOCKER_LLDP)_BASE_IMAGE_FILES += lldpcli:/usr/bin/lldpcli
$(DOCKER_LLDP)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_LLDP)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_LLDP_DBG)

View File

@ -33,3 +33,6 @@ $(DOCKER_MACSEC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_MACSEC)_RUN_OPT += -v /host/warmboot:/var/warmboot
$(DOCKER_MACSEC)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_MACSEC)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_MACSEC_DBG)

View File

@ -35,3 +35,5 @@ $(DOCKER_MUX)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_ORCHAGENT)_RUN_OPT += -v /var/log/mux:/var/log/mux:rw
$(DOCKER_MUX)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_MUX)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_MUX_DBG)

View File

@ -36,3 +36,6 @@ $(DOCKER_NAT)_RUN_OPT += -v /host/warmboot:/var/warmboot
$(DOCKER_NAT)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_NAT)_BASE_IMAGE_FILES += natctl:/usr/bin/natctl
SONIC_BUSTER_DOCKERS += $(DOCKER_NAT)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_NAT_DBG)

View File

@ -38,3 +38,6 @@ $(DOCKER_ORCHAGENT)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
$(DOCKER_ORCHAGENT)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
$(DOCKER_ORCHAGENT)_FILES += $(ARP_UPDATE_SCRIPT) $(ARP_UPDATE_VARS_TEMPLATE) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_ORCHAGENT)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_ORCHAGENT_DBG)

View File

@ -71,3 +71,6 @@ $(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += cmd_wrapper:/usr/sbin/iSmart
$(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += cmd_wrapper:/usr/sbin/SmartCmd
$(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += cmd_wrapper:/usr/bin/ethtool
$(DOCKER_PLATFORM_MONITOR)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_PLATFORM_MONITOR)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_PLATFORM_MONITOR_DBG)

View File

@ -26,3 +26,5 @@ $(DOCKER_RESTAPI)_RUN_OPT += -v /etc/sonic/credentials:/etc/sonic/credentials:ro
$(DOCKER_RESTAPI)_RUN_OPT += -p=8081:8081/tcp
$(DOCKER_RESTAPI)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_RESTAPI)

View File

@ -29,3 +29,6 @@ $(DOCKER_ROUTER_ADVERTISER)_RUN_OPT += --privileged -t
$(DOCKER_ROUTER_ADVERTISER)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_ROUTER_ADVERTISER)_RUN_OPT += -v /usr/share/sonic/scripts:/usr/share/sonic/scripts:ro
$(DOCKER_ROUTER_ADVERTISER)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_ROUTER_ADVERTISER)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_ROUTER_ADVERTISER_DBG)

View File

@ -36,3 +36,6 @@ $(DOCKER_SFLOW)_RUN_OPT += -v /host/warmboot:/var/warmboot
$(DOCKER_SFLOW)_BASE_IMAGE_FILES += psample:/usr/bin/psample
$(DOCKER_SFLOW)_BASE_IMAGE_FILES += sflowtool:/usr/bin/sflowtool
$(DOCKER_SFLOW)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_SFLOW)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_SFLOW_DBG)

View File

@ -31,3 +31,6 @@ $(DOCKER_SNMP)_RUN_OPT += --privileged -t
$(DOCKER_SNMP)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_SNMP)_RUN_OPT += -v /usr/share/sonic/scripts:/usr/share/sonic/scripts:ro
$(DOCKER_SNMP)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_SNMP)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_SNMP_DBG)

View File

@ -36,3 +36,6 @@ $(DOCKER_MGMT_FRAMEWORK)_RUN_OPT += -v /var/run/dbus:/var/run/dbus:rw
$(DOCKER_MGMT_FRAMEWORK)_RUN_OPT += --mount type=bind,source="/var/platform/",target="/mnt/platform/"
$(DOCKER_MGMT_FRAMEWORK)_BASE_IMAGE_FILES += sonic-cli:/usr/bin/sonic-cli
SONIC_BUSTER_DOCKERS += $(DOCKER_MGMT_FRAMEWORK)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_MGMT_FRAMEWORK_DBG)

View File

@ -27,3 +27,6 @@ $(DOCKER_SONIC_SDK_BUILDENV)_LOAD_DOCKERS += $(DOCKER_SONIC_SDK)
SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_SDK_BUILDENV)
SONIC_DOCKER_DBG_IMAGES += $(DOCKER_SONIC_SDK_BUILDENV_DBG)
SONIC_BUSTER_DOCKERS += $(DOCKER_SONIC_SDK_BUILDENV)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_SONIC_SDK_BUILDENV_DBG)

View File

@ -22,3 +22,6 @@ $(DOCKER_SONIC_SDK)_LABELS += com.azure.sonic.versions.libswsscommon=$(LIBSWSSCO
$(DOCKER_SONIC_SDK)_LABELS += com.azure.sonic.versions.libsairedis=$(LIBSAIREDIS_VERSION)
$(DOCKER_SONIC_SDK)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_SONIC_SDK)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_SONIC_SDK_DBG)

View File

@ -34,3 +34,6 @@ $(DOCKER_TEAMD)_RUN_OPT += -v /host/warmboot:/var/warmboot
$(DOCKER_TEAMD)_BASE_IMAGE_FILES += teamdctl:/usr/bin/teamdctl
$(DOCKER_TEAMD)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
SONIC_BUSTER_DOCKERS += $(DOCKER_TEAMD)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_TEAMD_DBG)

View File

@ -35,3 +35,6 @@ $(DOCKER_TELEMETRY)_RUN_OPT += -v /var/run/dbus:/var/run/dbus:rw
$(DOCKER_TELEMETRY)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
$(DOCKER_TELEMETRY)_BASE_IMAGE_FILES += monit_telemetry:/etc/monit/conf.d
SONIC_BUSTER_DOCKERS += $(DOCKER_TELEMETRY)
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_TELEMETRY_DBG)

View File

@ -59,11 +59,7 @@ ifeq ($(CONFIGURED_ARCH),arm64)
override DOCKER_BASE_ARCH = arm64v8
endif
endif
ifeq ($(BLDENV),bullseye)
IMAGE_DISTRO := bullseye
else
IMAGE_DISTRO := buster
endif
IMAGE_DISTRO_DEBS_PATH = $(TARGET_PATH)/debs/$(IMAGE_DISTRO)
IMAGE_DISTRO_FILES_PATH = $(TARGET_PATH)/files/$(IMAGE_DISTRO)
@ -725,6 +721,10 @@ $(foreach DOCKER_IMAGE,$(SONIC_STRETCH_DOCKERS), $(eval $(DOCKER_IMAGE)_DEBS_PAT
$(foreach DOCKER_IMAGE,$(SONIC_STRETCH_DOCKERS), $(eval $(DOCKER_IMAGE)_FILES_PATH := $(STRETCH_FILES_PATH)))
$(foreach DOCKER_IMAGE,$(SONIC_STRETCH_DBG_DOCKERS), $(eval $(DOCKER_IMAGE)_DEBS_PATH := $(STRETCH_DEBS_PATH)))
$(foreach DOCKER_IMAGE,$(SONIC_STRETCH_DBG_DOCKERS), $(eval $(DOCKER_IMAGE)_FILES_PATH := $(STRETCH_FILES_PATH)))
$(foreach DOCKER_IMAGE,$(SONIC_BUSTER_DOCKERS), $(eval $(DOCKER_IMAGE)_DEBS_PATH := $(BUSTER_DEBS_PATH)))
$(foreach DOCKER_IMAGE,$(SONIC_BUSTER_DOCKERS), $(eval $(DOCKER_IMAGE)_FILES_PATH := $(BUSTER_FILES_PATH)))
$(foreach DOCKER_IMAGE,$(SONIC_BUSTER_DBG_DOCKERS), $(eval $(DOCKER_IMAGE)_DEBS_PATH := $(BUSTER_DEBS_PATH)))
$(foreach DOCKER_IMAGE,$(SONIC_BUSTER_DBG_DOCKERS), $(eval $(DOCKER_IMAGE)_FILES_PATH := $(BUSTER_FILES_PATH)))
ifeq ($(BLDENV),jessie)
DOCKER_IMAGES := $(SONIC_JESSIE_DOCKERS)
@ -738,8 +738,15 @@ ifeq ($(BLDENV),stretch)
STRETCH_DOCKER_IMAGES = $(filter $(SONIC_STRETCH_DOCKERS),$(DOCKER_IMAGES_FOR_INSTALLERS) $(EXTRA_DOCKER_TARGETS))
STRETCH_DBG_DOCKER_IMAGES = $(filter $(SONIC_STRETCH_DBG_DOCKERS),$(DOCKER_IMAGES_FOR_INSTALLERS) $(EXTRA_DOCKER_TARGETS))
else
DOCKER_IMAGES = $(filter-out $(SONIC_JESSIE_DOCKERS) $(SONIC_STRETCH_DOCKERS),$(SONIC_DOCKER_IMAGES))
DOCKER_DBG_IMAGES = $(filter-out $(SONIC_JESSIE_DBG_DOCKERS) $(SONIC_STRETCH_DBG_DOCKERS), $(SONIC_DOCKER_DBG_IMAGES))
ifeq ($(BLDENV),buster)
DOCKER_IMAGES := $(SONIC_BUSTER_DOCKERS)
DOCKER_DBG_IMAGES := $(SONIC_BUSTER_DBG_DOCKERS)
BUSTER_DOCKER_IMAGES = $(filter $(SONIC_BUSTER_DOCKERS),$(DOCKER_IMAGES_FOR_INSTALLERS) $(EXTRA_DOCKER_TARGETS))
BUSTER_DBG_DOCKER_IMAGES = $(filter $(SONIC_BUSTER_DBG_DOCKERS),$(DOCKER_IMAGES_FOR_INSTALLERS) $(EXTRA_DOCKER_TARGETS))
else
DOCKER_IMAGES = $(filter-out $(SONIC_JESSIE_DOCKERS) $(SONIC_STRETCH_DOCKERS) $(SONIC_BUSTER_DOCKERS),$(SONIC_DOCKER_IMAGES))
DOCKER_DBG_IMAGES = $(filter-out $(SONIC_JESSIE_DBG_DOCKERS) $(SONIC_STRETCH_DBG_DOCKERS) $(SONIC_BUSTER_DBG_DOCKERS), $(SONIC_DOCKER_DBG_IMAGES))
endif
endif
endif
@ -885,6 +892,14 @@ DOCKER_LOAD_TARGETS = $(addsuffix -load,$(addprefix $(TARGET_PATH)/, \
$(DOCKER_IMAGES) \
$(DOCKER_DBG_IMAGES)))
ifeq ($(BLDENV),bullseye)
DOCKER_LOAD_TARGETS += $(addsuffix -load,$(addprefix $(TARGET_PATH)/, \
$(SONIC_JESSIE_DOCKERS) \
$(SONIC_STRETCH_DOCKERS) \
$(SONIC_BUSTER_DOCKERS)))
endif
$(DOCKER_LOAD_TARGETS) : $(TARGET_PATH)/%.gz-load : .platform docker-start $$(TARGET_PATH)/$$*.gz
$(HEADER)
docker load -i $(TARGET_PATH)/$*.gz $(LOG)
@ -1190,6 +1205,9 @@ clean :: .platform clean-logs $$(SONIC_CLEAN_DEBS) $$(SONIC_CLEAN_FILES) $$(SONI
all : .platform $$(addprefix $(TARGET_PATH)/,$$(SONIC_ALL))
buster : $$(addprefix $(TARGET_PATH)/,$$(BUSTER_DOCKER_IMAGES)) \
$$(addprefix $(TARGET_PATH)/,$$(BUSTER_DBG_DOCKER_IMAGES))
stretch : $$(addprefix $(TARGET_PATH)/,$$(STRETCH_DOCKER_IMAGES)) \
$$(addprefix $(TARGET_PATH)/,$$(STRETCH_DBG_DOCKER_IMAGES))