A comprehensive WHMCS provisioning module for HiTechCloud that enables partners to sell virtual machines to their customers.
- VM Lifecycle Management: Create, suspend, unsuspend, and terminate VMs
- Customer Self-Service: Start, stop, restart VMs and access VNC console
- Dynamic Resource Loading: Fetch flavors, images, and networks directly from HiTechCloud API
- Configurable Options: Auto-generate WHMCS configurable options from HiTechCloud resources
- Auto-Updates: Automatic update checking and one-click installation
- Multi-Region Support: Support for multiple regions/projects
- WHMCS 8.0 or higher
- PHP 7.4 or higher
- HiTechCloud account with API access
- Application Credentials from HiTechCloud CMP
- Download the latest release from Releases
- Extract the ZIP file
- Upload the
modulesfolder to your WHMCS root directory - Go to Setup → Addon Modules and activate "HiTechCloud Manager"
- Go to Setup → Products/Services → Servers and add a new server
cd /path/to/whmcs
git clone https://github.com/Leapswitch-Networks/hitechloud-whmcs.git temp_hitechloud
cp -r temp_hitechloud/modules/* modules/
rm -rf temp_hitechloud-
Go to Setup → Products/Services → Servers
-
Click Add New Server
-
Configure:
- Name: HiTechCloud (or your preferred name)
- Hostname: Your CMP hostname (e.g.,
cmp.dashboard.controlcloud.app) - Username: Application Credential ID
- Password: Application Credential Secret
- Access Hash: Project path (e.g.,
/openstack/14) - Type: hitechloud
- Secure: ✓ (checked for HTTPS)
-
Click Test Connection to verify
- Log into HiTechCloud Cloud Management Platform
- Navigate to your project
- Go to Identity → Application Credentials
- Create new credentials with appropriate roles
- Copy the Credential ID and Secret
- Create a new product or edit existing
- Go to Module Settings tab
- Select HiTechCloud as the module
- Configure:
- Flavor: Select or enter flavor UUID
- Image: Select or enter image UUID
- Network: Select or enter network UUID
- Security Groups: Comma-separated list
For each HiTechCloud product, you must create 3 custom fields to store VM information:
- Go to Setup → Products/Services → Products/Services
- Edit your HiTechCloud product
- Go to Custom Fields tab
- Create the following fields:
| Field Name | Field Type | Description | Admin Only |
|---|---|---|---|
VM ID |
Text Box | Stores the OpenStack server UUID | Yes |
Public IPv4 |
Text Box | Stores the VM's public IPv4 address | Yes |
Public IPv6 |
Text Box | Stores the VM's public IPv6 address | Yes |
Important: The field names must match exactly as shown above (case-sensitive).
Access via Addons → HiTechCloud Manager:
- Flavors Tab: View and load flavors from API
- Images Tab: View and load images from API
- Networks Tab: View and load networks from API
- Config Options Tab: Auto-generate WHMCS configurable options
- Updates Tab: Check for and install module updates
The module checks for updates from this GitHub repository. To update:
- Go to Addons → HiTechCloud Manager
- Click Updates tab
- If an update is available, click Install Update
Updates are downloaded directly from GitHub releases.
modules/
├── addons/
│ └── hitechloud_admin/
│ └── hitechloud_admin.php # Admin management module
└── servers/
└── hitechloud/
├── hitechloud.php # Main provisioning module
├── hooks.php # WHMCS hooks
├── lib/
│ ├── hitechloudAPI.php # API client
│ └── hitechloudHelper.php # Helper functions
└── templates/
├── overview.tpl # Client area template
├── no_vm.tpl # No VM template
└── error.tpl # Error template
The HiTechCloudAPI class provides these methods:
authenticate()- Authenticate with Application CredentialstestConnection()- Test API connectivity
listFlavors()- List available flavorsgetFlavor($id)- Get specific flavorcreateServer($params)- Create a new VMgetServer($id)- Get VM detailsdeleteServer($id)- Delete a VMstartServer($id)- Start a VMstopServer($id)- Stop a VMrebootServer($id)- Reboot a VMsuspendServer($id)- Suspend a VMresumeServer($id)- Resume a VMresizeServer($id, $flavorId)- Resize a VMgetVncConsole($id)- Get VNC console URL
listImages()- List available imagesgetImage($id)- Get specific image
listNetworks()- List available networkslistSecurityGroups()- List security groupsassignFloatingIP($serverId, $networkId)- Assign floating IP
listVolumeTypes()- List volume typesgetVolume($id)- Get volume detailscreateBootVolume($name, $imageId, $size)- Create boot volumeextendVolume($id, $newSize)- Extend volume size
- Ensure the Access Hash includes your project path (e.g.,
/openstack/14) - The authentication URL should be:
https://hostname/openstack/14/v3/auth/tokens
- Verify Application Credential ID and Secret
- Check that credentials have appropriate permissions
- Ensure the project path is correct
- Verify server connection in Setup → Servers
- Check that the API endpoints are accessible
- Review WHMCS module debug logs
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: Wiki
See CHANGELOG.md for version history.