Open chantra opened 2 years ago
@jiasli for awareness
BTW, the same issue holds for the deb package too:
-rw-rw-r-- 1 chantra chantra 48M Jul 16 2020 azure-cli_2.9.1-1~focal_all.deb
and installed size:
mkdir azure-cli
dpkg-deb -x azure-cli_2.9.1-1\~focal_all.deb azure-cli
du -sh azure-cli
603M azure-cli
It is caused by the huge network python SDK which Azure CLI depends on and we are working with corresponding team to reduce the package size.
Thanks for the update @yonzhan !
Any updates to this?
I just audited my disk space and az
and its dependencies are taking up 1Gb of disk space. That's a burden for my desktop but it's crazy when you try to bundle az
into a Docker image. This looks really bad when compared to any of the Go based CLI's which can statically compile all the dependencies in making them a) easier to install and b) consume far less disk space.
We have developed a script to trim unused API versions for Windows MSI pacakge (https://github.com/Azure/azure-cli/pull/23946). We will extend it to other packages.
Note, the issue (at least on Linux) is not the API versions, it is the fact that it brings in its own specific installation of the Python runtime.
we like to use dehydrated (acme client) with azure-dns plugin for letsencrypt certificates on IOT devices. That plugin needs azure-cli for settings dns verification records. ~1 gb of storage for azure-cli on an IOT device is way to much. Any plans on reducing the size?
@sjansen1 700MB is the best we can achieve right now. (Just my personal perspective, have you tried another acme client such as certbot? If I recall correctly, Azure CLI is not required for DNS verification.)
@sjansen1 700MB is the best we can achieve right now. (Just my personal perspective, have you tried another acme client such as certbot? If I recall correctly, Azure CLI is not required for DNS verification.)
Yep but it is ugly. In RHEl, Ubuntu, Debian there is no certbot plugin package for azure dns, installing azure-dns snap or playing around with pip under the root account is not really an option from security maintanance perspective. I hope someday someone do a proper package of certbot-azure-dns for these systems, like other dns providers for example digital ocean.
Describe the bug
Installing azure-cli-2.36.0-1.el8.x86_64 result in 730MB worth of files installed.
To Reproduce
the RPM itself is only 50MB (compressed):
There is probably a good reason for that many libraries to be shipped along, such as ensuring that the CLI is self contained and does not depend on system libraries, but it seems there is an abnormal amount of historical versions shipped along, such as:
so I wonder if there is ways to trim some of the package.
Expected behavior
Leaner package.
Environment summary
Installed using rpm from MS repo.