Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Caching (question / enhancement) #9

Open
cwbeitel opened this issue Apr 2, 2018 · 5 comments
Open

Caching (question / enhancement) #9

cwbeitel opened this issue Apr 2, 2018 · 5 comments
Labels
kind/enhancement/planned kind/question Further information is requested

Comments

@cwbeitel
Copy link

cwbeitel commented Apr 2, 2018

This is awesome.

Can you explain how build and image pull caching can work with cbi? How can I configure one or more of the build tools, e.g. docker, to either cache previous builds or previous image pulls?

Related to kubeflow/kubeflow#289 (comment)

@AkihiroSuda
Copy link
Member

Thanks for your interest in CBI!

Can you explain how build and image pull caching can work with cbi? How can I configure one or more of the build tools, e.g. docker, to either cache previous builds or previous image pulls?

This is plugin-specific.

Docker plugin

Docker plugin connects to a random Docker daemon that is running on a Kubernetes node, via a bind-mounted /var/run/docker.sock.

The less number of nodes, the higher probability to hit the cache. (and higher load on the each of the nods)

I think we should also extend Docker plugin pod template to support setting NodeSelector, so as to limit the Docker node to be used.

BuildKit plugin

BuildKit plugins connects to a BuildKit service running on the Kubernetes cluster.

The less number of BuildKit replicas, the higher probability to hit the cache.

BuildKit also plans to implement cache-aware load-balancing mode: moby/buildkit#62

Buildah plugin

Buildah plugin creates an one-shot buildah container.

Buildah does not seem to support instruction cache, AFAIK.
Probably, future version of Buildah plugin would support caching, as in the case of img plugin (below).

img plugin (Not implemented yet)

img plugin would creates an one-shot kubectl exec some-stateful-img-pod img .... container.

The less number of img pods, the higher probability to hit the cache.

GCB plugin (Not implemented yet)

Needs investigation. ( https://cloud.google.com/container-builder/docs/speeding-up-builds?hl=en#caching_directories_with_google_cloud_storage )

@AkihiroSuda AkihiroSuda added enhancement kind/question Further information is requested labels Apr 3, 2018
@cwbeitel
Copy link
Author

cwbeitel commented Apr 4, 2018

Great summary, thanks for the info!

@lugeng
Copy link

lugeng commented Feb 12, 2019

Thanks @AkihiroSuda for your great work.

BuildKit plugin

BuildKit plugins connects to a BuildKit service running on the Kubernetes cluster.

The less number of BuildKit replicas, the higher probability to hit the cache.

BuildKit also plans to implement cache-aware load-balancing mode: moby/buildkit#62

I'm studying how to use the buildkit to build image with cache, and find "cache-aware load-balancing mode" would be a great feature. Do we have plan when to release it?
Also, for this Distributed build mode, could you provide more detail docs?

@AkihiroSuda
Copy link
Member

It is still under discussion and would still take months for implementation

@lugeng
Copy link

lugeng commented Feb 12, 2019

OK, thanks~

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement/planned kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants