Closed mihnjong closed 6 years ago
Maybe, we need to enable all APIs in parallel in case that it might take too long.
And, we actually also need a flag for this feature. "sc add-gcp-broker --enable_apis=false" should not enable APIs except core APIs (which includes DeploymentManager, ServiceBroker, and IAM APIs).
what is the rationale for a flag? Is there harm in (presumably idempotently) enabling the API mutliple times?
@martinmaly It's for customers' sake. They might hate to enable a dozens of APIs that they do not care.
6 APIs need to be added:
gcloud services enable iam.googleapis.com
for IAM and all other bindings
gcloud services enable bigtableadmin.googleapis.com
for Bigtable
gcloud services enable cloudkms.googleapis.com
for encryption of IAM type.
gcloud services enable cloudresourcemanager.googleapis.com
for project-level IAM
gcloud services enable ml.googleapis.com
for ML Engine
gcloud services enable spanner.googleapis.com
for Spanner
gcloud services enable sqladmin.googleapis.com
for SQL
So will we disable the APIs for the users when they do uninstall?
No. We should not disable any API. Disabling APIs could break customers' running services.
Yeah, but I worried that users may not expect so many enabled APIs after uninstallation.
If enabling of the API(s) fails, we need to print a good error message so that users know which APIs were not successfully enabled.
Fixed
More than 5 mins, sc add-gcp-broker
hangs only with the following message:
sc add-gcp-broker
using project: [[PROJECT ID]]
Since it takes long to enable APIs, it would be better to print the status whenever trying to enable a API.
Maybe make the enabling process run in parallel will help?
Let me create a new issue about parallel API enablement.
As of now, we enable deployment manager API and service broker API in
sc add-gcp-broker
. We also need to enable other APIs that we support in GCP broker.The list includes BigQuery, Bigtable, IAM, ML Engine, Pub/Sub, Spanner, SQL, and Storage.