Rates in CloudBolt

Rates can be assigned to hardware, software, and other parameters in CloudBolt to provide users with a preview of the rate that their orders will incur, before they submit their request. These rates can then be reported on in various ways, showing the rate incurred by servers, groups, environments, and individual users.

What CloudBolt Rates are Good For

CB rates are useful for internal showback and chargeback to different groups to show/charge them for what they used for a particular month. This can be done by using the export_server_info command-line command from the CB server (for more info, see Export and/or Email Simple CSV Report) or one of the graphical reports from the Reports section of the CB UI.

What CloudBolt Rates do not do

At this time, CloudBolt does not call into the public cloud platforms that it supports to gather predictive pricing information. We are looking into flexible ways to support this use case in future versions. If this is a feature you would be interested in, we would love to hear from you and discuss your use case- please contact your CloudBolt account representative to set up a conversation.

Setting Up Rates

Rates can be assigned to any of the following from the Admin > Rates section of the UI:

  • CPUs
  • GB of memory
  • GB of disk
  • OS Build
  • Application
  • Any boolean parameter
  • Any integer or decimal parameter

A rate for each of these can be set globally, and also set per-environment to override the global default with more specific rates for an environment.

Note

When changing rates globally or per-environment, all affected servers will have their rate and quota impact recalculated and stored, which may take some time to complete.

Multipliers

Multipliers can be used to implement tiers of a given rate. For example, if you have SSD storage and HDD storage, you may want to make the SSD storage twice the price of the normal HDD rate.

When creating a disk storage multiplier, you can choose what disk type will trigger the multiplier and the amount to multiply the base disk rate by.

Disk types are currently only supported for VMware vCenter.

Compute Server Rate Orchestration Action

If you’d like to write your own rate calculation logic, you can use the Compute Server Rate orchestration action, listed under the “Other” tab of orchestration actions.

To use your custom logic, write a CloudBolt plugin that implements a function called compute_rate. This function can use the following keyword arguments:

  • group: the group deploying the server
  • environment: the envrionment where the server will be deployed
  • resource_technology: the technology of the server’s resource handler
  • cfvs: a list of parameter values
  • pcvss: a list of preconfiguration values
  • os_build: the server’s OS build
  • apps: the applications to deploy to the server
  • quantity: the number of servers to deploy
  • server: the server object - Note that this is only available in some contexts, and not available in many (e.g., the order form) so your plugin must be able to handle it not being provided

The compute_rate function should return a dictionary containing three top-level keys: Hardware, Software, and Extra. These keys are case sensitive. The value of each key should a monthly rate expressed as a string, or a dictionary with a more detailed rate breakdown.

Example return values of compute_rate:

{
    "Hardware": "3",
    "Software": "1.55",
    "Extra": "0"
}
{
    "Hardware": {
        "CPUs": "20.04",
        "Mem Size": "13.30",
        "Disk Size": "0.67"
    },
    "Software": {
        "OS Build": "1.21",
        "Applications": "30.00"
    },
    "Extra": "2.01"
}