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

...

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 billing packages. The package name for Azure is "abiquo-billing-arm"
  2. 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


  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.

    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: 


    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

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

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

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


  2. 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'


  3. Edit the enterprise in Abiquo and create the following enterprise properties:
    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.

...

  1. Grant access to billing records to the app role created in Azure for your account
  2. Obtain the OfferDurableID from the offer agreement for your enterprise by going to your subscription → Administer
  3. Also obtain the Currency, Locale, and RegionInfo. 
  4. Edit the enterprise in Abiquo and create the following enterprise properties:
    1. "OfferDurableID" with the value from your subscription, e.g., "MS-AZR-0003P"
    2. "Currency", the default is "USD"
    3. "Locale", the default is "en-US"
    1. "RegionInfo", the default is "US", which is a 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

...

Complete user configuration in Abiquo

  1. In Abiquo, check that the Abiquo API user has the Manage bills privilege
  2. Assign Abiquo users the privileges to Display hybrid dashboard tab, View bills, and optionally to Display VM cost view widget (hybrid tab). See Configure dashboard display