Integrate with Google Cloud Using the Welcome Project
Integrate with Google Cloud Using the Welcome Project
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.
This How To will highlight some of the key steps to configuring the Google Cloud plugins included in our Runbook Automation version. The background for these steps is covered in detail on Google's support site here: Creating and Managing Service Account Keys.
Pre-Requisites
This How To is based on the Runbook Automation Welcome Projects.
- Rundeck Welcome Project version 1.5
(Runbook Automation 3.4.4 is min product version) - Administrative access to a Google Cloud environment
- Create at least one Virtual Machine Instance and note which Zone it is created in.
Authentication & Configuration
Follow the steps outlined in the Google Cloud Integration Overview doc to configure credentials for the GCP plugins. Credentials can be configured on a per Project basis or for the entire Runbook Automation system.
Configuring Runbook Automation
- Login to Rundeck as
admin
. - Open the Welcome to Rundeck project entry.
- Open the Key Storage entry from the Project Settings menu.
- Select the
gcp-access-key.json
and click Overwrite Key. - In the dropdown select Upload File and choose the JSON file from the earlier steps.
- Click Save
- Open the Welcome to Rundeck project.
- Open Project Settings > Edit Nodes.
- Click on the Sources tab.
- Click Edit on the GCP Cloud / Resource Model
- Enter the Project ID from your GCP Project.
- Select the Zone where this Node Source will gather a list of Compute VMs from.
- Leave the Key Path set to
keys/project/welcome-project/gcp-access-key.json
- Open System Menu (gear icon) > System Configuration.
- Using the filter at the top enter
gcp
to list just the GCP Plugin Configurations. - Leave the GCP Access Key Path entry as
keys/project/welcome-project/gcp-access-key.json
. - Gather the Project ID from your GCP Project.
- Enter a Zone that can be used by default. Job Steps can override the zone at each step or dynamically per node on Node Steps.
- Click Save
Confirming GCP Plugins are working
Nodes
- Navigate to the Nodes section in the Welcome to Rundeck project.
- 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.
Job Steps
After confirming Nodes are being listed choose one that can safely be restarted. Choose wisely
- Navigate to the Jobs section in the Welcome to Rundeck project.
- Open Cloud Services > GCP > Node Steps > VM and choose Restart VM Instance.
- Select the node to be restarted and click Run Job Now.