Google GCloud Tools Installation¶
This guide will show you how to set up the Google SDK tools.
These tools are used by scripts in the next two steps that have to interact with google.
Unfortunately, these can't be installed in an automated fashion, so you will have to go through these manual steps, which are largely copy-paste.
It's assuming you're working through the steps from here and have completed the following steps:
- verified account drive permissions
- created the required project
- created the required group
-
Install the Google CLI tools. Enter these commands in your terminal:
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
sudo apt-get update && sudo apt-get install google-cloud-cli
-
Run the following command:
gcloud init --console-only
Follow the prompts:
Welcome! This command will take you through the configuration of gcloud. ... You must log in to continue. Would you like to log in (Y/n)? Y Go to the following link in your browser: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=32...X4&code_challenge_method=S256
-
Log into your Google account and approve the access request:
Copy the verification code.
-
Continue in the terminal:
Enter verification code: 4/1AX4XfWjkg8C8r...ujs332G8 You are logged in as: [YOUR_GOOGLE_ACCOUNT].
You will now be asked to choose a default project. Choose the one you created earlier.
Pick cloud project to use: [1] THE_PROJECT_YOUR_CREATED_FOR_SALTBOX [2] Create a new project Please enter numeric choice or text value (must exactly match list item): 1 Your current project has been set to: [THE_PROJECT_YOUR_CREATED_FOR_SALTBOX].
You may be asked to choose a default zone/region. If so, you can choose the closest to you.
-
Run the following command:
gcloud organizations list
Your organization ID will be displayed in the table:
DISPLAY_NAME ID DIRECTORY_CUSTOMER_ID YOUR-DOMAIN 123456789098 XXXXXXXXX ^^^ HERE ^^^
Make a note of that ID; if you're going through the manual rclone instructions you'll need it in the next step.
-
Google SDK is installed and configured.
If you have problems with these steps, Google's own documentation is found here
If you are going through the manual rclone instructions, continue with the next step