Thanks so much for such a great product - we’re 1.5 years into operations after our renewal project, and Balena Cloud has made developing, updating, and deploying our ~400 devices so easy.
We’re updating one of our museum’s digital players, Spotlights, and are running into an issue where the Docker image is taking a very long time (~5 hours) to upload to Balena Cloud when we run the CLI command balena push s__spotlights-x86.
Question: is there something in our setup that’s causing the base image not to be cached and uploading ~7GB to Balena? The Docker Hub image appears to be ~580MB.
Once that upload finishes, we also build a multi-container fleet to the museum which includes some monitoring containers. When we push to this fleet, the spotlights container is cached, so uploading is very quick.
Any ideas how we can speed things up for the initial single container push?
Hey @sighmon thanks for the kind words - always great to hear that the products we work so hard on are helping people out in the real world
Down to business! Where is the 7GB figure coming from? When you perform a balena push with the CLI, everything in that directory is being compressed and uploaded in order for the build to be carried out on the balena builders. What would also be helpful to know is if the upload you’re referring to here that’s taking the time is the one at the start of the build process or at the end when the image is stored. The first is an upload from your machine to the builder, whereas the one at the end is an upload from our builder to the registry. It may also help to share build logs.
Could you also clarify how large the releases are when you look at them on the balenaCloud dashboard? You can find that by going to your Fleet > Releases > Selecting a release, then all the sizes of each of the services are listed. Do these add up to 7GB?
Down to business! Where is the 7GB figure coming from?
This is at the upload from my directory stage. You can see the difference in these releases between when we make a code change, and when it’s loading a cached image.
$ balena push s__spotlights-x86
--------------------------------------------------------------------------------
[Warn] Node.js version "14.19.3" does not satisfy requirement ">=12.8.0 <13.0.0"
[Warn] This may cause unexpected behavior.
--------------------------------------------------------------------------------
╭────────────────────────────────────────────────────────────────────╮
│ │
│ Update available 13.3.0 → 13.6.1 │
│ │
│ https://github.com/balena-io/balena-cli/blob/master/INSTALL.md │
│ │
╰────────────────────────────────────────────────────────────────────╯
EPIPE: write EPIPE
Additional information may be available with the `--debug` flag.
For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting
Have you tried doing a local build/push to see if it affects the image size significantly? Develop locally - Balena Documentation
Just to test, I pushed acmilabs/spotlights:v2 image locally and it showed 608.5MB size.
Unfortunately the caveats of local build don’t work for us - our team works remote, so needs to see shared logs, be able to deploy environment variable changes without code changes, and restart individual containers if necessary.