-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Preload images into docker volume #6720
Preload images into docker volume #6720
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: priyawadhwa The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks surprisingly easy ! some changes requested
on linux mount looks like this for refference.
|
also This PR wont be complete without adding a Progress bar to the download. and letting user know this wait Worth it ! because it is one time ! |
tested on my home mac (after running download-only first)
This PR
minikube 1.7.3 with normal docker driver (not preloaded)
|
update: This PR on Mac
minikube v1.7.3 on mac
|
All Times minikube: [ 94.411163 92.578566 92.994626] Average minikube: 93.328118 Averages Time Per Log
|
Codecov Report
@@ Coverage Diff @@
## master #6720 +/- ##
==========================================
- Coverage 38.3% 38.23% -0.08%
==========================================
Files 142 142
Lines 8740 8756 +16
==========================================
Hits 3348 3348
- Misses 4971 4987 +16
Partials 421 421
|
All Times Minikube (PR 6720): [ 89.696027 92.269080 91.165386] Average minikube: 93.421347 Averages Time Per Log
|
All Times minikube: [ 89.437817 91.676015 90.452250] Average minikube: 90.522028 Averages Time Per Log
|
@medyagh PTAL whenever you have a chance. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets make sure the integraiton tests download the file before all paralell tests run.
All Times minikube: [ 91.814959 90.993627 89.940463] Average minikube: 90.916350 Averages Time Per Log
|
"TestDownloadOnlyDocker" fails on github actions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good work ! I am okay with merging this and solve the small issues in the following PRs.
I tested locally and it works in offline mode beautifully!
Thanks for the hard work on this.
please feel free to merge if you are ready.
glog.Infof("Starting extracting preloaded images to volume") | ||
// Extract preloaded images to container | ||
if err := oci.ExtractTarballToVolume(preload.TarballFilepath(d.NodeConfig.KubernetesVersion), params.Name, BaseImage); err != nil { | ||
glog.Infof("Unable to extract preloaded tarball to volume: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional nit: Warnf or Errorf so it doesn't get hidden in the logs.
} | ||
cmd := exec.Command(Docker, "run", "--rm", "--entrypoint", "/usr/bin/tar", "-v", fmt.Sprintf("%s:/preloaded.tar:ro", tarballPath), "-v", fmt.Sprintf("%s:/extractDir", volumeName), imageName, "-I", "lz4", "-xvf", "/preloaded.tar", "-C", "/extractDir") | ||
if out, err := cmd.CombinedOutput(); err != nil { | ||
return errors.Wrapf(err, "output %s", string(out)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional nit:
Wrapf(err, "extract to volume: output %s", string(out))
This PR adds support for tarring up docker images, storing them in GCS, and then creating a volume with them to mount into kic
To download the preloaded images run:
(60 s) minikube start --vm-driver docker --download-only
(41 s) minikube start --vm-driver docker
(5 s) minikube delete
(30 s) minikube start --vm-driver docker
TODO: