Abiquo 5.1

Skip to end of metadata
Go to start of metadata

This page describes how to configure Azure billing data for resellers. For standard accounts see Display Azure billing data for standard accounts

The platform populates the billing dashboard with data from the cloud provider. To use these scripts, 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. 

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. 

  1. Install the "abiquo-billing-arm" package
  2. Create the local billing databases for Azure and import schema

    mysql -e "create database arm_billing"
    mysql -h -p -u arm_billing < /opt/abiquo-billing-arm/lib/app/schema.sql
  3. Grant privileges to a user for the local billing databases

  4. 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.

    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: 


    Notes: 

    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

  5. For the Abiquo database, grant select privileges from this host to the abiquo_database user that will run the billing scripts 

Configure CSP accounts

For reseller tenants that use a CSP account, do the following steps:

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

  2. Create a CSP billing configuration file at the following location:

    /opt/abiquo-billing-arm/lib/app/config/csp.yml
  3. 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".

     4caba317:
      tenantId:
      clientId:
      clientSecret: ''
      accessToken: ''
      refreshToken: ''
      resource: 'https://api.partnercenter.microsoft.com' 
  4. In Abiquo, edit the enterprise and create the following enterprise properties:
    1. "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.
    2. "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.
    3. "Currency", the default is "USD"
    4. "Locale", the default is "en-US"
    5. "RegionInfo", the default is "US", which is a two digit ISO code representing the country where you purchased the subscription
  5. For the customers of the reseller, edit the enterprise and create the following properties:
    1. "azurecompute-arm_price_factor" with the value of the discount or markup applied by the partner to the end user. The default value is 1.
  6. In Abiquo, assign the following privileges
    1. The Abiquo API user requires the Manage bills privilege
    2.  Abiquo users require the privileges to Display hybrid dashboard tab, View bills, and optionally to Display VM cost view widget (hybrid tab). See Configure dashboard display