Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
The platform populates the billing dashboard widgets using scripts that obtain the billing information from the cloud providers. So you will need to configure programmatic access to billing in the cloud providers. And you will need to install the billing packages and configure and the scripts so they can obtain billing data and add it to Abiquo. After you configure billing widgets, the platform may take up to 2 days to display data in the Estimated bill section of the dashboard. 

Configure billing data display in Azure

The first part of the configuration for Azure depends on whether your tenants use a CSP (cloud service provider) subscription for resellers, or a standard Azure subscription.

Configure CSP accounts

If your tenants use a CSP account, do the following steps first.

Create a CSP billing configuration file at the following location:

Code Block
/opt/abiquo-billing-arm/lib/app/config/csp.yml

Add the billing credentials for the CSP subscription used by each tenant. Create a unique random string to use as a tenant key for each entry.

Code Block
4caba317:
  token_expender: https://login.windows.net/reseller.onmicrosoft.com/oauth2/token?api-version=2.1
  username: 'brokermulticloud@csp.onmicrosoft.com'
  password: 'Password'
  client_id: 'A1CD905A-C9AA-418B-8BD1-62BEA2CC3622'
  grant_type: 'password'
  resource: 'https://api.partnercenter.microsoft.com'
  scope: 'openid profile'

...

  1. "OfferDurableID" with the value of the CSP subscription and the tenant in the format "CSP_ID_[UUID_key_from_csp.yml_file]". So from the above example, for the tenant with ID 4caba317, this would be CSP_ID_4caba317.
  2. "CSP_discount" with the value of the discount applied by Azure to partner providers. To find the PVP, the values on the bills must be divided by (1- CSP_discount). The default is 0.15.
  3. "CSP_PriceFactor" with the value of the discount applied by the partner to the end user. The default value is 1.

Configure standard Azure accounts

If your tenant has a standard Azure account, do the following steps first.

...

To display Azure billing data for resellers and their customers:

  1. Abiquo can obtain Azure billing data with the credentials you enter when you configure Abiquo to:

    1. Create a reseller with CSP pricing credentials; OR

    2. Create an enterprise with compute or billing only credentials, with a Contributor role.
      See Onboard an Azure CSP or AWS organization account.

  2. Edit the CSP reseller enterprise and set the following enterprise properties:

    1. azurecompute-arm_discount: decimal value (with dot separator), used to calculate the user invoice for billing dashboard. CSP APIs return prices with a discount applied, which we remove to display for customers. We use the formula: total = TotalFromCSP/(1 -  azurecompute-arm_discount). This is a required property

    2. azurecompute-arm_currency_code: The default is USD. Three character currency code of the bill. Warning - this is different from currency_code used for conversion factor. This is a required property

    3. billing.azure.country_code: Two digit ISO code representing the country where you purchased the subscription

...

Install and configure billing packages

Do the following steps for all account types.

You will need a server with MariaDB running with access to the Abiquo API, Abiquo database, and public cloud providers. 

...

Create the local billing databases for Azure and import schemas

Code Block
mysql -e "create database arm_billing"
mysql -h -p -u arm_billing < /opt/abiquo-billing-arm/lib/app/schema.sql

...

Grant privileges to a user for the local billing databases

Configure the billing packages, edit the config.yml file. By default for Azure, this is file is located at /opt/abiquo-billing-arm/config/config.yml and the following example file shows the values that you must replace.

Code Block
abiquo_database:
  host: 10.10.10.36
  user: user
  password: password
  port: 3306
billing_database:
  host: 10.10.10.38
  user: user
  password: password
  port: 3306
abiquo:
  api_url: http://10.10.10.32/api
  user: admin
  password: xabiquo
  seed: 

...

  1. The billing database is the one you created in the above steps, so it can be hosted on localhost

  2. "seed" is the name of a custom seed that encrypts the Abiquo database. Copy the custom seed into the same directory as the config.yml file for each provider

...

    1. . The default of US is set in abiquo.properties on Remote Services as abiquo.billing.azure.country_code.

  1. Optionally, configure price factors for markups. See Manage price factors

  2. Edit reseller customer enterprises and add this enterprise property:

    1. azurecompute-arm_discount: Decimal value (with dot separator), used to calculate the user invoice for billing dashboard.

  3. If the customer enterprise has Azure plans, they may have a keynode enterprise and several standard enterprises below it to use the plans credentials. Edit the standard enterprises and add this property.

    1. azurecompute-arm_only_bill_subscription:If this property is true, for an Azure plan, only bill for usage - do not include the customer's products and services in the billing data for this enterprise.

...

Abiquo properties for Azure billing data display

On the Abiquo Server, you can configure the following properties for Azure billing.

  • abiquo.enterprise.property.billing.monthoffset: By default, the platform will retrieve billing data for the last two months. To change this set the following property to the number of months to retrieve.
    Default value:2

  • abiquo.azure.billing.parser.lineitem.publisher.ignore: By default, Abiquo will bill SaaS resources, such as a Twilio subscription, to the enterprise that the subscription is assigned to. This corresponds to the billing scope ID of a billing line item. To exclude products from specific publishers from Azure billing, add the following property, and enter a string of publishers to exclude from billing line items in CSV format. With the public-cloud-billing-check-tool for Azure, use the --excludedPublishers option. Default value:Microsoft Office

On the Remote Services, you can configure the following properties for Azure billing.

  • abiquo.billing.azure.country_code: For Azure price factors. Two digit ISO code representing the country where you will obtain the product list. Default value:US

...