1 – Stackdriver Connection Setup
Connect Harness to Stackdriver to have Harness verify the success of your deployments and live microservices. Harness will use your tools for verification and monitoring and use its machine learning features to identify sources of failures.
Most APM and logging tools are added to Harness as Verification Providers. For Stackdriver, you use the Google Cloud Platform account set up as a Harness Cloud Provider.
Roles and Permissions
The following roles must be attached to the account used to connect Harness and Stackdriver as a Google Cloud Provider:
- Stackdriver Logs - The minimum role requirement is logging.viewer
- Stackdriver Metrics - The minimum role requirements are compute.networkViewer and monitoring.viewer.
See Access control from Google.
Stackdriver Connection Setup
To add Stackdriver as a Cloud Provider, follow the steps for adding a Google Cloud Platform Cloud Provider. Here is a short summary:
- In Harness, click Setup, and then click Cloud Providers.
- Click Add Cloud Provider. The Cloud Provider dialog appears.
- When you choose Google Cloud Platform in Type, the Cloud Provider dialog changes for the GCP settings.
To obtain the Google Cloud's Account Service Key File, in GCP, do the following:
- Open the IAM & Admin page in the GCP Console.
- Select your project and click OPEN.
- In the left nav, click Service accounts.
- Look for the service account for which you wish to create a key, and click the service account name.
- In Service account details, click EDIT.
- Click CREATE KEY.
- Select a Key type and click Create. For more information, see Creating and Managing Service Account Keys from GCP.
- Upload the key file into the Harness Cloud Provider dialog.
- The Google Cloud Account Name field is automatically populated with the account name, but you can enter a new name.
- Click SUBMIT. The GCP cloud provider is added.