Install Google Cloud SDK on Red Hat/Fedora/CentOS

Exported on 27-Aug-2021 17:02:34

Install Google Cloud SDK On RHEL Based Linux Distros

This Blueprint Installs GCP SDK On Linux Systems Mentioned Below
Pre-Blueprint Attune setup
  1. On the Inputs tab, create a Linux node for the host you wish to install the stack on.
  2. On the Inputs tab, create Linux credentials to connect to the host you wish to install the stack on.
Supported Operating Systems:
  • Fedora
  • Red Hat
  • CentOS

Parameters

Name Type Script Reference Default Value Comment
server_credential Linux OS Credential server_credential
server_host Linux / Unix Server server_host

1 - Install DNF

DNF is the next upcoming major version of Yum

This step installs latest version of DNF in the target machine.

The connection details have changed from the last step.

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
sudo yum -y install dnf

2 - Update DNF repos

Update DNF with Cloud SDK repo information

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
sudo tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM
[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOM

3 - Start Installation of the Cloud SDK

Installs the Cloud SDK

Once the installation has finished, you can run "gcloud init" and complete the authentication process to begin using Google Cloud CLI.

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
sudo dnf install -y google-cloud-sdk