I have a regular cloudshell and I keep running out of disk space when using this repo (because of go deps?)
srcc-chekh opened this issue · 1 comments
e.g.
alex@cloudshell:~/src/hpc-toolkit (project-name-redacted)$ ./gcluster deploy cluster-name-redacted
Initializing deployment group cluster-name-redacted/primary
Error: exit status 1
Error: Failed to install provider
Error while installing hashicorp/google-beta v5.31.1: write
.terraform/providers/registry.terraform.io/hashicorp/google-beta/5.31.1/linux_amd64/terraform-provider-google-beta_v5.31.1_x5:
no space left on device
Hint: initialization of deployment group cluster-name-redacted/primary failed; manually resolve errors
alex@cloudshell:/src/hpc-toolkit (project-name-redacted)$ pwd/src/hpc-toolkit (project-name-redacted)$ df -h .
/home/alex/src/hpc-toolkit
alex@cloudshell:
Filesystem Size Used Avail Use% Mounted on
/dev/disk/by-id/google-home-part1 4.8G 4.6G 0 100% /home
I think the overall go deps and stuff are bigger than default cloudshell homedir disk size (~4.8GB)
I'll try to delete everything else I have there but this is not the first time I bumped into this.
After "go clean -modcache" it seems to work like every other time.
Hey @srcc-chekh, thanks for reaching out.
I just started with a clean cloud shell environment and ran through the quick start instructions. It looks like a clean install of Cluster Toolkit (formerly HPC Toolkit) takes 1.4G or about 30% of the 4.8G provided.
It is true that over time we update go dependencies. When rebuilding new versions of Cluster Toolkit the accumulation of dependencies can cause Cloud Shell to run out of space.
You have already performed what would be my first recommendation, to run go clean -modcache
, which clears the module download cache and frees up space.
Warning
Instructions at link below will cause loss of any data stored on Cloud Shell.
You can also fully reset your cloud shell using the instructions found here https://cloud.google.com/shell/docs/resetting-cloud-shell.
I recongnize that those solutions may not work for everyone. While Cloud Shell is a great environment to get started in, it is not optimal for all situations. Other options can be to set up a dedicated VM for deployment or use https://cloud.google.com/workstations?hl=en. When setting up your own environment make sure to install the required dependencies: https://cloud.google.com/cluster-toolkit/docs/setup/install-dependencies.
From my testing
# Clean Cloud Shell
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/disk/by-id/google-home-part1 4.8G 76K 4.6G 1% /home
$ git clone https://github.com/GoogleCloudPlatform/cluster-toolkit
$ cd cluster-toolkit
$ make
$ make install
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/disk/by-id/google-home-part1 4.8G 1.4G 3.2G 31% /home