Integration between WHMCS and DCImanager

From ISPWiki
Jump to: navigation, search

Installing the module

In order to install the integration module, browse to the modules directory of WHMCS setup root directory and unpack the following files:
# cd /var/www/html/whmcs/modules/
# wget
# tar -xzvf whmcs_isp_dci.v.2.tar.gz

Once the module is installed, navigate to Setup - Addon Modules and click Activate for ISPsystem global module.


After the installation is complete, you can add servers and service packages.

Adding new server

Navigate to "Setup -> Products/Services -> Servers" and click "Add New Server" (we recommend to group servers during this operation).


  • Enter the URL to DCImanager;
  • Select a server type: DCImanager;
  • Enter the username and password (not root).

The panels will communicate with each other via the IP address specified in the configuration form, on port 1500 via HTTPS. Every newly created server will show the button allowing to switch to the control panel (authentication with a temporary key).

Creating a tariff plan

  • Product Type - Dedicated/VPS Server
  • Product Group - select a required group
  • Product Name - enter a tariff name

On the"Module Settings" tab you need to select:

  • Module Name - DCImanager
  • Server Group - group of servers
  • Package Name - enter the name of the server configuration
  • Operation system - default disk template id. For a full list of ids, refer to https://server_ip:1500/dcimgr?func=osmgr&out=xml
  • Recipe Name - name of the recipe file that will be executed after OS deployment (null by default). Local recipes - #local__recipe_name, recipes from repository - repository_name__recipe_name. You can find a recipe name in /usr/local/mgr5/etc/recipes/local/ and /usr/local/mgr5/etc/recipes/repo/repository_name/.
  • Don't wait the OS install - do not wait for the OS installation process to complete during service activation.

You can also set up the following tariff options:

  • operating system
  • recipe
  • IPv4 and IPv6 addresses

Navigate to "Configurable Options" and create a new group of options (we recommend that you create a separate group of options for every connection to control panel. Or the list of disk templates should be applicable to all connections). You can use one of the following names for operating systems:

  • OS
  • os
  • ostemplate

Names for recipes:

  • recipe

Option name must correspond to OS or recipe name in the same way as it appears in the "Module Settings" tab. For IPv4 use IP, for IPv6 - IPv6.

How the module works

Activating a service

When a client orders a service, the following operations are performed in WHMCS and DCImanager:

1. The system defines if the client has active services (dedicated servers). If he already has such services, it means that he already has the account in DCImanager, therefor every new server will be created in that DCImanager account.

If the client orders dedicated server for the first time, a new account will be registered in DCImanager. DCImanager account name = username from WHMCS. Account password - password generated for the service (dedicated server).

2. WHMCS creates a Pending service, and searches available server with selected configuration in DCImanager.

Server is considered available in DCImanager, if:

  • owner is not not specified for server;
  • Hostname is free.ds;
  • servers doesn't have hardware issues (in a list of racks there is no icon indicating hardware issues);
  • diagnostics is not running for server (there are no corresponding icon).

Server configuration can be selected, if the «Package Name» field name in tariff configuration form has the same values as the «Configuration» or «Server type» fields in DCImanager.

3. The server is allocated IP addresses from the pool in DCImanager. During the OS installation the ordered IP addresses will be added to servers network interface.

OS installation will start.

5. Service status is changed into Active and can be used, when:

  • OS installation is running on server (the «Dont wait the OS install» check box is selected in tariff configuration form);
  • OS installation completed successfully (the «Dont wait the OS install» check box is not selected in tariff configuration form). The module will wait for the OS installation for 720 seconds. If it wasn't completed during that time, WHMCS will display corresponding error messages, and the service will remain Pending.

Suspending service

When a service is about to expire, the server will be blocked in DCImanager. If the service is not renewed for a certain period of time, the service will be released.

Deleting service

Deleting the service will release the server in DCImanager:

  • Its owner is changed into without owner;
  • Hostname is changed into free.ds;
  • Server IP addresses are released.


Log files are located in Utilities -> Logs -> Module Log