Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Quick Start

PlamenDoychev edited this page Apr 24, 2018 · 11 revisions

Prerequisites:

Procedure:

1. Create metering service instance

cf create-service metering standard abacus

2. Deploy and bind the demo application

git clone git clone https:/cloudfoundry-incubator/cf-abacus.git
cd cf-abacus/test/broker/src/test/apps/test-app/
cf push --no-start --random-route
cf bind-service abacus-broker-test-app abacus
cf start abacus-broker-test-app

3. Find Abacus Dashboard URL

Search for dashboard URL in cf service abacus output:

Showing info of service abacus in org <org> / space <space> as <user>...

name:            abacus
service:         metering
bound apps:      abacus-broker-test-app
tags:
plan:            standard
description:     Resource consumption service based on cf-abacus
documentation:
dashboard:       https://abacus-service-dashboard.<domain>/manage/instances/6d79654d-8344-4c08-8117-7f5157d50b2e

4. Submit usage document

Open the Dashboard URL (found in step #3) in a Web browser, login, and select "Submit usage document" from the Action column. Submit the document.

❗In order to log in to the Dashboard you should have a SpaceDeveloper role assigned to your global account.

5. Find application URL

cf app abacus-broker-test-app
Showing health and status for app abacus-broker-test-app in org <org> / space <space> as <user>...

name:              abacus-broker-test-app
requested state:   started
instances:         1/1
usage:             128M x 1 instances
routes:            abacus-broker-test-app.<domain>
<...>

6. Get report

In your browser open the app route followed by /summary/idz:sampleIdentityZoneId.

This should look like: https://abacus-broker-test-app.<domain>/summary/idz:sampleIdentityZoneId

7. Check the report

The resources/0/plans/0/aggregated_usage/0/windows/4/0 node should contain quantity: 100 and summary: 100.

<< Resource Provider Tutorial Under the Hood >>

Related Links:

Clone this wiki locally