GCP#
Google Cloud project#
Before connecting, enable billing export, prepare a role for OptScale, create service account, and generate API key. If this has not been completed, refer to the Configure the project section before proceeding to Connect to OptScale.
Configure the project#
Make some preparations steps before connect a new GCP data source in OptScale, go to the GCP cloud.
1. Enable Billing export. Official documentation - Set up Cloud Billing data export to BigQuery | Google Cloud.
As the result you have a new table in your BigQuery project. Note the names of the dataset and the table.
2. Prepare a role for OptScale. There are two ways, select one:
-
Run the following command in GCP CLI:
gcloud iam roles create optscale_connection_role \--project=hystaxcom \--permissions=bigquery.jobs.create, bigquery.tables.getData, compute.addresses.list, compute.addresses.setLabels, compute.disks.list, compute.disks.setLabels, compute.firewalls.list, compute.globalAddresses.list, compute.instances.list, compute.instances.setLabels, compute.images.list, compute.images.setLabels, compute.machineTypes.get, compute.machineTypes.list, compute.networks.list, compute.regions.list, compute.snapshots.list, compute.snapshots.setLabels, compute.zones.list, iam.serviceAccounts.list, monitoring.timeSeries.list, storage.buckets.get, storage.buckets.getIamPolicy, storage.buckets.list, storage.buckets.update
-
Via Google Cloud console
1. Go to Roles page and click Create Role.
2. Give the role any name and description.
3. Add the following permissions:
- bigquery.jobs.create
- bigquery.tables.getData
- compute.addresses.list
- compute.addresses.setLabels
- compute.disks.list
- compute.disks.setLabels
- compute.firewalls.list
- compute.globalAddresses.list
- compute.instances.list
- compute.instances.setLabels
- compute.images.list
- compute.images.setLabels
- compute.machineTypes.get
- compute.machineTypes.list
- compute.networks.list
- compute.regions.list
- compute.snapshots.list
- compute.snapshots.setLabels
- compute.zones.list
- iam.serviceAccounts.list
- monitoring.timeSeries.list
- storage.buckets.get
- storage.buckets.getIamPolicy
- storage.buckets.list
- storage.buckets.update
4. Create service account. Official documentation - Service accounts | IAM Documentation | Google Cloud. Specify the role that you've created earlier and click Continue and then Done
5. Generate API key for your service account. Official documentation - Create a service account key | IAM Documentation | Google Cloud. Download it as a .json file. It is required on the stage of connection to OptScale.
Connect to OptScale#
Go to OptScale → Data Sources → click the Add button → select GCP → choose the Project connection type.
Fill in the fields, download a API key file. Click the Connect button.
Please contact our Support Team at support@hystax.com if you have any questions regarding the described configuration flow.
Google Cloud tenant#
Before connecting, prepare a role for OptScale, create service account, and generate API key. If this has not been completed, refer to the Configure the project section before proceeding to Connect to OptScale.
Configure the tenant#
Make some preparations steps before connect a new GCP data source in OptScale, go to the GCP cloud.
1. Prepare a role for OptScale. There are two ways, select one:
-
Run the following command in GCP CLI:
gcloud iam roles create optscale_connection_role \--project=hystaxcom \--permissions=bigquery.jobs.create, bigquery.tables.getData, compute.addresses.list, compute.addresses.setLabels, compute.disks.list, compute.disks.setLabels, compute.firewalls.list, compute.globalAddresses.list, compute.instances.list, compute.instances.setLabels, compute.images.list, compute.images.setLabels, compute.machineTypes.get, compute.machineTypes.list, compute.networks.list, compute.regions.list, compute.snapshots.list, compute.snapshots.setLabels, compute.zones.list, iam.serviceAccounts.list, monitoring.timeSeries.list, storage.buckets.get, storage.buckets.getIamPolicy, storage.buckets.list, storage.buckets.update
-
Via Google Cloud console
1. Go to Roles page and click Create Role.
2. Give the role any name and description.
3. Add the following permissions:
- bigquery.jobs.create
- bigquery.tables.getData
- compute.addresses.list
- compute.addresses.setLabels
- compute.disks.list
- compute.disks.setLabels
- compute.firewalls.list
- compute.globalAddresses.list
- compute.instances.list
- compute.instances.setLabels
- compute.images.list
- compute.images.setLabels
- compute.machineTypes.get
- compute.machineTypes.list
- compute.networks.list
- compute.regions.list
- compute.snapshots.list
- compute.snapshots.setLabels
- compute.zones.list
- iam.serviceAccounts.list
- monitoring.timeSeries.list
- storage.buckets.get
- storage.buckets.getIamPolicy
- storage.buckets.list
- storage.buckets.update
2. Create service account. Official documentation - Service accounts | IAM Documentation | Google Cloud. Specify the role that you've created earlier and click Continue and then Done.
3. Grant access. For each project that needs to be added to the tenant, go to the IAM & Admin section in the Google Cloud Console, select IAM, and press the GRANT ACCESS button. Add the created service account and assign the created role to it.
4. Generate API key for your service account. Official documentation - Create a service account key | IAM Documentation | Google Cloud. Download it as a .json file. It is required on the stage of connection to OptScale.
Connect to OptScale#
Go to OptScale → Data Sources → click the Add button → select GCP → choose the Tenant connection type.
Fill in the fields, upload a API key file. Click the Connect button.
Please contact our Support Team at support@hystax.com if you have any questions regarding the described configuration flow.