WHMCS Google Cloud Installation Guide & Documentation

From WHMCS Global Services Module Documentation
(Redirected from WHMCS Google Cloud)
Jump to: navigation, search

About Module

The Google Cloud VPS Module helps to fully automate and control the Google Cloud instances directly on WHMCS. This module is best suited for users looking to automate Google cloud server and to navigate and manage the status of virtual machines end-to-end.

As an administrator, you can access the control panel features, view VM logs, add multiple Google API accounts, and modify resources including regions, images, disk type, zone etc. through the WHMCS admin area. Additionally, the module also empowers your clients to start/stop/reboot servers, update SSH key, reset windows server password and helps to get detailed information about the servers including the status and IP addresses. To efficiently run your business, use Google Cloud VPS Module to supervise, control and automate every single virtual machine instance.

Installation Instructions

Step 1. Log in to the WGS client area and download the Google Cloud VPS module files.

Step 2: Extract the zip file.

Step 3: Now upload the extracted files in the WHMCS directory.

Step 4: Connect FTP or cPanel.

Step 5: Go to the extracted module and open “modules/addons/wgsgcloud”, upload the “wgsgcloud” folder in your WHMCS directory “/public_html/modules/addons”

WGS Cloud Files Extract.png

Step 6: Go to extracted module and open "modules/servers/wgsgcloud", upload the “wgsgcloud” folder in your WHMCS directory “/public_html/modules/servers”

WGS Google Cloud Server Upload.png

Step 7: Login WHMCS Admin, Goto Setup > Addon Modules

Step 8: Activate WGS Google Cloud

WHMCS-Addons (1).jpg

Step 9: Click on Configure and add license key.

Step 10: Provide access to user groups and save the changes. The module is now successfully installed.

Configuration of Server

We need to set up access to the Google cloud servers, here is the process you need to follow to do the same.

Step 1: Log in to Google Cloud Platform using your account: https://console.cloud.google.com/

Step 2: Click on the “Go to API’s Overview”

API overview google cloud vps whmcs.jpg

Step 3: Enable the API’s and Services ('Compute Engine API ' and ' Cloud Resource Manager API')

Compute-Engine-API-–-APIs-Services-–-whmcs-–-Google-Cloud-Platform.jpg
Cloud-Resource-Manager-API-–-APIs-Services-–-whmcs-–-Google-Cloud-Platform.jpg

Step 4: Go to Credentials section

APIs-Services-–-APIs-Services-–-My-First-Project-–-Google-Cloud-Platform credentials.jpg

Step 5: Click on Create Credentials

Credentials-–-APIs-Services-–-My-First-Project-–-Google-Cloud-Platform.jpg

Step 6: Select “Service Account” type

Credentials-–-APIs-Services-–-My-First-Project-–-Google-Cloud-Platform service account.jpg

Step 7: Enter Service Account Name, ID and Description and click on create.

Create-service-account-–-IAM-Admin-–-My-First-Project-–-Google-Cloud-Platform.jpg

Step 8: Select the Role as “Compute Admin” and then click on continue.

Create-service-account-–-IAM-Admin-–-My-First-Project-–-Google-Cloud-Platform compute admin.jpg

Generate the API key

The credential has been successfully created.

Now its time to generate the API key which will connect the WHMCS with the Google Cloud.

Step 1:Go to Credentials and find the credential you have just created.

Credentials-–-APIs-Services-–-My-First-Project-–-Google-Cloud-Platform (1).jpg

Step 2: Edit the credential

Step 3:Generate a new API key

WGS-Account-Testing-–-IAM-Admin-–-My-First-Project-–-Google-Cloud-Platform.jpg

Step 4: Select Key type as “Json” and click on create.

WGS-Account-Testing-–-IAM-Admin-–-My-First-Project-–-Google-Cloud-Platform (1).jpg

That is all for setting up the server end of the Google Cloud API.

Creating OAuth 2.0 Client IDs

Step 1: Go to:https://console.cloud.google.com/

Step 2: Go to “credentials”.

APIs-Services-–-APIs-Services-–-My-First-Project-–-Google-Cloud-Platform credentials.jpg

Step 3: Click on Create Credentials and Select “OAuth 2.0 Client IDs”

Credentials-–-APIs-Services-–-My-First-Project-–-Google-Cloud-Platform (2).jpg

Step 4: Set Web Application as Application type, Name, Add URL’s

Create-OAuth-client-ID-–-APIs-Services-–-My-First-Project-–-Google-Cloud-Platform.jpg

Step 5: After clicking on Create Client ID and Client Secret key will be generated.

My-First-Project-–-Google-Cloud-Platform.jpg

Setting up Products in WHMCS

Step 1: Now Login WHMCS Admin go to Addons > WGS Google Cloud

Image (3).png


Step 2: Go to Settings

WHMCS - WGS Google Cloud.png


Step 3: Click on Add Google Api

WHMCS - WGS Google Cloud (1).png


Step 4: Add the connection name, Client ID, Client Secret key that you have generated in the previous step. Also add the Call Back URL and click on Submit.

WHMCS - WGS Google Cloud (2).png

Step 5: Click on Submit after filling the data.

Step 6: It will ask access to your google account and you need to allow the access.

Sign-in-–-Google-accounts.jpg

The API will be successfully enabled.

WHMCS - WGS Google Cloud (3).png


Now let’s start setting up the products in WHMCS.

Step 1: Login WHMCS admin, Go to Products and Services, Create a new product group

WHMCS-Products-Services.jpg

Step 2: Add product group name and select the order form and save the changes.

WHMCS-Products-Services (1).jpg

Step 3: Now let’s add a product in the product group.

WHMCS-Products-Services (2).jpg

Step 4: Set product type, group name, module, and click on continue.

WHMCS-Products-Services (1).jpg

Step 5: Go to Modules Settings

Module settings.png

Step 6: Select the API you have created.

Step 7: Select the project

Step 8: Select the Zone

Step 9: Select Machine Type

Step 10: Select Disk Type

Step 11: Set Disk Size

Step 12: Select Network Tier

Step 13: Save the changes, your product has been successfully created.

Setting CRON in WHMCS

Step 1: Now Login cPanel Admin and go to CRON Jobs

Screenshot-shinedezign.pro 2083-2022.05.20-16 35 55.png


Step 2: Add CRONs for 'Send windows password' and 'Rebuilt VM'.

       1) SITE_URL/modules/servers/wgsgcloud/crons/windows-password.php 	
       2) SITE_URL/modules/servers/wgsgcloud/crons/rebuilt-vm.php
Screenshot-shinedezign.pro 2083-2022.05.20-16 41 17.png