Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: 5.2.0 - release -

This page describes how to configure Azure billing data for resellers with CSP accounts. 

  • For standard accounts

...

The platform populates the billing dashboard with data from the cloud provider. To use these scripts, configure , so you will need to allow 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. provider.

  • After you configure

...

  • this feature, the platform may take up to 2 days to display data in the Estimated bill section of the Hybrid dashboard. 

Install and configure billing packages

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 schema

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

...

Configure CSP accounts

For reseller tenants that use a CSP account, do the following To display billing data for reseller tenants and their customers, do these steps:

  1. CSP resellers must give consent for the use of the CSP account in the platform. Contact Customer Service for more information

    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 reseller. Create a unique random string to use as a reseller key for each entry, which in this example is "4caba317".

    Code Block 4caba317: tenantId: clientId: clientSecret: '' accessToken: '' refreshToken: '' resource: 'https://api.partnercenter.microsoft.com'

    .
    The consent process will generate the accessToken and the refreshToken, which are part of the pricing credentials.

  2. By default, the platform will retrieve billing data for the last two months. To change this value, on the Abiquo Server, edit the abiquo.properties file and add the following property with the number of months to retrieve:

    Code Block
    abiquo.enterprise.property.billing.monthoffset=2


  3. In Abiquo, edit the reseller enterprise and create the

    following

    enterprise properties:

  4. "OfferDurableID" with the value of tenant key 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.
  5. "
    PropertyDescriptionPrevious valueMigration

    azurecompute-arm_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.
  6. "Currency", the default is "USD"
  7. "Locale", the default is "en-US"
  8. "RegionInfo", the default is "US", which is a two

    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.
    This is done using the formula  total =  TotalFromCSP/(1 -  azurecompute-arm_discount )


    (tick)-

    azurecompute-arm_price_factor

    Default value for enterprises that do not have this value in their hierarchy.
    Also used to calculate the user invoice for billing dashboard.
    Also used for retrieving hardware profile prices from the provider.
    The platform will apply changes to the price factor in the next billing period.

    (tick)-

    azurecompute-arm_currency_code

    Default is "USD". Three character currency code of the bill. WARNING! Different from currency_code used for conversion factor

    Currency(tick)

    billing.azure.country_code

    Two digit ISO code representing the country where you purchased the subscription

  9. For customers with Azure plans, add "onlyazuresubscriptionbill" with any value to indicate that an enterprise should not display the products and services that are invoiced to the customer
  10. For the customers of the reseller

    .
    The default of "US" is set in abiquo.properties in Remote Services as abiquo.billing.azure.country_code.
    So you only need to set this enterprise property to change the default value.

    RegionInfo(tick)


  11. The following properties are deprecated in Abiquo 5.2.0 and the upgrade process will remove them:
    1. OfferDurableID
    2. Locale
  12. For reseller customers, edit the enterprise and create the following properties:


    "

    PropertyDescriptionPrevious valueMigration

    azurecompute-arm_discount

    Decimal value (with dot separator), used to calculate the user invoice for billing dashboard.

    (tick)-

    azurecompute-arm_price_factor

    " with the

    The value of the discount or markup applied by the partner to the end user.
    The default value is 1

    To display data on the Billing dashboard for an enterprise

    .

    (tick)-


  13. For reseller customers with Azure plans under “CSP” subscriptions, create the following properties:

    PropertyDescriptionPrevious valueMigration
    azurecompute-arm_only_bill_subscription

    For Azure plans under CSP accounts only.
    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.

    New-


  14. For any reseller customer that will not use the compute features of the provider, enter to display data on the Billing dashboard, enter compute Credentials on the Public tab in the format Subscription##TenantId. 
    See Add credentials of reseller customers for billing only.
  15. In Abiquo, assign the following privileges
  16. The Abiquo API user requires the Manage bills privilege
  17.  Abiquo users edit the reseller enterprise and go to Credentials → Pricing and add the Pricing credentials,
  18. In Abiquo, users will require the privileges to Display hybrid dashboard tab , and View bills, and optionally to Display VM cost view widget (hybrid tab). See Configure dashboard display