Background

Optima uses bill data to provide an accurate view of your costs across accounts and services. This data is consumed by the Optima platform and made available for pre-built and ad-hoc analyses. In order to gather the cost information, certain configuration steps must be performed with specific data and credentials being shared with Optima.

This page describes the configuration and input information needed to connect Google billing data to Optima using BigQuery billing exports.

For instructions on using Optima to add or update billing information, see the billing information guide. For instructions on connecting your cloud accounts to the platform for management purposes, see the cloud account management guide

If you have any questions and would like live assistance, please join us on our chat channel on chat.rightscale.com or email us at support@rightscale.com.

Overview

This page walks you through the steps to connect your Google cloud billing data to RightScale for cost reporting purposes.

The following steps must be completed in order for RightScale to provide insight on your Google cloud bill:

  1. Enable Billing Data Export to BigQuery in GCE
  2. Allow RightScale to access the BigQuery dataset

Each of the steps above is explained in detail on this page.

Enable Billing Data Export to BigQuery in GCE

RightScale consumes the billing data via the BigQuery export method in Google. This can be enabled in GCE for each Billing Account and will contain data for all projects in that Billing Acccount.

If you have already configured billing export to BigQuery, please ensure you have the Dataset ID and Project that contains the dataset, and proceed to the next step.

If you need to configure data export to BigQuery, please follow the instructions provided by Google for your Google billing accounts.

Take note of the Dataset ID when you create the dataset as well as the Project in which the dataset exists.

Allow RightScale to access the BigQuery dataset using a Service Account

Once your billing data is being exported to BigQuery, RightScale needs access to the BigQuery dataset to read the data. The RightScale platform uses a Google Service Account to gain access to the BigQuery dataset.

Create or identify which Google Service Account you want to use for this permission, and ensure you have access to the JSON private key for the service account as well as the service account ID.

Once you have determined the service account you would like to use, the following steps must be completed:

Grant project-level IAM roles

The first step is to grant the service account the roles necessary to interact with BigQuery within the project.

  1. In Google Cloud Platform, navigate to the IAM menu
  2. Ensure the selected project is the on that contains the billing BigQuery dataset
  3. Click on the Add icon at the top
  4. Enter the service account ID
  5. Select the BigQuery Data Viewer and BigQuery Job User roles
    • Data Viewer - required to read data from the specified dataset
    • Job User - needed to create query jobs from which results can be read (currently 2 jobs per day are created)
  6. Click Add

    gce-bigquery-creds-step1.png

Share the dataset with the service account

Additionally, the BigQuery dataset must explicitly be shared with the service account.

  1. In Google Cloud Platform, navigate to BigQuery
  2. Locate the dataset that contains your billing data and hover your mouse on the right to expose the dropdown menu
  3. In the dropdown menu, selet Share dataset

    gce-bigquery-creds-step1.png

  4. Towards the bottom, in the Add people box, enter the service account ID, ensure Can view is selected, and press Add

  5. Press Save changes

    gce-bigquery-creds-step1.png

Submit the information

Follow the billing configuration guide to submit the above information to Optima