-
Notifications
You must be signed in to change notification settings - Fork 86
Local Development Tutorial
In order to experiment with the metering service locally and see what suits your scenario best, you can follow the steps below.
Plans provide resource providers with a way to express the relationship between the measures and metrics. Based on what the plan is responsible for, there are three categories: metering, rating, and pricing.
There are a few predefined plans available in Abacus. You can find the examples with the metrics contained for each plan in the examples below.
Metering Plans
- Basic object storage - a basic metering plan for storage space and number of API calls.
- Basic analytics - a basic metering plan for average number of instances and number of API calls.
- Basic linux container - a basic metering plan for memory usage [GB/h].
Rating Plans
- Object storage - a rating plan for storage space and number of API calls.
- Analytics - a rating plan for average number of instances and number of API calls.
- Linux container - a rating plan for memory usage.
Pricing Plans
- Object storage - a basic pricing plan for storage space and number of API calls.
- Linux container - a basic pricing plan for memory usage.
You can use Plan Tester to check your metering plan. It will show input and output of your plan functions.
Execute:
cd cf-abacus
# Bootstrap the build environment
# install the Node.js module dependencies and run the tests
npm run rebuildIn order to submit a usage document, you need to use a POST method, which records the resource usage document and processes the Cloud resource usage data it contains.
In order to retrieve a previously submitted resource usage document, you need to use a GET method as done in this sample script.
ABOUT | RESOURCE PROVIDER | ABACUS INTEGRATOR
*Abacus icon made by Freepik from www.flaticon.com
