Settings / OpenStack Plans

../_images/openstackplans-list.png

An OpenStack plan is a collection or prices (rules with prices) for individual resources such as Instances, Volumes, Images or Network bandwidth

You can sort them either by Name or Currency.

To create a new plan click the button from the bottom right corner of the screen.

../_images/createopenstackplan.png

The following modal window will popup and you’ll be able to choose:

  • Name: The name associated with the plan
  • Currency: The currency that the pricing plan will use
  • Default billing plan: When a new default billing plan is set it will apply for newly created clients. It does not change for existing clients.
../_images/openstackplan-creation.png

You must always have at least one pricing plan defined but fleio allows you to create additional ones.

The default plan applies to all customers by default and you can define additional pricing plans for various customer categories. For instance, you can to define discounts and use a different currency for a subset of customers.

../_images/openstackplans.png

The currency is selected per plan and applies for all pricing rules in that plan.

Note that a client is always invoiced using his default currency. The exchange rate will be applied to the amount determined by the pricing rules (if the client’s currency is different then the plan’s currency).

Right now you can create pricing rules for instances with network traffic, volumes and images.

Future Fleio releases will support any kind of OpenStack resources, like VPN or Swift objects.

Deleting a plan

../_images/openstackplan-deletion.png

Click the Delete plan icon when hovering over a plan or enter its details page and hover over the action button. If you delete a plan, you’ll need to select another one to migrate the clients in the openstack plan you select.

Pricing Rules

To create a new pricing rule, click the (+) button either from the openstack plan details page or the openstack plans page when hovering an item. You’ll get redirected a new page with the following form that will be explained below.

../_images/openstackplans-pricingrule.png

One plan includes several pricing rules. The currency set at the billing plan level is used for all pricing rules in that plan.

Common Pricing Rules Features

  • Pricing rules are not exclusive:
    • multiple rules can apply to the same cloud resource and the price outcome of each rule will be added to the total price.
  • The pricing rule name is only used for staff reference.
  • The pricing attribute is used to determine what to charge for.
    For example, in case of an Image, a Pricing Attribute set to size will calculate the price based on the Image size. If the Pricing Attribute would be set to existance, then the price of an image of any size would be set based on it’s existance.

Filters

Pricing rules are by default applied to all resources of a type. To limit the scope of a pricing rule to a subset of resources, filters should be applied. Typical filters are: instance_type is m1.small or volume_type is SSD. For example, setting the filter instance_type is m1.small on an Instance pricing rule, will configure the pricing rule to only apply on instances with the m1.small flavor set.

Multiple filters can be added. The logical AND is used between them. In other words: the pricing rule applies only if all the filters are true.

Price Modifiers

Price modifiers define additional cost added to the rule’s base price.

For instance, license costs can be defined using price modifiers.

Instance Pricing Rule

Price can be applied on compute instances based on one of the following:

  • existence: A price per Time Unit (second, minute, hour, billing cycle).
  • vcpu: The price per Time Unit is multiplied with the number of virtual CPU cores.
  • root_gb: The price per Time Unit is multiplied with the number of GB of the instance’s boot volume.

Image Pricing Rule

OpenStack Glance image storage can be priced on:

  • existence: A price per Time Unit (second, minute, hour, billing cycle) regardless of the size in GB.
  • size: The price per Time Unit is multiplied with the size of the image. You can select the Size Unit: Bytes, Killobytes, Megabytes, Gugabytes, Terabytes, Petabytes.

Volume Pricing Rule

OpenStack Cinder volumes (also known as block devices) are priced on the same characteristics as images:

  • existence: A price per Time Unit (second, minute, hour, billing cycle) regardless of the size in GB.
  • size: The price per Time Unit is multiplied with the size of the image. You can select the Size Unit: Bytes, Killobytes, Megabytes, Gugabytes, Terabytes, Petabytes.

Network Pricing Rule

This rule applies to the number of GB that have passed through a network.

Flat pricing means that the number of GB is multiplied with the Price per GB that is filled in.

Tiered pricing allows to set difference pricing depending on the volume of GB that is charged. For example you can define that the first 1 000 GB cost 0.05 EUR per GB, the following GB up to 10 000 GB cost 0.045 EUR per GB, and the next GB (from 10 000 GB to infinite) cost 0.04 EUR.

You can also set the first tier to be free. I.e. the first 100 GB are included at no cost.

NOTE How to configure OpenStack to support network bandwidth billing/accounting.

The neutron-metering-agent needs to be installed besides each neutron-l3-agent in order to support L3 networking accounting.

Follow the simple configuration for the metering agent: configure-metering-agent

Assuming we would like to account for the external traffic, we may want to create the following label with rules:

First create a shared label that will automatically be applied to all projects:

neutron meter-label-create bandwidth --description "Bandwidth accounting" --shared

Create a rule for the bandwidth label to account for the packets leaving the project router

neutron meter-label-rule-create bandwidth 0.0.0.0/0 --direction egress

Create another rule to account for the packets entering the project router

neutron meter-label-rule-create bandwidth 0.0.0.0/0 --direction ingress

If we wish to exclude any destination we can add another rule together with the –exclude switch:

neutron meter-label-rule-create bandwidth 10.0.0.0/8 --direction ingress --exclude

The above rule excludes all traffic going to 10.0.0.0/8

Assuming we have Ceilometer and gnocchi installed and a Fleio princing rule defined for Bandwidth, the traffic accounting should start to display the cost in a few minutes.