DCImanager Administrator

Integration with WHMCS

WHMCS is a billing system that allows a provider to sell different types of services. With WHMCS, he can provide dedicated servers to customers automatically. The billing system performs the following main features: 

  • registers clients and keeps track of their funds; 
  • creates tariff plans; 
  • accepts payments from customers; 
  • manages services automatically: activates, suspends, renews. 

The integration is set up in WHMCS and DCImanager. 

Note

The integration module was not tested with WHMCS 7.8.3 and later.

Install the module


To install the DCImanager integration module, download the archive from the WHMCS directory and extract the integration module files:

cd /var/www/html/whmcs/
wget http://download.ispsystem.com/extras/whmcs/7/whmcs_isp_dci6.tar.gz
tar -xzvf whmcs_isp_dci6.tar.gz

Log in to the WHMCS web interface and activate the module in SetupAddon Modules → the module ISPsystem global module → Activate.

Set up the integration 


To connect to DCImanager, click on SetupProducts/ServicesServers → Add New Server

Servers

4.png

Configure the Servers section


Enter the following parameters:

  • Name — the name of the connection to DCImanager;
  • Hostname — the name of the server with DCImanager; 
  • IP address — the public IP address of the server with DCImanager. 

Server Details

Configure the Servers Details section


Enter the following parameters:

  • Type — select "DCImanager 6";
  • Username — enter the Admin username in DCImanager that will manage servers in DCImanager;
  • Password — enter the admin password. 

Configure a tariff plan 


To set up a tariff, go to SetupProduct/ServicesProduct/ServicesCreate a New Product.

Details

Configure the Details section


Enter the following parameters:

  • Product Type — depending on the selected type, the service handling procedure may vary. Select "Server/VPS";
  • Product Group — select a service group that will include the tariff on the order form;
  • Product Name — enter the product name.

Module Settings

Configure the Module Settings section 

Enter the following parameters:

  • Module Name — the integration method. Select "DCImanager 6";
  • Server Group — service server group; 
  • Server configuration type — server configuration name in DCImanager;

    Note

    Run the diagnostics on the server to receive the server configuration name in DCImanager. Learn more in Running diagnostics.

  • Operation system — OS template name in DCImanager;
  • Don't wait the OS install — enable this option if you don't want to wait when the OS is installed during the order activation;
  • IP address group — IP pool name in DCImanager;
  • OS Installation timeout (minute) — this parameter is used only if you have enabled the option Don't wait the OS install;
  • Location ID — location ID in DCImanager. If the servers are located in different locations, leave the parameter empty. Otherwise, only servers in the selected location will be available for ordering;
  • User email verifying option check — client email check. If this option is enabled, a client without a verified email will not be able to manage connected services through WHMCS. To notify the client of the need to verify email, go to SetupGeneral SettingsSecurityEmail Verification and enable the Request users to confirm their email address on signup or change of email address option.

Configurable options

Tariff add-ons in WHMCS are additional resources that clients can order for an extra fee. Such resources are billed separately from the main service. On the service order form, a client can select how much additional resources he wants to order. 

Configurable options are combined into groups. Every group can be associated with several products. We recommend using a separate group with options for every connection to the panel. 

To manage the options groups, go to SetupProducts/ServicesConfigurable Options. Add the following add-ons for a dedicated server: 

  • operating system:
    1. Enter "OS", "os" or "ostemplate" in Option Name. Other names are not supported. 
    2. Choose "Dropdown" in Option Type.

      Configure "Operating system" option

  • IP addresses:
    1. Enter "ip", "IP", "ipv4" or "IPv4" in Option Name. Other names are not supported. 
    2. Choose "Quantity" in Option Type.
    3. Enter number of IP addresses allocated to the server in Minimum Quantity Required. The minimum value is 1.

      Configure "IP addresses" option

DCImanager configuration


When deleting a service, the integration module runs server diagnostics and clears the hard drives. For correct service deletion perform the following steps:

  1. Make sure that the diagnostics process can be run on the server. Learn more under Running diagnostics.
  2. Create a pool of IP addresses:
    1. Go to Networks IP pools → Create IP pool.
    2. Specify the arbitrary Pool name.
    3. In the IP address or range field, enter the range from which IP addresses will be allocated to the servers under diagnostics. The location with these servers must be accessible from the IP addresses.
    4. Enable the option Create a physical network.
    5. Specify the Network that the diagnostics module will use. The network must be included in the specified IP range.
    6. Enter the Gateway address for the network. 
    7. Click on Create the pool.
  3. Mark the created pool of IP addresses as a diagnostic pool:
    1. Enter NetworkIP poolsPool general settings.
    2. Select the created pool in the Pools for deallocation of servers field.
    3. Press Save.

How the module works


Service activation

The integration module performs the following operations to activate a new service:

  1. Finds an available server with the following parameters in the DCImanager database:
    • server configuration matches the configuration specified in the parameter Server configuration type in the tab Module Settings;
    • the server doesn't have an owner;
    • the last operation with the server was completed successfully or was canceled.
  2. Searches the DCImanager user by the Email specified in the WHMCS account settings. If the user with that email doesn't exist, the system will create a new one.
  3. Makes the user the server owner.
  4. Enables ports of the switch connected to the server.
  5. Powers the server on if needed.
  6. Terminates an operation on the server if any.
  7. Deletes the IP addresses from the server configuration
  8. Add a new IP address from the pool specified in the parameter IP address group in the tab Module Settings.
  9. Runs the OS deployment operation.
  10. Waits when the operation is completed if the option Don't wait the OS install is disabled. When the timeout specified in the parameter OS Installation timeout (minute) is over, it completes the deployment operation. 

Service suspension

When suspending a service, DCImanager powers off switch ports connected to the server. The service cannot be suspended if switch ports were not specified in the server settings form.

Service re-activation

To activate a service, DCImanager powers on switch ports connected to the server.

Service deletion

When deleting a service, the integration module performs the following operations:

  1. Powers on the switch ports connected to the server.
  2. Powers on the server if needed.
  3. Terminates a running operation on the server if any.
  4. Deletes the IP addresses from the server configuration.
  5. Deletes the server owner's information.
  6. Runs diagnostics including the disk clear option.

Logs

The log file of the integration module is located in WHMCS → UtilitiesLogsModule Log.