Pool of virtual servers
A pool of servers can be used for creating virtual servers that customers can order in the future. This feature allows to reduce server activation time.
Available in BILLmanager 5.85
How to activate a pool of server for processing module
After you activate the pool, BILLmanager 5 will automatically create servers on the processing modules for which the "Use pool" option was set. In order to use a pool, you need to create an account that will be associated with the server from the pool. This is a common client, however all the servers associated with his account, will be allocated to services when another user makes an order.
When the pool is connecting to a processing module, the billing system will automatically set 100% discounts for the account
Make sure that the account is included into the group with permissions "Allow service deletion" and "Ignore number of services on account". (You will need to set them yourself).
You can activate the pool in the processing module creation or configuration form .
Check the "Use pool" box and select the client that you have already created.
- Use pool - check the box to add virtual server automatically into the pool;
- Client - select a client account who will order servers into the pool;
- OS templates - the list of OS templates for which servers will be created regardless statistics;
- Maximum time in pool - maximum period in months that will pass before the server will be automatically deleted from the pool;
- Calculate statistics for - statistics period in days. The number of servers that will be added into the pool, is calculated based on that statistics;
- Ordered servers (0 < VPS <= 3) - number of servers that will be created in the pool, if clients purchased 1-3 virtual servers during the selected period;
- Ordered servers (3 < VPS <= 6) - number of servers that will be created in the pool, if clients purchased 4-6 virtual servers during the selected period;
- Ordered servers (6 < VPS <= 10) - number of servers that will be created in the pool, if clients purchased 7-10 virtual servers during the selected period;
- Ordered servers (10 < VPS <= 15) - number of servers that will be created in the pool, if clients purchased 11-15 virtual servers during the selected period;
- Ordered servers (VPS > 15) - number of servers that will be created in the pool, if clients purchased more than 15 virtual servers during the selected period;
How it works
A new cron job is created:
*/3 * * * * /usr/local/mgr5/sbin/mgrctl -m billmgr itempool.process.cron
The following operations will be performed when executing itempool.process.cron:
- the system collects statistics according to specified parameters
- servers are created in the pool
- old servers are deleted
Statistics is kept in the itempoolstat table of the database, and may vary depending on VMmanager version:
- for VMmanager KVM, the system will check operating system and tariff plan
- for VMmanager OVZ only operating system
When servers are added into the pool, for VMmanager OVZ a tariff plan will be selected automatically. The system will use the first tariff plan activated for the processing module, depending on its priority (information is taken from the "Sorting" field in the list of the tariff plans. The smallest value means the largest priority).
When servers are added into the pool, only one operation can be performed on a processing module at any given time. The same rule is applied to deletion of old servers that were not allocated to customers.
Allocating servers from the pool
When a client makes a new order, the system will check all the servers in the pool (if the first server cannot be allocated, the second one will be selected, etc.).
The following operations will be performed:
- the system copies parameters and IP addresses from the service in the pool to the service ordered by the client
- deletes information about the service in the pool from the database
- changes the domain name of the server
- for VMmanager KVM the script changes hostname (via ssh) (for non-Windows systems)
- if the client selected a recipe during the order, the system starts the script
- the setparam operation starts to apply the current parameters
If the server is not found, or all attempts to allocate it from the pool failed, a virtual server will be created as usual.
When you clear the "Use pool" check box in the processing module configuration form, virtual servers that were already added into the pool, won't be deleted and will be allocated to customers. They will be deleted by cron only after expiration dates.
We can not identify you and respond to your message.