Rundeck GCP Nodes Plugin
This is a Resource Model Source plugin for Rundeck 3.x that provides Google Cloud Platform GCE Instances as nodes for the Rundeck Server.
If you're still running Rundeck v2.x, please use one of the releases labeled v2.7.1-2 or earlier. Think of it like "The Price is Right": you want the closest version of the plugin to what you're running without going over.
Download from the releases page.
rundeck-gcp-nodes-plugin-3.2.6-1.jar into your
You must also authenticate rundeck-gcp-nodes-plugin to your GCP project and will require a service account (SA) to do so:
- Log into your Google Cloud Platform console, go to the API & Services, then go to Credentials
- Hit Create Credentials, Service account. In the service account details, enter rundeck-gcp-nodes-plugin as the service account name.
- IAM roles required: Project
Browser& Compute Engine
- After creation of the SA, you may have to go in to see the details of the account and under Keys hit ADD KEY and create new key of JSON type.
- Rename the JSON file to
rundeck-gcp-nodes-plugin-PROJECTID.jsonand place it in /etc/rundeck/ (replace
PROJECTIDwith your GCP project id)
- Restart Rundeck
You will need to add the following labels to your GCP VMs if you want more accurate/meaning full values for the OS (because unfortunately, there currently isn't that data in a standalone field/value that describes that for your VM -- just look at the output of
gcloud compute instances describe):
environment(example value: prod)
osfamily(example value: linux)
osname(example value: rhel7)
*** No longer a requirement from
v2.7.1-2 onward ***
By default, your connection string (denoted by the
User @ Host column in your project nodes page) is
rundeck@hostname, but if you want it to show IP instead you can set the
hostname.selector attribute to
accessConfigs for internal and external(NAT) IPs respectively
Only Running Instancesin the resource config doesn't work, it will always report the nodes regardless of state.
If plugin isn't listing your VMs if unless they have an External IP, you can do the following workaround (until I have time to put in a proper fix):
- In Node Sources, set
Use Default Mappingto
- Specify your own
Mapping Params(delimited by semi-colon). Common setup would be:
My work is built off of the work done by jameshcoppens and I've only branched it off to updated/maintain it seeing as there are typos in the README that has gone unaddressed and hasn't been updated for 4+ years. There were some functionality/features I wanted to add for my own use (and at work) so here we are... :)