百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

cf-abacus

> 编程语言
开源

CF 使用量计量和聚合

99 stars0 点赞4 次浏览
访问官网GitHub

工具介绍

CF 使用量计量和聚合

CF-Abacus

The Abacus usage metering and aggregation service. Overview

Abacus provides usage metering and aggregation for Cloud Foundry (CF) services. It is implemented as a set of REST micro-services that collect usage data, apply metering formulas, and aggregate usage at several levels within a Cloud Foundry organization.

Abacus is implemented in Node.js and the different micro-services can run as CF apps.

This diagram shows the main Abacus services and their role in the processing of usage data. It also shows the services you can deploy around Abacus to integrate it into your Cloud platform.

Abacus provides a REST API allowing Cloud service providers to submit usage data, and a REST API allowing usage dashboards, and billing systems to retrieve usage reports. The Abacus REST API is described in doc/api.md.

For presentations related to CF-Abacus, see the presentations page.

Frequently Asked Questions (FAQs)

The Abacus FAQ can be found in doc/faq.md.

Building

Abacus requires Node.js >= 8.10.0, Yarn > 1.3.2, MongoDB >= 3.4 and RabbitMQ >= 3.6

bash
cd cf-abacus

# Start local MongoDB and RabbitMQ
docker-compose up

# Bootstrap the build environment
# install the Node.js module dependencies and run the tests
yarn run build

Running Abacus on localhost

The Abacus apps can also run on your local host in a shell environment outside of Cloud Foundry, like this:

bash
cd cf-abacus

# Start local MongoDB and RabbitMQ
docker-compose up

# Start the Abacus apps
yarn start

# Wait a bit until all the apps have started

# Run the demo script
yarn run demo

# Stop everything
yarn stop

Dependency management

Abacus uses yarn to fix the versions of a package's dependencies. Fixed dependencies are persisted in yarn.lock file which is located at the same directory where package.json file exists.

Updating dependencies

  • Automatically Dependencies could be updated automatically for the whole repository by executing the steps bellow. As a result this script will regenerate all lock files.
bash
cd cf-abacus

# Generates the yarn.lock files
bin/update-dependencies
  • Manually If you prefer to update dependencies of particular module, it is possible to do it manually with the following steps.
bash
cd cf-abacus/lib/

# Delete existing dependencies
rm -rf node_modules/

# Delete existing lock file
rm yarn.lock

# Install/Update dependency/cies in package.json file either manually or via yarn
yarn add 

# Add dependency
yarn install

Testing

bash
cd cf-abacus

# Start local MongoDB and RabbitMQ
docker-compose up

# Run eslint on the Abacus modules
yarn run lint

# Run the tests
yarn test

For a list of all available tests check doc/tests.md.

Deploying to Cloud Foundry

Check our wiki on how to deploy Abacus to Cloud Foundry.

Layout

The Abacus source tree is organized as follows:

…

Developing individual Abacus modules

As shown in the above Layout section, Abacus consists of a number of Node.js modules under the lib directory.

When developing on Abacus you may want to quickly iterate through changes to a single module, and run the tests only for that module rather than rebuilding the whole project each time.

Here are the steps most of us follow when we work on a single module, using the collector module as an example.

First, bootstrap your Abacus development environment:

bash
cd cf-abacus

# Setup the base Node.js tools and dependencies used by the Abacus build
yarn run bootstrap

Then install your module's dependencies as usual with yarn:

bash
cd cf-abacus/lib/metering/collector
yarn install

At this point your development cycle boils down to:

bash
cd cf-abacus/lib/metering/collector

# Run ESLint on your code and run the module's unit tests
yarn test

To run the collector app you can do this:

bash
cd cf-abacus/lib/metering/collector
yarn start

To push the app to your Cloud Foundry instance, do this:

bash
cd cf-abacus/lib/metering/collector
yarn run cfpush

Finally, to rebuild everything once you're happy with your module:

bash
cd cf-abacus

# Important to do at this point as the next step does a git clean
git add 

# Does a git clean to make sure the build starts fresh
yarn run clean

# Build and unit test all the modules
yarn run build

# Or to run what our Travis-CI build runs, including integration tests
yarn run cibuild

People

List of all contributors

License

Apache License 2.0

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptabacusaggregationcf-extensionscloudfoundry

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言