Install Google Cloud SDK on Red Hat/Fedora/CentOS

Exported on 22-Sep-2021 14:03:52

Install Google Cloud SDK On RHEL Based Linux Distros

This Blueprint Installs GCP SDK On Linux Systems Mentioned Below

The Google Cloud SDK is a set of components that you can use to create and manage resources on Google Cloud Platform, such as Compute Engine VM instances, as well as run App Engine apps. The SDK includes tools to help you develop locally by simulating the production environment, so you can test against real services in development mode before deploying your code.

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
Linux Node Linux / Unix Server linuxNode
Linux User Linux OS Credential linuxUser

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