Dough: OpenStack Billing Project
Upcoming SlideShare
Loading in...5
×
 

Dough: OpenStack Billing Project

on

  • 6,103 views

A billing system for OpenStack to register products of a public cloud and periodically charge the tenants.

A billing system for OpenStack to register products of a public cloud and periodically charge the tenants.

Statistics

Views

Total Views
6,103
Views on SlideShare
6,085
Embed Views
18

Actions

Likes
3
Downloads
102
Comments
2

4 Embeds 18

https://si0.twimg.com 8
http://www.slashdocs.com 7
http://www.docshut.com 2
http://www.linkedin.com 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • great
    Are you sure you want to
    Your message goes here
    Processing…
  • nice.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Dough: OpenStack Billing Project Dough: OpenStack Billing Project Presentation Transcript

  • Dough:OpenStackBilling ProjectFolsom Design Summit2012-04-16Luo, Zhongyuelzyeval@gmail.com
  • TODO Intro Design concepts Architecture Example RPCs RDBMS model Billing logic Discussions 2
  • Intro What to expect from Dough Keep track of billing info to charge tenants Flexible customization of payment policies How much/often to charge for resource unit Handles prepaid or pay-as-you-go What Dough does not do Keep track of tenant’s resource usage Needs a monitoring/metering system Deduct money from account DIY using database as a queue 3
  • Design concepts Highly configurable Billing frequency, unit of measure Asynchronous All events are asynchronous Independent Pluggable clients to access other projects Scalability Handle billing of many users Nova conventions Message protocol 4
  • RPCArchitecture Database Client Compute Network RDBMS Dashboard Storage Monitoring Billing (Metering) NoSQL 5
  • RPCArchitecture Database Client Compute Network RDBMS Dashboard Storage Collector Monitoring Farmer API daemon (Metering) Dispatch jobs Subscribe or Collector unsubscribe products / Query info Check status / Retrieve usage / Create purchases 6
  • Example: creating an instance Compute Network RDBMS Dashboard Storage 2 Create subscription record Collector{method: subscribe_item, 1 args: { Monitoring 62a8a396d9f44ef4a655ec1d7bd3801b, user_id: Farmer API daemon (Metering) 864bbc5d23ea47799ae2a702927920e9, tenant_id: region: deafult, item: instance, item_type: m1.tiny, Collector payment_type: hourly, resource_uuid: uuidofinstance, resource_name: nameofinstance,}} 7
  • Example: creating an instance Compute Network RDBMS Dashboard Storage Retrieve expired subscriptions 2 Collector 1 Request for Monitoring charge Farmer API daemon (Metering) Dispatch jobs Collector Check status / Retrieve usage / Create purchases 8
  • Example: creating an instance Compute Network RDBMS Dashboard Check instance Storage status 5 3 Create purchase record / Update subscription Collector status and expiring 4 datetime Retrieve instance Monitoring usage quantity Farmer API daemon (Metering) Collector 9
  • Example: creating an instance Compute Network RDBMS 2 Dashboard Storage RDBMS model 1 Collector RPCs Monitoring Farmer API daemon (Metering) Collector 3 Billing logic 10
  • RPCs subscribe_item Creates a subscription of a product Subscription status: ”creating” unsubscribe_item Updates the status of a subscription Subscription status: ”deleting” query_payment_types query_product_price query_usage_report 11
  • RDBMS model Created by... Regions → region name Items → resource name ItemTypes → resource type name Admin PaymentTypes → name, interval_unit, interval_size, is_prepaid Products region, item, item_type, payment_type order_unit, order_size, price, currency Subscriptions → product, tenant, status User expires_at, resource_uuid Purchases → subscription, quantity, Collector line_total 12
  • Billing logic: Subscription states Creation successful Unsubscribe creating verified Item error Creation error error deleting Deletion error Manually by admin Deletion successful terminated 13
  • Billing logic: Purchase creation For each non-deleted expired subscription: Status == ”creating”: Check if item finished creation(client) If product is prepaid: Create purchase* Extend expires_at** Verify subscription Status == ”deleting”: Check if item finished deletion(client) If product is not prepaid: Create purchase* Terminate subscription 14
  • Billing logic: Purchase creation For each non-deleted expired subscription: Status == ”verified”: Check if item is valid(client) Create purchase* Extend expires_at** (*)Create purchase Insert purchase where line_total=quantity(from monitoring )*price/unit_size (**)Extend expires_at += dateutil.relativedelta(interval_unit=interval_size) 15
  • Discussions Is this worth looking at? Any design problems? More requirements? https://github.com/lzyeval/talk-OSDS-2012 16