Rates

Show users what an order will cost before they submit it, and report on the spend it creates in Cloud Management Platform (CMP)

Rates can be assigned to hardware, operating systems, applications, blueprint items, and other parameters. Provisioned servers and resources carry their associated rates, which CMP aggregates and reports in several ways, showing spend by servers, groups, environments, and individual users.

How rates are used

Rates are useful for internal showback and chargeback, so you can show or charge groups for what they used in a given period. Report on them using one of the graphical reports in Reports, or by running the export_server_info command on the appliance. See Command line utilities.

Rate time and currency units

Rates are stored as numbers. Two global settings on the Admin > Rates page decide how they are interpreted and displayed.

Setting Description
Rate time unit The period a rate covers: hour, day, week, month, year, or a one-time cost. Month is the default.
Rate currency unit The symbol or code shown alongside a rate, such as $, EUR, or JPY. The default is $.

Changing the time unit does not convert existing rates. Review your rates after making a change.

Rates for public cloud servers

CMP uses data provided by AWS, Azure, and GCP to predict costs when users order VMs from those providers. Admins can see the logic that computes these rates at Admin > Orchestration Actions > Other > Compute Server Rate.

AWS

CMP queries the AWS Price List API as the user changes options on the order form.

Azure

CMP looks up Azure rates in the Azure rate card, which the Download Azure rate card recurring job downloads and stores. The job is enabled by default. The rate card uses Pay-As-You-Go pricing in US dollars, and its rates cover Windows or Linux only, without additional costs.

For example, a Red Hat Linux VM costs a little more than a free Linux distribution such as Ubuntu. For premium operating systems like these, set the OS build rate to the operating system’s cost, which you can find in the Azure Pricing Calculator. The rate in CMP then reflects the actual cost.

GCP

CMP downloads the price list that Google publishes and looks up the rate in it.

Set rates for servers

On the Admin > Rates page, you can assign a rate to any of the following:

  • CPUs
  • GB of memory
  • GB of disk
  • OS build
  • Application
  • Boolean parameters
  • Integer or decimal parameters

Set each rate globally, and optionally override the global default per environment with a more specific rate.

These rates apply to any server orders and servers where no orchestration action computes the rate instead.

Set rates for resources

On the Build tab of a blueprint, several types of items can have a rate. When the blueprint is deployed, the rate appears on the order form so users can see the impact of their order. When the resource is created, the sum of those item rates is associated with it and included in the group rate shown on the group detail page.

To add a rate, select the edit icon to the right of a blueprint item of type action, pod, or load balancer, and enter a rate for the item.

Multipliers

Use multipliers to create tiers within a rate. For example, if you offer SSD and HDD storage, you might charge twice the base disk rate for SSD.

When you create a disk storage multiplier, choose the disk type that triggers it and the multiplier for the base disk rate.

Disk types are supported only in VMware vCenter.

Compute Server Rate orchestration action

To write your own rate calculation logic, specify a Compute Server Rate orchestration action at Admin > Orchestration Actions > Other > Compute Server Rate.

Write a CloudBolt plugin that implements a function called compute_rate. The function can use the following keyword arguments:

Argument Description
group The group deploying the server.
environment The environment 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.
disks The server’s disks, when known.
server The server object. This is available only in some contexts and is absent in many, including the order form, so your plugin must handle its absence.

The compute_rate function should return a dictionary containing three top-level keys: Hardware, Software, and Extra. These keys are case-sensitive. Each key’s value is either a rate expressed as a string or a dictionary giving a more detailed 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"
}