Can I install and run multiple versions of gcloud (google cloud sdk) on one computer?

Opportunities and options in gcloud are sometimes deprecated / removed. If CI depends on it, and refactoring is not an option, and at the same time we need to use the new features that appear in later releases, can we have several versions of gcloud installed on the same machines and used simultaneously?

+4
source share
1 answer

There are several ways to install the Cloud SDK on your computer. For this, it is probably the easiest way to download the package version from https://cloud.google.com/sdk/downloads#versioned .

,

gsutil cp gs://cloud-sdk-release/google-cloud-sdk-VERSION-linux-x86_64.tar.gz .

VERSION (, "161.0.0" ). wget curl .

/ ,

mkdir -p ~/cloudsdk/161.0.0
tar xzf google-cloud-sdk-161.0.0-linux-x86_64.tar.gz -C ~/cloudsdk/161.0.0

:

mkdir -p ~/cloudsdk/130.0.0
tar xzf google-cloud-sdk-130.0.0-linux-x86_64.tar.gz -C ~/cloudsdk/130.0.0

gcloud

~/cloudsdk/161.0.0/google-cloud-sdk/bin/gcloud components list

~/cloudsdk/130.0.0/google-cloud-sdk/bin/gcloud components list

, . , , , . Cloud SDK gcloud, CLOUDSDK_CONFIG, gcloud. :

$ CLOUDSDK_CONFIG=~/.config/gcloud-legacy ~/cloudsdk/130.0.0/google-cloud-sdk/bin/gcloud
+4

Source: https://habr.com/ru/post/1680965/


All Articles