-
Notifications
You must be signed in to change notification settings - Fork 335
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
google-cloud-cli has a huge install size #1732
Comments
We only need 1 addon. I would like to stretch this issue by saying the size is even ridiculous. We really want minimal image sizes. |
On top of that I don't understand why Python should be installed when using a CLI that is available through multiple links, categorized by their core architecture. If I download the CLI for linux x86_64, why isn't it just a static binary ? On docker images it bloats the size because of dependencies that could be avoided. |
+1 on taking action to make this more efficient. It doesn't seem like it scales very well. This package gets installed automatically on some GCP instance types (reference) and takes a long time (1-2 minutes) to update on smaller instances. Having nearly 40000 files, over a third of which are manpages, probably doesn't help...
For a clean install on a Debian image:
It also releases on a strict weekly cadence, so if you're keeping up with security updates, etc. you're going to end up (re)installing it continually. |
Someone would expect more from Google engineers. Instead of an efficient Command Line Interface we are served with GBs of bloat. I'm using the CLI to deploy a Cloud Run docker image. The Google Cloud Cli competes with Docker itself in size... |
I can confirm this is not only a problem for disk footprint but a problem during installation and update on very small GCP instances (e2-micro, etc). Every time DNF is trying to unpack Cloud SDK RPM image VM instance just goes down or segfaults with out of memory errors. This happens on all instances with < 1GB of memory -> https://issuetracker.google.com/issues/239207289 |
I entered this ticket and later found this convo. Please upvote this bug to help get it some attention. https://issuetracker.google.com/issues/324114897 I agree the install size is abhorrent. |
@jonsneyers
|
Installing it manually instead of using the distro package can save you precious space.
|
For ubuntu (jammy) docker images, have a Dockerfile which completelly removes the included python and forces the use of the OS version. Reduces the image size to around 800Mb uncompressed (200 compressed). THat's 2G less than the official cloud-sdk image.
I really don't understand the little care Google engineers have put on this. 2GB of python is a lot of python and 400Mb of documentation is also a waste. Edit: Cleaned up some stuff and added comments to make it more readable. This was directly extracted from an internal dockerfile. |
Here is an improved version
|
I'm working on the CI to automate these artifacts for general use. Here are the two categories we'll publish
thumbs up👍 here if you would find this useful and ill ping you when it's ready to be tested. |
471 & 472 releases are ready to test out here. You can find instructions on how to obtain the docker images & .tgz artifacts |
Please be understanding, this is the industry standard: Azure/azure-cli#22955 Azure/azure-cli#7387 , unfortunately. |
In the second example aws is 3mb and azure is 700mb
…On Tue, Apr 16, 2024 at 16:46 Adam Dobrawy ***@***.***> wrote:
Please be understanding, this is the industry standard:
Azure/azure-cli#22955 <Azure/azure-cli#22955>
Azure/azure-cli#7387 <Azure/azure-cli#7387> .
—
Reply to this email directly, view it on GitHub
<#1732 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADBFK4DCJDQVGU2OYSK56TY5WZ4PAVCNFSM6AAAAAA3A2W3Z6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRQGA4DANBWGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
please upvote this GCP ticket https://issuetracker.google.com/issues/324114897?pli=1 -- maintainers also raised an internal ticket that's connected. |
Voted. Please also upvote https://issuetracker.google.com/issues/239207289 to fix this in RPM packages too. |
automation is working now on a 24-hour latency. we have lite releases 471,472 & 473 in runnable docker images (86% faster) and tgz release . https://github.com/tonymet/gcloud-lite give it a run |
Quick recap:
The above makes perfect business sense for Google, does it not? |
Let's be charitable to the team and make sure we are being reasonable. A Go rewrite is out of scope but a stripped gcloud CLI distribution is feasible. I don't think the package size is intentional, it's likely that the teams haven't assessed customer impact. I think our best strategy here is to make sure GCP is aware of the customer impact and give them resources to help prepare a stripped distribution. |
I am a paying customer of Google Compute Engine. And I am nice and kind. Charitable donations or gifts are not involved here, hence, word charitable is not applicable and is totally out of place here. I expect world-class service for my money from a company which takes pride in its technical excellence. Currently, Is it too much to ask of a corporation to fulfill its promises https://about.google/intl/en-GB/philosophy/ ?
|
Exactly. This is not free software, nor this is some small business which requires our nurture and forgiving attention. This is a multi-billion dollar company and we are paying customers. If their margins and profits cannot hire proper management or engineering which are capable of delivering stellar experience for their clients we might just turn off the lights and go home. |
Just to add context, I had no issues invoking In other words, Next, 6+ months since the issue was reported and not resolved, cute dude @tonymet tells me to be charitable while cutting out one point of mine out of context. Which is a text-book example of trolling and virtue signalling. |
I'm sorry i meant no offense. I meant that we will catch more flies with honey than vinegar. And I'm certainly not virtue signaling. Look at all the effort I invested to create an open source distro and raise awareness with google. We both want the same thing here. |
You are right. I am sorry for any offence or irritation caused. Sometimes, I cannot hold in the fire, and that's a limitation of mine. |
good to hear it and thanks. let's hope for the best |
A go rewrite would be nice. The package is too large. I ended up on this thread because I also found out the google cloud cli was taking huge amount of space in my docker container, to the point I had to do a google search about it. |
The sombre business reality is that for Google |
Ideally, Google should provide |
@max0x7ba how is that ideal? IMHO requiring users to connect to and mount a given disk shared by all its customers is not incredibly attractive, and I wonder if it even is feasible technically. I'd rather download and execute a single pre-built and signed binary, and be done with it. |
I think @max0x7ba is suggesting this as a short-term workaround to reduce CPU + IO costs until the SDK is stripped . I would like to see the SDK included in the base VM images with allowances for the wasted storage. That would speed up launch time |
To help combat bloated gcloud cli, I created a 10 mb standalone go CLI , gcloud-go, with no dependencies . .tgz and docker images are available. |
It's something like 1 gigabyte of install size when I follow the instructions on https://cloud.google.com/storage/docs/gsutil_install
(and then I'm not even counting the dependencies, I'm only looking at
/usr/lib/google-cloud-sdk
)This seems very excessive for what is supposed to be just a command line interface to a cloud platform.
Please consider being a bit more size-aware when packaging these things. For example, I see a huge unstripped binary in
/usr/lib/google-cloud-sdk/bin/anthoscli
(174 MB) and a big uncompressed JSON file in/usr/lib/google-cloud-sdk/data/cli/gcloud.json
(83 MB). Also it looks like a bunch of test code is being shipped as part of the package:which makes me think this is not actually a packaged tool but more like a dump of a development repository.
It feels like there is a lot of low hanging fruit to reduce the install size of this tool.
The text was updated successfully, but these errors were encountered: