SlideShare a Scribd company logo
3
Most read
4
Most read
5
Most read
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 1
How To Monetise & Bill CloudStack
A Practical Open Approach
K B Shiv Kumar / CTO@IndiQus
www.apiculus.com
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 2
Introduction
● This is a Techno-Functional Talk
● Focuses on CloudStack and Billing
● Laid out in a Questions and Suggestion Format
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 3
What All Can We Monetize?
● VM – Disk, CPU, RAM, OS
● VPC – VPC, VR CPU, VR RAM, VR Throughput, Data Transfer
● Networks – Count, Type, Throughput
● VPN Users – Count
● Rules – Firewall Rules, Port Forwarding Rules, Static Routes
● IP – Count
● Containers – Nodes, Count, Size
● Secondary Storage – Data Usage, Period of Storage
● Data Transfer – Account Level
● Services – Managed Services, Professional Services
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 4
What Billing Models Are Possible?
● Invoicing Perspective
○ Postpaid
○ Prepaid
● Period Perspective
○ Monthly
○ Quarterly
○ Annually
● Offering Perspective
○ Contractual (mo/qtr/yr)
○ One Time
○ Pay As You Go(PAYG)
● Aggregation Perspective
○ Account Level
○ Resource Level
4
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 5
How Do We Offer Services?
● Plans
○ Smallest Atomic Unit of Service
○ Priced (Recurring, One Time, Fixed or
Variable)
○ Has Inclusions Optionally
○ Has Limits
○ Can be of type One Only, Always One,
Many
● Catalogues
○ It’s a Menu Card
○ Can be Multiple – Regional/Customer
Type/Account Specific/Sectoral
○ Price Override is Done Here
○ Selective Offerings are Possible
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 6
What Are The Billing Processes?
● Subscribing – Entering into a Contract for a Resource.
● Mediating – Collecting, Normalizing, Adjusting and Aggregating the Usage Data.
● Rating – Rating of that Resource Usage Data.
● Invoicing – Billing Users Periodically on the Charges Incurred Above.
● Apportioning – Processing Payments and/or Advances.
● Dunning – Steps to Recovering Dues.
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 7
How Do All These Fit In?
Select Offering
From
Marketplace
Create
Resource In
CloudStack
Identify and
Map The
Applicable Plan
Generate &
Record
Contract
Collect Usage
Mediate and
Adjust Rate and Store Invoice
Receive
Payments
Apportion
Payments
Implement
Dunning
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 8
How Do We Subscribe/Contract?
● Plan Mapping
○ Identify Unique Plan(s) and Price
○ Zero-in via Combination (CPU, RAM, disk,
OS, Zone, Region, Account, Bill Type etc.)
○ Plan can be a Monolith(VM) or Smaller
(Compute, Disk, Network, OS)
○ Identify Billing Details (Fixed/Variable;
Monthly/Hourly; OTC/Recurring)
○ Plan Should Map to the Correct Service
Offering, Disk Offering, Template Offering,
Zone, Region etc. in CloudStack. Tags, Tags,
Tags!
○ Use CloudStack Identifiers for above - UUID,
Name, Description, DB ID - All Work Fine
● Contracting/Subscribing
○ Store Plan Rate & Unit – Can be at Plan
Level or Component level
○ Store Date, Period, Un-billed charges and
Line Items (Consider Pro-ration vs Full)
○ Store Contract Type
○ Store Allowances (Consider Period, Unit,
Quantity, Pro-ration)
○ Store the CloudStack Resource Identifier
(UUID, Tags, DB ID - All Work Fine)
○ Store Custom Metadata if Required
○ Use Any Entry Point (CMP, AMQP, Events,
Poll - All Work Fine)
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 9
How Do We Collect Data?
● cloud_usage DB and CloudStack Usage API are Your Best Friends!
● It is Recommended to Use Separate Collectors for Separate Types of Resources.
● Collect Periodic Usage for all Rateable Resources(VM, Disk etc.) or Resource Components(CPU,
Network, DT etc.)
● Make sure to Obtain the Resource Identifier as Stored in the Contract. Most Important!
● This can be done via DB Queries or using CloudStack Usage API and Relevant Resource APIs
or a Combination of Both Approaches.
● UUID can be found in almost all CloudStack API Responses while Resource’s DB ID is Present
in usage_id Column of cloud_usage.cloud_usage Table.
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 10
Important Settings For Hourly Usage Tracking
● Usage Related Settings In CloudStack
enable.usage.server
usage.sanity.check.interval
usage.execution.timezone
usage.stats.job.exec.time
usage.stats.job.aggregation.range
usage.aggregation.timezone
● For Hourly Usage Set usage.stats.job.aggregation.range as 60.
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 11
How Do We Mediate?
● Aggregate at Resource, Period & Granularity Level
○ GROUP BY usage_id, start_date, end_date if using DB. Make sure to join resource tables to obtain
identifier used in the contract.
○ Pass start_date, end_date and type if using the listUsageRecords API.
● Aggregate Resource Usage at the Account Level Where Required
● Map Each Resource ID to the Corresponding Contract
● Obtain the Pricing and Allowances (if any)
● Reduce the Usage by the Allowance Balance
● Provide Final Quantity and UOM for Final Rating
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 12
How Do We Rate?
● Apply the Contract Rate on Final UOM
● Better To Rate Till 4 Decimals
● Store in Un-billed Charges Against the Contract
● Aggregate on a Resource or Component Level
12
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 13
How Do We Invoice/ShowBack/ChargeBack?
● Needs to Run Every Bill Cycle
● Can be run Everyday
● Aggregate all Un-billed Charges at Contract Level
● Normalize Here for Percentile Billing
● Apply Taxes as Applicable
● Mark Un-billed Charges as Processed
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 14
How Do We Implement Dunning?
● Plays Around the Following
Parameters
○ Exposure Limit
○ Unbilled Charges
○ Due Date
○ Payment Amount
○ Outstanding
● Rules may be a Combination of Above
● Actions Can Be
○ Notify – Email, SMS, CMP
○ Curtail Exposure – Set CloudStack
Limits
○ Reversible Block – Disable In
CloudStack
○ Permanent Removal - Delete Account
In CloudStack
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 15
Use Case - Hourly Billing Of A VM
User Chooses A VM Config
Ex: 2Core, 4GB, 100GB
Ubuntu 20.04
This Is Mapped To A Plan
Ex: ‘Classic’ VM With Ubuntu
20.04
Plan Contains Service
Offering, Disk Offering and
Template Mapping
Ex: serviceoffering=<uuid>;
templateid=<uuid>
Resource Created In ACS
And UUID/Tag/DB ID
Obtained
Ex: deployVirtualMachine
Identifier(s) Stored In Contract
Ex: cloudstack_resource_uuid
Field
Allowed Usage Stored In The
Contract
Ex(24 Hrs/mo Free)
VM Usage Collected
Perioddically
Ex: Join
cloud_usage.usage_id With
cloud.vm_instance.id
Locate Contract’s
Components Via Identidfiers
Ex: VM’s UUID, Template
UUID, Disk UUID
Absorb Usage Till 24 Hours
Ex: Put Value as 0 Till 1st 24
Hours
Rate Individual Components
Based On Rate
Ex: VM @ USD 0.01/hr; OS
@USD 0.02/hr
Store Un-billed Against
Contract and Period
Ex: VM XYZ 14Nov2022
15:00 to 16:00 0.01
Aggregate All Unbilled Per
Resource
Ex: VM XYZ 1Nov to 30 Nov
USD 696
Apply Percentile If Any Apply Taxes Generate Invoice
CloudStack Collaboration Conference 2022
14-16 November 2022 / Sofia, Bulgaria / 16
Thank You!
“Ask no questions and you’ll be told no lies” – Great Expectations, Charles Dickens
K B Shiv Kumar / Chief Technology Officer @IndiQus Technologies
shiv@indiqus.com / shiv@apiculus.io / (91) 9810 527 448

More Related Content

ODP
Kubernetes Architecture
PDF
OpenShift Virtualization- Technical Overview.pdf
PDF
Automated CloudStack Deployment
PDF
The kvm virtualization way
PPTX
OpenStack Architecture and Use Cases
PDF
Microsoft Windows Server 2022 Overview
PDF
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
Kubernetes Architecture
OpenShift Virtualization- Technical Overview.pdf
Automated CloudStack Deployment
The kvm virtualization way
OpenStack Architecture and Use Cases
Microsoft Windows Server 2022 Overview
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...

What's hot (20)

PDF
Building a redundant CloudStack management cluster - Vladimir Melnik
PDF
Monitoring in CloudStack
PDF
Kubernetes 101
PPTX
OpenStack Introduction
PPTX
CloudStack Overview
PDF
2019.06.27 Intro to Ceph
PPTX
Kubernetes PPT.pptx
PDF
Virtualization Architecture & KVM
PDF
What CloudStackers Need To Know About LINSTOR/DRBD
PDF
What's Coming in CloudStack 4.19
PDF
Ceph with CloudStack
PDF
Introduction to Red Hat OpenShift 4
ODP
Using CloudStack With Clustered LVM
PDF
CCNA17 KVM and CloudStack
PPTX
NetApp & Storage fundamentals
PPTX
OpenvSwitch Deep Dive
PPTX
VMware Advance Troubleshooting Workshop - Day 4
PPTX
Virtual Infrastructure Overview
PPTX
OVN - Basics and deep dive
Building a redundant CloudStack management cluster - Vladimir Melnik
Monitoring in CloudStack
Kubernetes 101
OpenStack Introduction
CloudStack Overview
2019.06.27 Intro to Ceph
Kubernetes PPT.pptx
Virtualization Architecture & KVM
What CloudStackers Need To Know About LINSTOR/DRBD
What's Coming in CloudStack 4.19
Ceph with CloudStack
Introduction to Red Hat OpenShift 4
Using CloudStack With Clustered LVM
CCNA17 KVM and CloudStack
NetApp & Storage fundamentals
OpenvSwitch Deep Dive
VMware Advance Troubleshooting Workshop - Day 4
Virtual Infrastructure Overview
OVN - Basics and deep dive
Ad

Similar to How To Monetise & Bill CloudStack - A Practical Open Approach (20)

PPTX
Practical FinOps in Practice
PPTX
Practical FinOps in Practice
PDF
How Cloud Service Providers Can Effectively Monetize and Deliver the Ultimate...
PPTX
Defogging the Cloud webinar
PDF
Dag Sonstebo - CloudStack usage service
PDF
StackBill - Simplified Cloud Management Platform
PDF
Optimizing your cloud spend the right way
PDF
faisal mushtaq - an enterprise cloud cost management framework
PPTX
cloud computing ppt in computer science
PDF
How to Set Up a Cloud Cost Optimization Process for your Enterprise
PDF
CloudMC: Building a Business Portal for Service Providers
PDF
Mastering the fundamentals of AWS billing 8-20-15
PPTX
Secret Techniques to Manage Apache Cloudstack with ActOnCloud
PPTX
Having Trouble Managing All Your Cloud Services? We Know!
PDF
Optimizing EC2 usage on AWS
PDF
The Curious Case Of Cloud Repatriation
PDF
The 10 biggest metering and billing mistakes
PDF
Technology Insight Report Cloud Computing Billing Technologies
PDF
Prepare Your Enterprise Cloud Strategy for 2019: 7 Things to Think About Now
PDF
CloudStack usage service
Practical FinOps in Practice
Practical FinOps in Practice
How Cloud Service Providers Can Effectively Monetize and Deliver the Ultimate...
Defogging the Cloud webinar
Dag Sonstebo - CloudStack usage service
StackBill - Simplified Cloud Management Platform
Optimizing your cloud spend the right way
faisal mushtaq - an enterprise cloud cost management framework
cloud computing ppt in computer science
How to Set Up a Cloud Cost Optimization Process for your Enterprise
CloudMC: Building a Business Portal for Service Providers
Mastering the fundamentals of AWS billing 8-20-15
Secret Techniques to Manage Apache Cloudstack with ActOnCloud
Having Trouble Managing All Your Cloud Services? We Know!
Optimizing EC2 usage on AWS
The Curious Case Of Cloud Repatriation
The 10 biggest metering and billing mistakes
Technology Insight Report Cloud Computing Billing Technologies
Prepare Your Enterprise Cloud Strategy for 2019: 7 Things to Think About Now
CloudStack usage service
Ad

More from ShapeBlue (20)

PPTX
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
PPTX
Simplifying End-to-End Apache CloudStack Deployment with a Web-Based Automati...
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
PDF
CloudStack GPU Integration - Rohit Yadav
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
PDF
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
PDF
Fully Open-Source Private Clouds: Freedom, Security, and Control
PPTX
Pushing the Limits: CloudStack at 25K Hosts
PPTX
Stretching CloudStack over multiple datacenters
PPTX
Proposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStack
PPSX
CloudStack + KVM: Your Local Cloud Lab
PDF
I’d like to resell your CloudStack services, but...
PDF
Storage Setup for LINSTOR/DRBD/CloudStack
PDF
Apache CloudStack 101 - Introduction, What’s New and What’s Coming
PDF
Development of an Оbject Storage Plugin for CloudStack, Christian Reichert, s...
PDF
VM-HA with CloudStack and Linstor, Rene Peinthor
PDF
How We Use CloudStack to Provide Managed Hosting, Swen Brüseke, proIO
The Yotta x CloudStack Advantage: Scalable, India-First Cloud
Simplifying End-to-End Apache CloudStack Deployment with a Web-Based Automati...
Extensions Framework (XaaS) - Enabling Orchestrate Anything
CloudStack GPU Integration - Rohit Yadav
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
Ampere Offers Energy-Efficient Future For AI And Cloud
Empowering Cloud Providers with Apache CloudStack and Stackbill
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
Fully Open-Source Private Clouds: Freedom, Security, and Control
Pushing the Limits: CloudStack at 25K Hosts
Stretching CloudStack over multiple datacenters
Proposed Feature: Monitoring and Managing Cloud Usage Costs in Apache CloudStack
CloudStack + KVM: Your Local Cloud Lab
I’d like to resell your CloudStack services, but...
Storage Setup for LINSTOR/DRBD/CloudStack
Apache CloudStack 101 - Introduction, What’s New and What’s Coming
Development of an Оbject Storage Plugin for CloudStack, Christian Reichert, s...
VM-HA with CloudStack and Linstor, Rene Peinthor
How We Use CloudStack to Provide Managed Hosting, Swen Brüseke, proIO

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Empathic Computing: Creating Shared Understanding
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Approach and Philosophy of On baking technology
PDF
KodekX | Application Modernization Development
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
Teaching material agriculture food technology
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Electronic commerce courselecture one. Pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
Empathic Computing: Creating Shared Understanding
The AUB Centre for AI in Media Proposal.docx
NewMind AI Weekly Chronicles - August'25 Week I
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
Approach and Philosophy of On baking technology
KodekX | Application Modernization Development
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
sap open course for s4hana steps from ECC to s4
Spectral efficient network and resource selection model in 5G networks
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Teaching material agriculture food technology
Spectroscopy.pptx food analysis technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Review of recent advances in non-invasive hemoglobin estimation
Electronic commerce courselecture one. Pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf

How To Monetise & Bill CloudStack - A Practical Open Approach

  • 1. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 1 How To Monetise & Bill CloudStack A Practical Open Approach K B Shiv Kumar / CTO@IndiQus www.apiculus.com
  • 2. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 2 Introduction ● This is a Techno-Functional Talk ● Focuses on CloudStack and Billing ● Laid out in a Questions and Suggestion Format
  • 3. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 3 What All Can We Monetize? ● VM – Disk, CPU, RAM, OS ● VPC – VPC, VR CPU, VR RAM, VR Throughput, Data Transfer ● Networks – Count, Type, Throughput ● VPN Users – Count ● Rules – Firewall Rules, Port Forwarding Rules, Static Routes ● IP – Count ● Containers – Nodes, Count, Size ● Secondary Storage – Data Usage, Period of Storage ● Data Transfer – Account Level ● Services – Managed Services, Professional Services
  • 4. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 4 What Billing Models Are Possible? ● Invoicing Perspective ○ Postpaid ○ Prepaid ● Period Perspective ○ Monthly ○ Quarterly ○ Annually ● Offering Perspective ○ Contractual (mo/qtr/yr) ○ One Time ○ Pay As You Go(PAYG) ● Aggregation Perspective ○ Account Level ○ Resource Level 4
  • 5. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 5 How Do We Offer Services? ● Plans ○ Smallest Atomic Unit of Service ○ Priced (Recurring, One Time, Fixed or Variable) ○ Has Inclusions Optionally ○ Has Limits ○ Can be of type One Only, Always One, Many ● Catalogues ○ It’s a Menu Card ○ Can be Multiple – Regional/Customer Type/Account Specific/Sectoral ○ Price Override is Done Here ○ Selective Offerings are Possible
  • 6. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 6 What Are The Billing Processes? ● Subscribing – Entering into a Contract for a Resource. ● Mediating – Collecting, Normalizing, Adjusting and Aggregating the Usage Data. ● Rating – Rating of that Resource Usage Data. ● Invoicing – Billing Users Periodically on the Charges Incurred Above. ● Apportioning – Processing Payments and/or Advances. ● Dunning – Steps to Recovering Dues.
  • 7. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 7 How Do All These Fit In? Select Offering From Marketplace Create Resource In CloudStack Identify and Map The Applicable Plan Generate & Record Contract Collect Usage Mediate and Adjust Rate and Store Invoice Receive Payments Apportion Payments Implement Dunning
  • 8. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 8 How Do We Subscribe/Contract? ● Plan Mapping ○ Identify Unique Plan(s) and Price ○ Zero-in via Combination (CPU, RAM, disk, OS, Zone, Region, Account, Bill Type etc.) ○ Plan can be a Monolith(VM) or Smaller (Compute, Disk, Network, OS) ○ Identify Billing Details (Fixed/Variable; Monthly/Hourly; OTC/Recurring) ○ Plan Should Map to the Correct Service Offering, Disk Offering, Template Offering, Zone, Region etc. in CloudStack. Tags, Tags, Tags! ○ Use CloudStack Identifiers for above - UUID, Name, Description, DB ID - All Work Fine ● Contracting/Subscribing ○ Store Plan Rate & Unit – Can be at Plan Level or Component level ○ Store Date, Period, Un-billed charges and Line Items (Consider Pro-ration vs Full) ○ Store Contract Type ○ Store Allowances (Consider Period, Unit, Quantity, Pro-ration) ○ Store the CloudStack Resource Identifier (UUID, Tags, DB ID - All Work Fine) ○ Store Custom Metadata if Required ○ Use Any Entry Point (CMP, AMQP, Events, Poll - All Work Fine)
  • 9. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 9 How Do We Collect Data? ● cloud_usage DB and CloudStack Usage API are Your Best Friends! ● It is Recommended to Use Separate Collectors for Separate Types of Resources. ● Collect Periodic Usage for all Rateable Resources(VM, Disk etc.) or Resource Components(CPU, Network, DT etc.) ● Make sure to Obtain the Resource Identifier as Stored in the Contract. Most Important! ● This can be done via DB Queries or using CloudStack Usage API and Relevant Resource APIs or a Combination of Both Approaches. ● UUID can be found in almost all CloudStack API Responses while Resource’s DB ID is Present in usage_id Column of cloud_usage.cloud_usage Table.
  • 10. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 10 Important Settings For Hourly Usage Tracking ● Usage Related Settings In CloudStack enable.usage.server usage.sanity.check.interval usage.execution.timezone usage.stats.job.exec.time usage.stats.job.aggregation.range usage.aggregation.timezone ● For Hourly Usage Set usage.stats.job.aggregation.range as 60.
  • 11. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 11 How Do We Mediate? ● Aggregate at Resource, Period & Granularity Level ○ GROUP BY usage_id, start_date, end_date if using DB. Make sure to join resource tables to obtain identifier used in the contract. ○ Pass start_date, end_date and type if using the listUsageRecords API. ● Aggregate Resource Usage at the Account Level Where Required ● Map Each Resource ID to the Corresponding Contract ● Obtain the Pricing and Allowances (if any) ● Reduce the Usage by the Allowance Balance ● Provide Final Quantity and UOM for Final Rating
  • 12. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 12 How Do We Rate? ● Apply the Contract Rate on Final UOM ● Better To Rate Till 4 Decimals ● Store in Un-billed Charges Against the Contract ● Aggregate on a Resource or Component Level 12
  • 13. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 13 How Do We Invoice/ShowBack/ChargeBack? ● Needs to Run Every Bill Cycle ● Can be run Everyday ● Aggregate all Un-billed Charges at Contract Level ● Normalize Here for Percentile Billing ● Apply Taxes as Applicable ● Mark Un-billed Charges as Processed
  • 14. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 14 How Do We Implement Dunning? ● Plays Around the Following Parameters ○ Exposure Limit ○ Unbilled Charges ○ Due Date ○ Payment Amount ○ Outstanding ● Rules may be a Combination of Above ● Actions Can Be ○ Notify – Email, SMS, CMP ○ Curtail Exposure – Set CloudStack Limits ○ Reversible Block – Disable In CloudStack ○ Permanent Removal - Delete Account In CloudStack
  • 15. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 15 Use Case - Hourly Billing Of A VM User Chooses A VM Config Ex: 2Core, 4GB, 100GB Ubuntu 20.04 This Is Mapped To A Plan Ex: ‘Classic’ VM With Ubuntu 20.04 Plan Contains Service Offering, Disk Offering and Template Mapping Ex: serviceoffering=<uuid>; templateid=<uuid> Resource Created In ACS And UUID/Tag/DB ID Obtained Ex: deployVirtualMachine Identifier(s) Stored In Contract Ex: cloudstack_resource_uuid Field Allowed Usage Stored In The Contract Ex(24 Hrs/mo Free) VM Usage Collected Perioddically Ex: Join cloud_usage.usage_id With cloud.vm_instance.id Locate Contract’s Components Via Identidfiers Ex: VM’s UUID, Template UUID, Disk UUID Absorb Usage Till 24 Hours Ex: Put Value as 0 Till 1st 24 Hours Rate Individual Components Based On Rate Ex: VM @ USD 0.01/hr; OS @USD 0.02/hr Store Un-billed Against Contract and Period Ex: VM XYZ 14Nov2022 15:00 to 16:00 0.01 Aggregate All Unbilled Per Resource Ex: VM XYZ 1Nov to 30 Nov USD 696 Apply Percentile If Any Apply Taxes Generate Invoice
  • 16. CloudStack Collaboration Conference 2022 14-16 November 2022 / Sofia, Bulgaria / 16 Thank You! “Ask no questions and you’ll be told no lies” – Great Expectations, Charles Dickens K B Shiv Kumar / Chief Technology Officer @IndiQus Technologies shiv@indiqus.com / shiv@apiculus.io / (91) 9810 527 448