-
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.
Note: Abacus requires Node.js >= 6.10.0 and Npm >= 3.10.10
Execute:
cd cf-abacus
# Bootstrap the build environment
# install the Node.js module dependencies and run the tests
npm run build
In 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.
You can refer to the following sample script.
In order to retrieve a previously submitted resource usage document, you need to use a GET method.
You can refer to the following sample script.
ABOUT | RESOURCE PROVIDER | ABACUS INTEGRATOR
*Abacus icon made by Freepik from www.flaticon.com