Installing gcloud in OpenSuse Tumbleweed
2024-03-10
Google Cloud Platform SDK are a set of tools and libraries that allows you to interact with Google Cloud products and services. For RHEL/Fedora Linux the instructions for installing directly from repositories are pretty straight forward, however this is not the case for OpenSuse. You can always try downloading the generic Linux zip files with the SDK current version, and manage the updates through gcloud components update. However this a manual process and I wanted to install it using Zypper on my OpenSuse Tumbleweed installation. With little changes on the RHEL repositories instructions, we can make Zypper to also use the same repository.
sudo tee -a /etc/zypp/repos.d/google-cloud-sdk.repo << EOM
[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
eneabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOM
This will install the repository in Zypper. We then refresh the repositories.
sudo zypper ref
And after that, simply install the SDK
sudo zypper install google-cloud-sdk
Check the version that was installed:
gcloud --version
That’s it. Enjoy!