Google Compute

Version: 2.0.0

Google Cloud Engine (GCE) is an Infrastructure as a Service (IaaS) offering that allows clients to run workloads on Google's physical hardware. Google Compute Engine provides a scalable number of virtual machines (VMs) to serve as large compute clusters for that purpose.

Connect Google Compute with LogicHub

GCE Authentication

We can access Google compute using Google service account credentials. The following details are required for that:

  1. Google service account credentials file. This JSON file can be created/Downloaded from https://console.cloud.google.com/iam-admin/serviceaccounts.

  2. Navigate to Automations > Integrations.

  3. Search for Google Compute.

  4. Click Details, then the + icon. Enter the required information in the following fields.

    • Label: Enter a connection name.
    • Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
    • Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
    • Remote Agent: Run this integration using the LogicHub Remote Agent.
    • JSON Credentials: Copy the Google credentials content JSON file that you would like to use.
  5. After you've entered all the details, click Connect.

Actions for Google Compute

Launch Instance

Launch a compute instance with google compute. The following are the inputs needed to launch an instance:

  • Google Project Name: Name of your Google project.
  • Zone: Regional zone in which we want to launch the instance. Example: ‘asia-south1-c’
  • config: A JSON config with the instance configuration details. An example config looks like this: {'name': 'instance_name', 'machineType': 'zones/asia-south1-c/machineTypes/f1-micro', 'disks': [{'boot': True, 'autoDelete': True, 'initializeParams': {'sourceImage': 'https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-9-stretch-v20191014'}}], 'networkInterfaces': [{'network': 'global/networks/default', 'accessConfigs': [{'type': 'ONE_TO_ONE_NAT', 'name': 'External NAT'}]}], 'metadata': {'items': [{'key': 'url', 'value': 'http://storage.googleapis.com/gce-demo-input/photo.jpg'}, {'key': 'text', 'value': 'sample_value'}, {'key': 'bucket', 'value': 'bucket_name'}]}}

Input Field

1780

Output

1800

Stop Instance

Stop an instance with an instance name. The following are the inputs needed to stop an instance:

  • Google Project Name: Name of your Google project.
  • Zone: Regional zone in which we want to launch the instance. Example: ‘asia-south1-c’.
  • Instance Name: Name of the instance you wish to stop.

Input Field

1808

Output

1806

Release Notes

  • v2.0.0 - Updated architecture to support IO via filesystem

© 2017-2021 LogicHub®. All Rights Reserved.