Google Cloud Platform connector - Documentation for BMC Helix Cloud Cost 20.02

StepDetails

Subscribe to the Google Cloud Platform.

Important:Ensure that you create a billing account in US dollar only. The connector does not support other currency formats.

 Steps to subscribe to the Google Cloud Platform

  1. Log in to the Google Cloud Platform console with your Google account credentials.
  2. Select your email preferences, accept the terms of service, and click Agree and continue.
  3.  Sign up for a free trial or apply for a paid subscription.

Create projects to manage virtual machine instances, billing, and Cloud Platform services.

 About projects

All the Google Cloud Platform resources, such as Google Compute Engine virtual machines, Google Cloud Storage buckets, and Google App Engine instances are grouped under a project. Projects are required for using all Cloud Platform services, managing APIs, enabling billing, adding and removing collaborators, and managing permissions.

 Steps to create a project in the Google Cloud Platform

  1. Log in to the Google Cloud Platform console with your Google account credentials.
  2. On the title bar, next to Google Cloud Platform, click Select a project.

    If you have already created projects and updated any of them, the name of the last project that you worked on is displayed besides Google Cloud Platform. In this scenario, click the project name.

  3. Click New project. In the Project name field, specify a name for your project. The project ID is generated automatically.
  4. Click Create.
  5. On the upper-left corner of the page, click Select a project or the project name next to Google Cloud Platform. Your recently created project name is displayed in the list.
  6. Select the project, and click Open.
    The project dashboard is displayed, and you can start working in the project.

Create a service account to authenticate applications that run on your virtual machine instances to access other Google Cloud Platform services. 

If you want to retrieve data from multiple projects by using a single connector, create a separate service account key file for each project.

 About service accounts

A service account acts as an identity for an instance or an application that runs on a virtual machine. You can use service accounts to create instances and other resources. A single instance can belong to a single service account only, and you can change the service account for the instance.

 Steps to create a separate service account for each Google project

  1. Log in to the Google Cloud Platform console with your Google account credentials.
  2. From the title bar, select the project for which you want to create the service account.
  3. From the left navigation pane, click IAM & admin > Service accounts.
  4. Click Create Service Account.
  5. On the Create service account page, complete these steps:
    1. Specify a name for the service account.
      The service account ID is generated automatically when you enter the service account name.
    2. (Optional) Specify the service account description.
    3. Click Create.
    4. On Service Account Permissions page, select Compute Engine > Compute Viewer.This role provides read-only access to Compute Engine resources.
  6. Click Add Another Role, and select Monitoring > Monitoring Viewer. This role provides read-only access to monitoring and configuration data. Click Continue.
  7. Click Create Key, and retain the default selection as JSON for the key type.
  8. Click Create.
    The settings are saved, and a confirmation message is displayed. The private key for the account is saved in a service account key json file and downloaded to your computer.
    Repeat this procedure for each new Google Cloud Project for which you want to collect the performance data.

    Ensure that you save this key file securely. If this file is lost or tampered, you need to create a new key.

Create a billing account.

 About billing account

A billing account is a payment profile that contains payment-related settings, such as payment method and a billing address. Each project is attached to a billing account, and any costs that are incurred for the project are added to the billing account. Multiple projects can be attached to a single billing account.

 Steps to create a billing account

  1. Log in to the Google Cloud Console with your Google account credentials.
  2. In the left navigation pane, click Billing > Manage billing accounts.
  3. If this is your first billing account, complete the following steps. Otherwise, go to step 4.
    1. Click Add billing account.
    2. On the Try Cloud Platform for free page, specify your country, accept the terms of service, and click Agree and continue.
    3. On the customer information page, add the details, such as account type, tax status, name and contact, and the credit card number.
    4. Click Start my free trial.
      If the specified details such as card number are correct, a confirmation message about the generation of the billing account is displayed.
  4. If you already have some existing billing accounts and want to create a new billing account, complete these steps:
    1. Click Create account.
    2. In the Name field, specify a name for the billing account, and click Continue.
    3. Verify your country and currency, and click Confirm.
    4. On the payments profile page, enter your billing information, such as account type, tax status, name and address, credit card details, and click Submit and enable billing.
    5. On the verification page, enter the 3-letter CVV number that is on the back of your card, and click Continue.
      The billing account is created and is added to the list of existing billing accounts.
Add the email addresses of the service accounts for the projects (projects that are linked to the billing account) to the billing account, and assign the Billing Account Viewer role to each service account that you want to use for the connector.

 Steps to add service account email addresses to billing account for multiple service accounts

  1. Log in to the Google Cloud Console with your Google account credentials.
  2. In the left navigation pane, click Billing.
  3. Click ALL BILLING ACCOUNTS and then select the billing account that is linked to your projects.
  4. In the right pane, click SHOW INFO PANEL and do the following:
    1. In the Add members field, add the email addresses of the service accounts that you have created for each project in earlier steps.
    2. From the Select a role list, select Billing > Billing Account Viewer.
    3. Click Add.
      The settings are saved, and a confirmation message is displayed.
Link projects to a billing account so that the costs that are incurred for the projects are added to the billing account. You can link all your projects to a single billing account or can link each project to a separate billing account.

 Steps to link a billing account to projects

  1. Log in to the Google Cloud Console with your Google account credentials.
  2. On the upper-left corner of the page, click Select a project or the project name next to Google Cloud Platform, and select a project from the list.
  3. In the left navigation pane, click Billing > Link a billing account.
  4. From the Billing account list, select the required billing account, and click SET ACCOUNT.
    You are directed to the billing summary page that displays the current status of remaining credits, and a list of projects that are attached to the billing account.
    If a billing account is not available, you are prompted to create the billing account.
Create a bucket to store the billing data of your projects. The billing data of all the projects that are associated with a billing account is stored in a single bucket.

 Steps to create a bucket

  1. Log in to the Google Cloud Console with your Google account credentials.
  2. Select the project in which you want to create the bucket to collect the billing data.
  3. In the left navigation pane, click Storage > Browser, and then click CREATE BUCKET.
  4. On the Create a bucket page, specify the following details:
    1. In the Name field, specify a bucket name. Ensure that the name is according to the bucket naming guidelines.
    2. From the Default storage class list, select an appropriate default storage class based on your requirements.
    3.  From the Location list, select a location where you want to store the bucket data.
    4. In Access control model, select Set object-level and bucket-level permissions.
  5. Click Create.
  6. On the Bucket details page, select the Permissions tab.
  7. Click Add members. In the New members field, add the email address of the billing service account.
  8. In Select a role field, select Storage Legacy>Storage Legacy Bucket Reader role.
Create a bucket for each project to store usage data of your projects.

 Steps to create a usage bucket

  1. Log in to the Google Cloud Console with your Google account credentials.
  2. In the left navigation pane, click IAM & admin > Service accounts.
  3. For each project, note down the email address of the service account that you want to use. Save this information for future reference.
  4. Select the project in which you want to create the usage bucket.
  5. In the left navigation pane, click Storage > Browser, and then click CREATE BUCKET.
  6. On the Create a bucket page, specify the following details:
    1. In the Name field, specify a bucket name. Ensure that the name is according to the bucket naming guidelines.
    2. From the Default storage class list, select an appropriate default storage class based on your requirements.
    3.  From the Location list, select a location where you want to store the bucket data.
    4. In Access control model, select Set object-level and bucket-level permissions.
  7. Click Create.
  8. On the Bucket details page, select the Permissions tab.
  9. Click Add members. In the New members field, add the email address of the service account associated with the project.
  10. In Select a role field, select Storage Legacy>Storage Legacy Bucket Reader role.
    Repeat steps d to j for all the projects in which you want to create the usage bucket.
Enable the generation of a billing report so that the connector can collect the billing details of your project resources. GCP generates billing reports either monthly or when your account exceeds certain charges, which is known as threshold billing.

 Steps to enable billing reports

  1. Log in to the Google Cloud Console with your Google account credentials.
  2. On the upper-left corner of the page, click Select a project or project name besides Google Cloud Platform, and select a project from the list.
  3. In the left navigation pane, click Billing > Go to linked billing account.
  4. Click Billing export > File export.
  5. In the Bucket Name field, specify the name of the bucket where you want to export the billing reports. The write access is granted to the associated service account.
  6. In the Report prefix field, specify a prefix for the Cloud Storage object name for the exported reports. The year, month, and day are appended to the prefix.
  7. From the Format list, select CSV or JSON.
  8. Click Enable billing report.
For each Google Project for which you want to collect the billing and usage data, enable the generation of usage report so that the connector can collect the usage data of the project resources.

 Steps to enable usage reports

  1. Log in to the Google Cloud Console with your Google account credentials.
  2. On the upper-left corner of the page, click Select a project or project name besides Google Cloud Platform, and select a project from the list.
  3. In the left navigation pane, click Compute Engine Settings.
  4. Select the Enable usage report check box.
  5. In the Cloud Storage bucket field, enter a bucket name or click Browse and select a bucket name. The daily usage reports are stored in this bucket.
  6. (Optional) In the Report prefix field, specify a prefix for the Cloud Storage object name for the exported reports. The year, month, and day is appended to the prefix.
  7. Save the changes.
Enable the cloud storage and billing APIs to collect the billing and usage data.

 Steps to enable APIs

  1. Log in to the Google Cloud Console with your Google account credentials.
  2. In the left navigation pane, click APIs and services Dashboard. A list of APIs that are enabled is displayed.
  3. Verify that the following APIs are enabled:
    1. Google Cloud Storage
    2. Google Cloud Billing API
  4. If the APIs are disabled, perform these steps to enable them:
    1. Click Enable APIs and Services.
    2. Search for the required APIs, select them, and click Enable.
      The APIs are added to the list of enabled APIs.

You Might Also Like