Skip to content

Commit 64a1f43

Browse files
author
Ian Campbell
committed
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 <[email protected]>
1 parent 2ece527 commit 64a1f43

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

.circleci/config.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,22 @@ linuxkit_pkg_build: &linuxkit_pkg_build
3535
image_build: &image_build
3636
docker:
3737
- image: debian:stretch
38+
# 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.
39+
# NB: This will become a paid for feature at some point soon (with plenty of warning), so is not a long term solution.
40+
# small 1.0 2GB
41+
# medium (default) 2.0 4GB pass: fail:5
42+
# medium+ 3.0 6GB pass: fail:2
43+
# large 4.0 8GB pass:2 fail:
44+
# xlarge 8.0 16GB
45+
resource_class: large
3846
steps:
3947
- run:
4048
name: Configure $PATH
4149
command: echo 'export PATH=/workspace/bin:$PATH' >> $BASH_ENV
4250
- run:
4351
name: Install packages
4452
# ca-certificates are needed for attach_workspace (and git over https)
45-
command: apt-get update && apt-get install -y ca-certificates curl git make openssh-client
53+
command: apt-get update && apt-get install -y ca-certificates curl git make openssh-client strace
4654
- attach_workspace:
4755
at: /workspace
4856
- checkout
@@ -84,10 +92,12 @@ image_build: &image_build
8492
command: |
8593
mkdir -p /workspace/images/kube-$KUBE_RUNTIME-$KUBE_NETWORK
8694
df -h .
87-
# KUBE_FORMATS="iso-efi iso-bios" times out or fails for larger docker images.
88-
# Just do tar for now.
89-
make KUBE_FORMATS="tar" master node
90-
#mv kube-master*.iso kube-node*.iso /workspace/images/kube-$KUBE_RUNTIME-$KUBE_NETWORK
95+
ulimit -a
96+
make LINUXKIT_ARGS="-v" KUBE_FORMATS="iso-bios" master node
97+
mv kube-master*.iso kube-node*.iso /workspace/images/kube-$KUBE_RUNTIME-$KUBE_NETWORK
98+
- persist_to_workspace:
99+
root: /workspace
100+
paths: images
91101

92102
version: 2
93103
jobs:

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ KUBE_FORMAT_ARGS := $(patsubst %,-format %,$(KUBE_FORMATS))
1515
all: master node
1616

1717
master: yml/kube.yml yml/$(KUBE_RUNTIME).yml yml/$(KUBE_RUNTIME)-master.yml yml/$(KUBE_NETWORK).yml
18+
# strace logs received signals
19+
#strace -f -e trace=signal
1820
linuxkit $(LINUXKIT_ARGS) build $(LINUXKIT_BUILD_ARGS) -name kube-master $(KUBE_FORMAT_ARGS) $^
1921

2022
node: yml/kube.yml yml/$(KUBE_RUNTIME).yml yml/$(KUBE_NETWORK).yml

boot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ if [ -n "${kubeadm_data}" ] ; then
8888
echo "{ \"kubeadm\": { \"entries\": { ${kubeadm_data} } } }" > $state/metadata.json
8989
fi
9090

91-
linuxkit run ${KUBE_RUN_ARGS} -networking ${KUBE_NETWORKING} -cpus ${KUBE_VCPUS} -mem ${KUBE_MEM} -state "${state}" -disk size=${KUBE_DISK} -data $state/metadata.json ${uefi} "${img}${suffix}"
91+
exec linuxkit run ${KUBE_RUN_ARGS} -networking ${KUBE_NETWORKING} -cpus ${KUBE_VCPUS} -mem ${KUBE_MEM} -state "${state}" -disk size=${KUBE_DISK} -data $state/metadata.json ${uefi} "${img}${suffix}"

ssh_into_kubelet.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
sshopts="-o LogLevel=FATAL \
44
-o StrictHostKeyChecking=no \
55
-o UserKnownHostsFile=/dev/null \
6-
-o IdentitiesOnly=yes"
6+
-o IdentitiesOnly=yes \
7+
$SSHOPTS"
78

89
case $(uname -s) in
910
Linux)
@@ -15,4 +16,4 @@ case $(uname -s) in
1516
ijc25/alpine-ssh"
1617
;;
1718
esac
18-
$ssh $sshopts -t root@"$1" ctr tasks exec --tty --exec-id ssh-$(hostname)-$$ kubelet ash -l
19+
exec $ssh $sshopts -t root@"$1" ctr tasks exec --tty --exec-id ssh-$(hostname)-$$ kubelet ash -l

0 commit comments

Comments
 (0)