Personal tools


OpenStack Projects For WHMCS

From ModulesGarden Wiki
Jump to: navigation, search


About OpenStack Projects For WHMCS

OpenStack Projects For WHMCS is a module that will allow you to provision virtual projects to your customers in a fully automatic manner.
The module has been designed in such a way that your customers can place orders and overview them in the client area.
As an administrator, you are equipped with all key features to keep track of your customers’ projects.
  • Admin Area Features:
✔ Create/Suspend/Unsuspend/Terminate OpenStack Projects
✔ Change Package
✔ Log In To Panel:
✔ With Single Sign-On Support To Virtuozzo Hybrid Infrastructure
✔ View Created Project/User/Domain IDs
✔ Set Up Project Configuration:
✔ Define Default Domain
✔ Define Client Projects Mode:
✔ Default
✔ Only One Domain Per Client
✔ With Domain Permissions
✔ Without Domain Permissions
✔ Only One Domain And User Per Client
✔ Define User Roles
✔ Enable Empty User Password
✔ Provide OpenStack Panel Web Address
✔ Provide Default Domain/Project/User Name
✔ Select WHMCS Domain Filed Content:
✔ Project Name
✔ Domain Name
✔ Disabled
✔ Select Client Area Login Information
✔ Toggle Logging API Requests
✔ Set Up Limits For:
✔ Compute
✔ Block Storage
✔ Network
✔ Load Balancer
✔ Container Infrastructure
✔ Kubernetes
✔ Traits (OpenStack) / Placement Groups (Virtuozzo)
✔ QoS Policy - Minimum Bandwidth Rate Rules
✔ QoS Policy - Maximum Bandwidth Limit Rules
✔ Set Up Module Custom Web And Shell Hooks
✔ Set Up Usage Billing Settings
✔ Set Up Configurable Options Settings
✔ Generate Configurable Options
✔ Set Up OpenID Connect For Single Sign-On To Virtuozzo Hybrid Infrastructure
✔ Run Server Connection Test
  • Client Area Features:
✔ View Project Details:
✔ Web Address
✔ Domain
✔ Username
✔ Password
✔ Log In To Panel
✔ With Single Sign-On Support To Virtuozzo Hybrid Infrastructure
  • Configurable Options:
✔ Backup Gigabytes
✔ Backups
✔ Cores
✔ Fixed IP Addresses
✔ Floating IP Address
✔ Floating IP Addresses
✔ Gigabytes
✔ Groups
✔ Hard Limit
✔ Health Monitor
✔ Injected File Content [Bytes]
✔ Injected File Path [Bytes]
✔ Injected Files
✔ Instances
✔ Key Pairs
✔ Listener
✔ Load Balancer
✔ Member
✔ Metadata Items
✔ Network
✔ Per Volume Gigabytes
✔ Pool
✔ Port
✔ QoS Minimum Bandwidth Rates Rules
✔ QoS Maximum Bandwidth Limit Rules
✔ RAM [MB]
✔ Role-based Access Control Policy (RBAC Policy)
✔ Router
✔ Security Group
✔ Security Group Rule
✔ Security Group Rules
✔ Security Groups
✔ Server Group Members
✔ Server Groups
✔ Snapshots
✔ Subnet
✔ Subnet Pool
✔ Traits (OpenStack) / Placement Groups (Virtuozzo)
✔ Volumes
  • Required Components:
✔ Gnocchi (Required For Billing)
  • General Info:
✔ Integrated With Advanced Billing For WHMCS - Actual Project Resource Usage Billing
✔ Integrated With Products Reseller For WHMCS - End-To-End Solution For Products And Servers Reselling
✔ Multi-Language Support
✔ Supports Latest Stable OpenStack and Previous
✔ Supports OpenStack Gnocchi
✔ Supports Virtuozzo Hybrid Infrastructure
✔ Supports PHP 8.1 Back To PHP 7.4
✔ Supports WHMCS Metric Billing - Integration: CPU, Compute Instance Booting Time, Disk Device Read Bytes, Disk Device Read Requests, Disk Device Write Bytes, Disk Device Write Requests, Disk Ephemeral Size, Disk Root Size, Floating IP Addresses, IP Addresses, Load Balancers, Memory, Memory Usage, Network Incoming Bytes, Network Incoming Packets, Network Outgoing Bytes, Network Outgoing Packets, OS Images, VCPUs, Volume Size, Volumes Usage
✔ Supports WHMCS Themes "Six" And "Twenty-One"
✔ Supports WHMCS V8.8 Back To WHMCS V8.6
✔ Requires ionCube Loader V12 Or Later
✔ Easy Module Upgrade To Open Source Version

Installation and Configuration

This tutorial will show you how to successfully install and configure OpenStack Projects For WHMCS smoothly.

We will guide you step by step through the whole installation and configuration process.


1. Log in to our client area and download the module.
OSP 1.png
2. Upload and extract the extension into the main WHMCS directory.

Extracted files in your WHMCS directory should look like this:

OSP 2.png
3. When you install OpenStack Projects For WHMCS for the first time, you have to rename the 'license_RENAME.php' file.

The file is located in '/yourWHMCS/modules/servers/OpenStackProjects/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

OSP 3.png
4. In order to configure your license key, you have to edit the previously renamed 'license.php' file.

Enter your license key between the quotation marks as presented on the following screen.
You can find your license key in our client area → 'My Products'.

OSP 4.png
5. Now, set up the 'storage' folder as recursively writable.

This folder is available at '/yourWHMCS/modules/servers/OpenStackProjects/'.

OSP 5.png

Configuration of Server

Before you can go on, you need to copy your 'API Details' . You will need them to connect with the server successfully.

Proceed to your 'OpenStack' panel. All necessary information will be found in the 'View Credentials' section under 'API Access' .

OSP 6.png
6. Now, log in to your WHMCS and proceed to 'Setup' 'Products/Services' 'Servers' and press 'Add New Server'.
OSP 7.png
7. Next, enter your server 'Name' , 'Hostname' , 'IP Address' and select 'Openstack Projects' from the 'Module' field.

Now, provide your 'OpenStack Server Details' . To download the 'Identity Version' , you need to click 'Get Versions' next to 'Identity Port/Path' .
Make sure that your server connection is correct and save changes.

OSP 8.png
Integration with Virtuozzo Hybrid Infrastructure

If you you use Virtuozzo Hybrid Infrastructure (VHI) – OpenStack from Virtuozzo, please use the following guide:

1. WHMCS server must have access to VHI OpenStack API, please open the required ports according to the guide

2. Configure OpenStack endpoint OpenStack endpoint

3. Use system admin or domain admin credentials to access the cluster from WHMCS side:

  • Name: any name
  • Hostname: VHI domain name
  • Module: OpenStack Projects
  • Username: admin
  • Identity Port/Path: 5000
  • Identity Version: V3
  • Domain: Default
  • Project ID: ID of the “admin” project from the Default domain
  • Secure: Yes

Use the above data to fill out the server creation form in the WHMCS admin area.

OSP 8 1.png
8. It is time to create a server group. To do so, click on 'Create New Group' .
OSP 9.png
9. Enter a name, click on your previously created server, press 'Add' and afterward 'Save Changes' .
OSP 10.png

Configuration of Product

10. In order to create and configure a product, go to 'Setup' 'Products/Services' 'Products/Services'.

Click on 'Create a New Group'.

OSP 11.png
11. Enter your product group name and press 'Save Changes'.
OSP 12.png
12. Once you have a product group, you can create a new product.

To do so, first click on 'Create a New Product'.

OSP 13.png
13. Afterward, choose your product type, enter your product name, choose module and the product group from the dropdown menus. Press 'Continue'.
OSP 14.png
14. Now, go to the 'Module Settings' section, choose your previously created server group from the dropdown menu.

If you did not set the proper permissions, you will be asked to do it now.

OSP 15.png
15. Now, let's start configuring the settings.

Note: The below description refers to the "VHI" product configuration.


  • Default Domain - choose a default domain for new projects based on this product.
  • Client Projects Mode - select a preferred mode that defines how new hostings will be created.
  • Project User Roles - define default roles for a new user. Keep in mind that the choice of roles determines the level of allowed permissions. For example, select the image_upload role if you wish to be allowed to upload OS images.
    • Inherit Domain Roles - enable if the Domain User Role should be inherited from the Project User Roles or defined separately.
      Note that this option is dependent on the 'Default Domain' setting. More about User Roles can be found here.
    • Domain User Roles - if the above 'Inherit Domain Roles' is disabled, this setting appears; here you may choose a default role in the domain for a new user based on this product.
      This setting, if not left empty, overwrites the 'with and without domain permissions' selections in the 'Client Projects Mode' option
  • Empty User Password - enable to set an empty password after project creation, the feature is particularly useful for authentication with the OpenID protocol
  • OpenStack Panel Web Address - is the web address for the login page to the OpenStack panel.
  • Default Domain Name - enter a domain that will be used when the domain name is not provided. Available variables: {clientId}, {serviceId} and {rand}
  • Default Project Name - enter a project name that will be used when creating a new project. If left empty, the domain name will be used instead. Available variables: {clientId}, {serviceId} and {rand}
  • Default User Name - enter a user name that will be used when creating a new user. Available variables: {clientId}, {serviceId} and {rand}
  • Domain Field Content - specify the content data that will overwrite the WHMCS Domain Field
  • Client Area Login Information - select which of the login elements should be visible in the "Server Information" table in the client area. Choose from: username, password, domain and web address.
  • Log API Requests - if you enable, information on API requests will be stored in the 'Module Log' section in your WHMCS
OSP 16.png

Compute, Block-Storage, Network, Load Balancer, Container Infrastructure, Traits, QoS Policy: 'Minimum Bandwidth Rate Rules' and 'Bandwidth Limit Rules' -
these sections may vary depending on the project, some of them might be unavailable for your OpenStack project. You may easily adjust your product to your needs by modifying the available options. Type '-1' for unlimited.
Note: Keep in mind that in the case of Virtuozzo server 'Traits' stand for 'Placement Groups' endpoints.

OSP 16 1.png

Module Custom Web Hooks - here you may add the URL with WHMCS parameters to perform additional actions after the create/suspend/unsuspend/terminate/change package actions.

OSP 16 2.png

Module Custom Shell Hooks - enter the commands with WHMCS parameters to perform additional actions after the create/suspend/unsuspend/terminate/change package actions.
Please refer to the following section to correctly set up the openID configuration to connect to VHI correctly.

OSP 16 0.png
16. Optionally, you may configure the "Usage Billing Settings" that will be utilized for the Advanced Billing For WHMCS integration.

Select specific networks and IP address versions for custom parameter calculations.

OSP 16 4.png
17. At the end of the configuration process, you can enable 'Metric Billing' and decide whether you want to generate configurable options for the product.

Configurable options can be used by your clients to select each virtual machine parameter individually during order placement.
Otherwise, if configurable options are not defined, then the fixed parameters specified in the earlier configuration will be used instead.
If you decide to use configurable options, select the configurable options unit and then press the 'Create Configurable Options' button.

There is also an 'Alternative Mode' available, which changes the way the configurable options values are verified and calculated.
Select single configurable options and their values will be summed with the default product configuration values instead of overwriting them.

OSP 16 3.png
OSP 17.png
Now, select which options you want to generate and confirm by clicking 'Create' .
Note that the configuration for disabled options will still be taken from the configuration of the main product.
More information about how to use configurable options can be found here or in the official WHMCS documentation.
OSP 18.png

User Roles Configuration

Roles, or in other words permissions, in OpenStack can be assigned to users, they can be associated with either a domain or a project.
  • Domain - on top of the hierarchy in OpenStack, domain includes all projects and users
    • User - a user can have domain roles and project roles assigned, when you log into OpenStack, you log into a user
    • Project - projects are created with the OpenStack Project For WHMCS module. It includes all remaining elements that are visible after logging into the user's panel, for example: virtual machines or networks
Move to 'Products/Services' → 'Module Settings' → 'Configuration'. There you will find all the options associated with the roles configuration:
OSP 18 1.png
  • Default Domain:
    • {exemplary_domain} - 'Project' and ' User' are created in a selected domain; the 'Inherit Domain Roles' switcher and 'Domain User Roles' dropdown disappear, this is where permissions to the domain are not granted
    • Create New One - if this option is selected, look at the 'Client Projects Mode' setting, as its selection is decisive now (a new domain per client or per service in WHMCS is created, all client services must have all projects assigned to one domain).
  • Client Projects Mode
    • Default - every hosting creates a new domain (project and user), in this case name generated in 'Default Domain Name' should be unique (e.g. dependent on the Service ID in WHMCS)
    • Only one domain per client (with domain permissions) - the first service of the clients creates a domain, every next one assigns project and the new user to that domain (a user has all the permissions to the domain)
    • Only one domain per client (without domain permissions) - the first service of the clients creates a domain, every next one assigns project and the new user to that domain (a user has no permissions to the domain)
    • Only one domain and user per client - the first service of the client creates a domain and a user, every next service creates a project only within the existing domain
  • Project User Roles - assigning project roles to a user, for example you need to select here the "image_upload" role to allow uploading images
  • Inherit Domain Roles - if enabled, the user has the same roles assigned for both the domain and for the project
  • Domain User Roles - if the above 'Inherit Domain Roles' option is disabled, the user has the selected here domain roles assigned and the 'with/without domain permissions' settings are overwritten.
    If left empty, the 'with/without domain permissions' setting is taken into consideration.
Important: When upgrading from 1.3.0 to 1.4.0 module version and you do not save changes in the module settings the roles will work as in the previous version.


Admin Area

OpenStack Projects For WHMCS allows you to supervise and manage your customer products from the admin area of your WHMCS system.

This includes supervision of such features as:

  • Log In To Control Panel – redirecting to the OpenStack login page.
  • Configurable options which enable you to view the chosen server details (if aplicable)
  • Module commands to allow easy and quick management of the server
    • Create – creating a new user, a new project with a set of limits.
    • Suspend – unassigning a project from the user to prevent a user from managing their resources.
    • Unsuspend – assigning back a project from a user.
    • Terminate – removing a project and removing a user (if they do not have any other projects assigned at OpenStack).
      Important! From the 1.1.0 version of the module, the following cron command is required to terminate a project (5-minute interval suggested).
      Do not forget to replace 'yourWHMCS' with your WHMCS root location.
       php -q /yourWHMCS/modules/servers/OpenstackProjects/cron/cron.php queue 
    • Change Package – upgrading resources of the project.
  • Scheduled Tasks - data on all scheduled tasks, their status, attempts, and dates
  • Metric Statistics - the section is completed with all metrics the module can observe.
OSP 19.png


Thanks to configurable options, you are able to offer a product which your clients can match to their needs.
Additionally, you are able to set up pricing for each configurable option, which makes your offer even more competitive.
OSP 20.png

Client Area

The client area interface of OpenStack Projects For WHMCS looks like below.
As you can see, you may easily redirect to the 'OpenStack' login page. Moreover, you can check the 'Configurable Options ' and 'Metrics Billing'
OSP 21.png

OpenID Configuration (VHI)

Follow the below instruction step by step to allow adding OpenID configuration automatically:

1. Configure OpenID in WHMCS, read the following article to learn how to proceed.
2. Open file: vhi-integration/vinfra-cmd and enter the below enumerated data:


3. Move to the product 'Module settings' → 'Module Custom Shell Hooks' section. There add content to the 'Create' and ' Terminate' actions, for example:

 /home/yourWHMCS/vhi-integration/vinfra-cmd -d {$customfields.DomainName} -a create -n {$customfields.DomainName}


 /home/yourWHMCS/vhi-integration/vinfra-cmd -d {$customfields.DomainName} -a delete -n {$customfields.DomainName}
OSP 22 2.png
4. Again, in the 'Module Settings → 'Configuration' → 'Default Domain' select the Create New One option.
OSP 22 0.png

5. Run 'Create' module command.
6. Press the 'Log into Panel ' button, and you will be redirected to the "Sign in" pop-up, press Sign in with 'your_user_name'.

Important: You must have the vinfra program installed in /usr/bin catalog. Please contact the Virtuozzo team to get it.

OSP 22 6.png
Additional steps required:

1. OpenID Connect → Authorized Redirect URIs. Type in the VHI address that connects to your WHMCS, use the formula:



OSP 22 1.png
2. Add the below lines to the htcaccess file:
Order allow,deny
Allow from
Allow from
satisfy any

RewriteEngine On
RewriteRule ^.well-known/openid-configuration ./oauth/openid-configuration.php [L,NC]
3. Domain and WHMCS system URLs must have https protocol:
OSP 22 3.png
4. Enter the login link into the OpenStack Panel web address
OSP 22 4.png


1. Please remember that if you integrate OpenStack Projects For WHMCS with Advanced Billing For WHMCS, the cron task should be set no more than once for an hour.
2. Metrics can be calculated basing on total or average usage for a given period of time. You can edit this in the following file:

Find the 'averageBilling' option and set:

  • 'false' for total usage
  • 'true' for average usage
OSP 22.png

Update Instructions

An essential guidance through the process of updating the module is offered here.

Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!
To take advantage of it, simply use the License Upgrade button located on the product's page and a discounted invoice will be generated automatically.

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
2. If you encounter a connection error in the module settings:

'Error:Connection Error: No route to host (Action: GET https://compute-api.svc.vstoragedomain.:8784/v2.1/5dcda23cb9bd4718b32610bbe18a1382/os-availability-zone). Check WHMCS module log for more information'

Please make sure the API IP address is public or there is a domain setup. For more details please refer to the official Virtuozzo Hybrid Infrastructure documentation.

WHMCS Modules
WHMCS Widgets
cPanel Modules
OpenStack Projects For WHMCS