WHMCS Google Cloud Installation Guide & Documentation
Contents
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”
Step 6: Go to extracted module and open "modules/servers/wgsgcloud", upload the “wgsgcloud” folder in your WHMCS directory “/public_html/modules/servers”
Step 7: Login WHMCS Admin, Goto Setup > Addon Modules
Step 8: Activate WGS Google Cloud
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”
Step 3: Enable the API’s and Services ('Compute Engine API ' and ' Cloud Resource Manager API')
Step 4: Go to Credentials section
Step 5: Click on Create Credentials
Step 6: Select “Service Account” type
Step 7: Enter Service Account Name, ID and Description and click on create.
Step 8: Select the Role as “Compute Admin” and then click on continue.
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.
Step 2: Edit the credential
Step 3:Generate a new API key
Step 4: Select Key type as “Json” and click on create.
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”.
Step 3: Click on Create Credentials and Select “OAuth 2.0 Client IDs”
Step 4: Set Web Application as Application type, Name, Add URL’s
Step 5: After clicking on Create Client ID and Client Secret key will be generated.
Setting up Products in WHMCS
Step 1: Now Login WHMCS Admin go to Addons > WGS Google Cloud
Step 2: Go to Settings
Step 3: Click on Add Google Api
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.
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.
The API will be successfully enabled.
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
Step 2: Add product group name and select the order form and save the changes.
Step 3: Now let’s add a product in the product group.
Step 4: Set product type, group name, module, and click on continue.
Step 5: Go to Modules Settings
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
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