From d0cd661505727b6d939057f26f624ece1bdff861 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 5 Dec 2017 10:12:05 +0000 Subject: [PATCH] CI: Build .iso (but not -efi.iso) images. Previously (in #8) building both seemed to timeout or otherwise fall foul of some sort of infra glitch. Try just building one for now. This is a first step in trying to actually boot images in CI. Signed-off-by: Ian Campbell --- .circleci/config.yml | 15 ++++++++++----- Makefile | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4930e7c..4fd5219 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,6 +35,9 @@ linuxkit_pkg_build: &linuxkit_pkg_build image_build: &image_build docker: - image: debian:stretch + # image builds seem to need a bit more grunt (RAM) than usual. Possibly getting OOM killed, which https://github.com/moby/tool/pull/191 might help. + # NB: This will become a paid for feature at some point soon (with plenty of warning), so is not a long term solution. + resource_class: large steps: - run: name: Configure $PATH @@ -42,7 +45,7 @@ image_build: &image_build - run: name: Install packages # ca-certificates are needed for attach_workspace (and git over https) - command: apt-get update && apt-get install -y ca-certificates curl git make openssh-client + command: apt-get update && apt-get install -y ca-certificates curl git make openssh-client strace - attach_workspace: at: /workspace - checkout @@ -72,10 +75,12 @@ image_build: &image_build command: | mkdir -p /workspace/images/kube-$KUBE_RUNTIME-$KUBE_NETWORK df -h . - # KUBE_FORMATS="iso-efi iso-bios" times out or fails for larger docker images. - # Just do tar for now. - make KUBE_FORMATS="tar" kube-master.iso kube-node.iso - #mv kube-master*.iso kube-node*.iso /workspace/images/kube-$KUBE_RUNTIME-$KUBE_NETWORK + ulimit -a + make LINUXKIT_ARGS="-v" KUBE_FORMATS="iso-bios" kube-master.iso kube-node.iso + mv kube-master*.iso kube-node*.iso /workspace/images/kube-$KUBE_RUNTIME-$KUBE_NETWORK + - persist_to_workspace: + root: /workspace + paths: images version: 2 jobs: diff --git a/Makefile b/Makefile index c796b50..074da06 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,8 @@ KUBE_FORMAT_ARGS := $(patsubst %,-format %,$(KUBE_FORMATS)) all: kube-master.iso kube-node.iso kube-master.iso: yml/kube.yml yml/$(KUBE_RUNTIME).yml yml/$(KUBE_RUNTIME)-master.yml yml/$(KUBE_NETWORK).yml - linuxkit $(LINUXKIT_ARGS) build $(LINUXKIT_BUILD_ARGS) -name kube-master $(KUBE_FORMAT_ARGS) $^ + # strace logs received signals + strace -f -e trace=signal linuxkit $(LINUXKIT_ARGS) build $(LINUXKIT_BUILD_ARGS) -name kube-master $(KUBE_FORMAT_ARGS) $^ kube-node.iso: yml/kube.yml yml/$(KUBE_RUNTIME).yml yml/$(KUBE_NETWORK).yml linuxkit $(LINUXKIT_ARGS) build $(LINUXKIT_BUILD_ARGS) -name kube-node $(KUBE_FORMAT_ARGS) $^