Summary

Google Cloud Platform is a suite of cloud computing services which include virtual machines, data storage, data analytics, machine learning and more.

Hakuna Cloud can start, stop or recreate virtual machines from the Google Cloud Compute Engine service using different configurable triggers. In Hakuna Cloud terms, a virtual machine is called an instance.

Flavour: gcp

Requirements

Hakuna Cloud supports any virtual machine, either regular or preemptible, of any size from any region.

Supported triggers

Trigger Supported Description
HTTP/HTTPS ModProxy Switch on the instance if an HTTP/S request is received
Metrics Switch off the instance if the CPU is low
Schedule Switch on or off the instance following a predefined schedule
SSH Enable SSH connection (eg: git)

Supported stop status

Status Description Billing Status
STOPPED VM instance state is stopped. A stopped instance does not incur charges, but all of the resources that are attached to the instance will still be charged, like persistent disks, snapshots, etc.
TERMINATED VM instance state is terminated. Google does not bill VM resources once the VMs are in a TERMINATED state.

Configuration

Create a provider

The following table shows how the Google Cloud Platform credentials are represented in Hakuna Cloud

Key Value Example
Project ID String sunny-shadow-001985
Key String ~/mysecrets/google-cloud/key.json

Provider creation with hakuna

A Cloud Provider in hakuna is called simply provider. To create and configure a provider for Google Cloud Platform follow the instructions below:

  1. Open a terminal and run hakuna provider create

You will be asked to choose from all available providers, a.k.a. flavours.

  1. Choose gcp

  2. Choose a name for the cloud provider, for example “My Google Cloud Account”

  3. Choose the Project ID that your VM is part of

Refer to the Google Cloud documentation to find out how to identify the project ID.

  1. Absolute path to the key file

The tool will validate your input and save the newly created provider. You can find the new provider among the results of hakuna provider list.

Add a VHost

Hakuna Cloud supports virtual machines (VMs) from the Google Cloud Compute Engine service. To let Hakuna Cloud manage a virtual machine, after creating the provider you need to create a VHost:

  1. Open a terminal and run hakuna vhost create
  2. Choose gcp from the list of available flavours
  3. Choose your previously created provider, say “My Google Cloud Account”
  4. The tool will show you a list of available VMs. Pick the one you want to manage with Hakuna
  5. Specify a domain name for that VM