Integrate a marketplace with a Google Cloud Platform account
This section describes how Marketplace Managers integrate a Google Cloud Platform account with their marketplace. It could be a new, or an existing, Google Cloud Platform account on the Google console. After integration, Marketplace Managers can edit the following settings:
- Partner email
- Locale
- Partner credentials
- BigQuery credentials
All other settings cannot be edited.
Prerequisites
- Contact your AppDirect technical representative to enable some settings on your marketplace.
- An admin account on the Google Cloud Platform.
- Decide which revenue model you are going to use.
To integrate a marketplace and a Google Cloud Platform account
đź“ť Note: If the AppDirect logo appears in the upper-left corner of the page, when Manage > Marketplace appears in this topic, click the grid icon > Switch to | Store, instead.
Collect the information you will enter on the Configure Google Cloud Platform page.
Complete the following procedures, on the Google Console, in the order below:
To create and configure a project on the Google Cloud Platform
- Go to the Google Cloud Platform and sign in with your admin credentials. Accept the Terms of Service.
- Create a new, empty project. Give the project a descriptive name for the marketplace.
- The Google Cloud Platform assigns a project number to your newly created project.
- Configure consent screen.
- Go to APIs & Services > Credentials and click Configure consent screen. The OAuth consent screen opens.
- For the User Type select Internal, and click Create.
- Select the Service Management API and bigQuery API scopes.
- Enter an application name in the Application name field. Use the name of your marketplace or another descriptive name.
- Click Save.
- Create your credentials:
- Go to APIs & Services > Credentials > + Create Credentials > OAuth client ID.
- Click Web application for the Application type.
- Enter a descriptive name for the Web application.
- In Authorized redirect URIs, enter
https:// developers.google.com/oauthplayground in the URIs field. - Click Create. The OAuth client is created and a dialog opens.
- Click the download icon to download your credentials. The credentials are downloaded as a JSON file. You need to upload this file in the User Interface.
- Record your Google Apps Client ID and Client Secret. The client secret is only shown once, but can be regenerated if required to re-authorize.
To generate tokens
Generate tokens for Google Cloud Platform products. These do not apply to G Suite products.
- Go to https://developers.google.com/oauthplayground/. The OAuth 2.0 playground opens.
- Click the OAuth 2.0 Configuration icon.
- Click Use your own OAuth credentials.
- Enter the client ID and secret that you already downloaded on the Google Cloud Platform.
- In Step 1 Select & authorize APIs, add the following scopes:
https:// www .googleapis.com/auth/cloud-platformhttps:// www .googleapis.com/auth/cloud-billing
- Click Authorize APIs and the Authorize code field is automatically generated.
- Click Auto-refresh the token before it expires. Click Exchange authorization code for tokens.
- A Refresh token displays. Save this token as you need to enter it in the User Interface. The token is live for 60 minutes.
To get the Billing account ID
- Go to the Google Cloud Platform and sign in with your admin credentials.
- Accept the Terms of Service.
- Go to Billing > Manage billing accounts. Note the Billing account ID. This is the parent billing account for all projects via AppDirect order. One project is created for each Google Cloud Platform subscription.
To create a new folder in your project
- Click Manage resources.
- Click Create Folder and name your folder. The Google Cloud Platform adds an ID to your folder.
- Click Save.
To enable API permissions
- Select the Cloud Resource Manager API and click Enable.
- Go to the browser and test this URL
https://console.developers.google.com/apis/api/cloudbilling.googleapis.com/overview?project=<projectNumber>
where the projectNumber is assigned by the Google Cloud Platform in procedure 1, To create and configure a project on the Google Cloud Platform. - Select the Cloud Billing API and click Enable.
To create a BigQuery dataset
Note: Before you proceed, please ensure that you have Billing Account Administrator role for the target Cloud Billing account and BigQuery Admin role for the Cloud project that contains the BigQuery dataset that will be used to store the Cloud Billing data.
- Go to the Google Cloud Platform and sign in with your admin credentials.
- Accept the Terms of Service.
- In BigQuery, select BigQueryBilling.
- Select the Project you created in To create and configure a project on the Google Cloud Platform and click Enable
- Click Create Dataset.
- Enter the required information in the Create Dataset panel.
To export your cloud billing data to a BigQuery dataset
- Go to the Google Cloud Platform and sign in with your admin credentials.
- Select Billing. If you have more than one Cloud Billing account, do one of the following:
- To manage Cloud Billing for the current Cloud project, select Go to linked billing account.
- To locate a different Cloud Billing account, select Manage billing accounts and choose the account for which you'd like to enable Cloud Billing data export to BigQuery.
- In the Billing navigation menu, select Billing export.
- Select the BigQuery export tab.
- Click Edit settings to enable export and to update the export settings.
- From the Project list, select the project where you want to store your BigQuery dataset.
- Select a dataset from the Billing export dataset list. BigQuery export will create a table with your billing data in the selected dataset.
- Click Save.
To create a service account
- Go to the Google Cloud Platform and sign in with your admin credentials.
- Verify the BigQuery API is enabled for your project as follows:
- Go to APIs & Services > Dashboard.
- Click + Enable APIs and Services. Search for the BigQuery API in the Search box and enable it.
- Select your project.
- Go to APIs & Services > Credentials > Service Account.
- Add Service account details.
- Add a display name and a description.
- Add the BigQuery Admin role.
- Click Save.
- Create a JSON Key and save the downloaded JSON file. You need to upload this file in the User Interface.
- Go to Manage > Marketplace > Settings > INTEGRATION | Vendor Integrations > Google. The Google Integration page opens.
- Select Configure Google Cloud Platform to integrate your marketplace with a Google Cloud Platform account. The Configure Google Platform page opens.
- In Step 1, add the following information:
- Select a revenue model:
- Model A
- Model C
- Billing account ID
- Partner email—Enter a valid email address.
- Select a Locale—The default locale for your marketplace.
- Partner credentials—choose the JSON file you saved on the Google Console.
- Dataset name
- BigQuery credentials—choose the JSON file you saved on the Google Console.
- Select a revenue model:
- Click Save.
- In Google Products, you can link Google Cloud Platform products from the Product catalog with your Google Cloud Platform account. Then you can sell those products on your marketplace. To create and configure Google Cloud Platform products on your marketplace, see Create Google Cloud Platform products topic in Google Cloud Platform products section.
- Type a name or the product UUID in the search bar.
- Click the product name or UUID and then it is linked and will display in the Linked Google products panel.
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!