...
Excerpt |
---|
Abiquo can display billing data for customers and reseller hierarchy customers on the Hybrid dashboards and on the Last bills and Estimated bill widgets for the cloud provider. You may need to enable programmatic access to billing in |
...
Configure programmatic billing in cloud providers
Amazon
See the AWS documentation about how to configure programmatic billing for AWS EC2 - https://aws.amazon.com/blogs/aws/new-programmatic-access-to-aws-billing-data/
...
Assign the following policy to the S3 bucket. Replace "programmaticbilling" with the name of your bucket
Code Block |
---|
{
"Version": "2008-10-17",
"Id": "Policy1335892530063",
"Statement": [
{
"Sid": "Stmt1335892150622",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::386209384616:root"
},
"Action": [
"s3:GetBucketAcl",
"s3:GetBucketPolicy"
],
"Resource": "arn:aws:s3:::programmaticbilling"
},
{
"Sid": "Stmt1335892526596",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::386209384616:root"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::programmaticbilling/*"
}
]
} |
...
Azure
- Grant access to billing records to the app role created in Azure for your account
- Obtain the OfferDurableID from the offer agreement for your enterprise by going to your subscription → Administer.
- Also, obtain the Currency, Locale and RegionInfo.
Reference for Azure billing: https://docs.microsoft.com/es-es/azure/billing/billing-usage-rate-card-partner-solution-cloudyn
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 and import schemas
AWS:
Code Block |
---|
mysql -e "create database ec2_billing"
mysql -h -p -u ec2_billing < /opt/abiquo-billing-ec2/lib/app/schema.sql |
Azure:
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 AWS, this is file is located at /opt/abiquo-billing-ec2/config/config.yml and the following example file shows the values that 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: |
...
The billing database is the one you created in the above steps, so it can be hosted on localhost
"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 the "billing_bucket" property, with a value of the name of the billing bucket you created
...
- OfferDurableID
- Currency, the default is "USD"
- Locale, the default is "en-US"
- RegionInfo, the default is "US"
...
your cloud provider account, and you must add a credential with billing access in the provider to Abiquo. The platform may take up to 2 days to display data in the Estimated bill section. Users in your reseller customer enterprises can display billing data:
Remember that each Abiquo enterprise can have credentials for one customer account/subscription only. And that you can use these credentials in one Abiquo enterprise only. |
For specific instructions for each provider, see:
For Abiquo 6.0.x and earlier versions, see Display private cloud billing data
In Abiquo 6.1.0, for on-premise billing, see Configure on premise billing
You can also add custom providers and data using the API, for example, for private cloud. For API resource documentation, see:
https://wiki.abiquo.com/api/latest with BillsResource, BillRegistersResource, CostUsageResource
Note that cost usage reports for on-premise billing are not available in Abiquo 6.1.0