Skip to content

CI: build images #8

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

Merged
merged 7 commits into from
Nov 28, 2017
Merged

CI: build images #8

merged 7 commits into from
Nov 28, 2017

Conversation

ijc
Copy link
Contributor

@ijc ijc commented Nov 22, 2017

Build a set of images from the cross of cross of KUBE_RUNTIME={docker,cri-containerd} and KUBE_NETWORK={weave,bridge}, build both BIOS and EFI images in all cases.

WIP while I play with the CI setup and understand the various interactions of workspaces, docker image cache, artifact publishing from multiple jobs etc.

The previous used of /workspace/images is switched to /workspace/packages to free up images for the VM images.

I'd like to use /workspace/images for actual VM images.

Signed-off-by: Ian Campbell <ijc@docker.com>
@ijc
Copy link
Contributor Author

ijc commented Nov 22, 2017

Hrm, 1 successful check (which is the dco check). Either Circle is having a hiccup or I've somehow managed to disable it...

@ijc
Copy link
Contributor Author

ijc commented Nov 22, 2017

Hrm, I buggered the syntax, so it errorred out but didn't say anything. Nifty.

The webpage says:

We weren't able to start this workflow.
The following jobs are unreachable: images
images: requires job "build-image-docker-bridge" but "build-image-docker-bridge" is not part of this workflow.
images: requires job "build-image-docker-weave" but "build-image-docker-weave" is not part of this workflow.
images: requires job "build-image-cri-containerd-weave" but "build-image-cri-containerd-weave" is not part of this workflow.
images: requires job "build-image-cri-containerd-bridge" but "build-image-cri-containerd-bridge" is not part of this workflow.
For more examples see the Workflows documentation.

That's something to watch for!

@ijc ijc force-pushed the ci-build-images branch 9 times, most recently from e32e7df to 3913eaf Compare November 22, 2017 16:01
@ijc
Copy link
Contributor Author

ijc commented Nov 22, 2017

Previously the CI was taking 3-3½ minutes. So far in my iterations here it looks to be taking more like 7-10 minutes with parallelism of 4. We are building 4 packages followed by 4 images, so more parallelism seems unlikely to help much.

@ijc ijc force-pushed the ci-build-images branch 12 times, most recently from 342d037 to a29a843 Compare November 23, 2017 15:59
ijc pushed a commit to ijc/linuxkit that referenced this pull request Nov 24, 2017
If doing the build separately from pushing (as I am intending in
linuxkit/kubernetes#8) it is desirable to avoid a
second build when pushing.

Signed-off-by: Ian Campbell <ijc@docker.com>
@ijc ijc force-pushed the ci-build-images branch 3 times, most recently from a240c8e to 43f5079 Compare November 27, 2017 10:29
Previous if you ran `make update-hashes` with a dirty tree then the `-dirty`
suffix was sticky and would never be automatically removed (and might even
multiply!).

Also remove some unnecessary quotes.

Signed-off-by: Ian Campbell <ijc@docker.com>
@ijc ijc changed the title [WIP] CI: build images CI: build images Nov 27, 2017
@ijc
Copy link
Contributor Author

ijc commented Nov 27, 2017

OK, I think this is about ready. I'll keep #9 open for now in case review requires retesting.

@ijc
Copy link
Contributor Author

ijc commented Nov 27, 2017

Some times observed during testing.

Package builds (in parallel up to 4):

Package NOP (unchanged, pulled from hub) Built
kubelet 02:52 11:18
kubernetes-docker-image-cache-common 00:51 01:30
kubernetes-docker-image-cache-control-plane 01:27 02:06
cri-containerd 00:31 02:10

I didn't do lots of measurements and there's some variance (mostly due to the network traffic I expect).

Image building, up to 4 in parallel, each depends on the relevant package builds:

↓ Runtime / Network → Weave Bridge
Docker 02:56 02:44
CRI 02:04 03:26

Again some variance.

Push to hub takes ~2:00 if it pushes both kubelet and cri-containerd and ~1:30 if it pushes neither (it still does a bunch of setup and imports the images even if there turns out to be nothing to push).

If all 4 packages need building then the elapsed time was around 24:30, without anything needing to be built was ~8:10, I expect this will vary depending on the scheduling of the parallel jobs and which packages have actually changed.

Without the parallelism I'd expect the full nop run to take ~20 mins and a full build more like ~30 mins so I think splitting into jobs like this is worthwhile.

@justincormack justincormack merged commit 708c41a into linuxkit:master Nov 28, 2017
@ijc ijc deleted the ci-build-images branch November 28, 2017 11:54
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 5, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 5, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 5, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 5, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 5, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 5, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 5, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 5, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 6, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 7, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 7, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 7, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 7, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 7, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 8, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 8, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 12, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Dec 13, 2017
Previously (in linuxkit#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 <ijc@docker.com>
ijc pushed a commit to ijc/linuxkit-kubernetes that referenced this pull request Jan 12, 2018
Previously (in linuxkit#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 <ijc@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants