# Configuring Google Cloud Platform Plugins

Google Cloud consists of a set of physical assets, such as computers and hard disk drives, and virtual resources, such as virtual machines (VMs), that are contained in Google's data centers around the globe.

Read more about Google Cloud here. (opens new window)

This How To will highlight some of the key steps to configuring the Google Cloud plugins included in our Rundeck Enterprise version. The background for these steps is covered in detail on Google's support site here: Creating and Managing Service Account Keys (opens new window).

# Pre-Requisites

This How To is based on the Rundeck Enterprise Welcome Projects.

  • Rundeck Welcome Project version 1.5
    (Rundeck Enterprise 3.4.4 is min product version)
  • Administrative access to a Google Cloud environment
  • Create at least one Virtual Machine Instance (opens new window) and note which Zone it is created in.

# Creating Service Account Keys

  1. Login to your Google Cloud Console at https://console.cloud.google.com (opens new window)
  2. Navigate to IAM & Admin > Service Accounts Service Accounts Menu

  3. Click the Create Service Account button to start the wizard Create Service Account

  4. Assign the account a Name and ID.
  5. When selecting Roles ensure the role(s) provide give the account enough access to perform the automation tasks you will want do from Rundeck.
  6. Click Done
  7. Click on the newly created account and navigate to the Keys tab.
  8. Click Add Key > Create new key
  9. Choose JSON for Key Type and click Create
  10. Save the JSON file somewhere safe where it can be used in a future step.

# Configuring Rundeck

# Confirming GCP Plugins are working

# Nodes

  1. Navigate to the Nodes section in the Welcome to Rundeck project.
  2. Search for nodes using tags: gcpcompute.
    If your Node Source is configured correctly and there are VMs in the configured zone they will be listed in the Nodes list.
GCP Nodes
GCP Nodes

# Job Steps

After confirming Nodes are being listed choose one that can safely be restarted. Choose wisely

  1. Navigate to the Jobs section in the Welcome to Rundeck project.
  2. Open Cloud Services > GCP > Node Steps > VM and choose Restart VM Instance.
  3. Select the node to be restarted and click Run Job Now.
Restart GCP Node
Restart GCP Node

# More Information