[英]Can I use the service account of a GCP VM (xxx-compute@developer.gserviceaccount.com) instead of SA json file to make api calls using python?
[英]How to create a AI Platform Custom Code Service Agent "service-xxxx@gcp-sa-aiplatform-cc.iam.gserviceaccount.com"?
我们可以使用以下命令在 AI Platform Unified (GCP) 上创建服务帐号:
gcloud beta services identity create --service=aiplatform.googleapis.com
但这只会创建一个服务帐户,但我们需要两个:
"AI Platform Service Agent": servicexxx@gcp-sa-aiplatform.iam.gserviceaccount.com
我们还需要创建第二个服务帐户:
"AI Platform Custom Code Service Agent":service-xxx@gcp-sa-aiplatform-cc.iam.gserviceaccount.com
第二个名称中有“-cc”,用于自定义培训。
我们如何自动创建第二个服务帐户“service-xxx@gcp-sa-aiplatform-cc.iam.gserviceaccount.com”?
在等待 GCP 提供干净的解决方案时,运行这个虚拟作业(用户在新项目中不需要提供任何内容),将自动创建我们需要的 SA:
gcloud beta ai custom-jobs create --display-name test1 --region europe-west4 --worker-pool-spec=replica-count=1,machine-type=n1-highmem-2,container-image-uri=gcr.io/google-appengine/python
几乎在提交作业后,将创建以下内容:
"AI Platform Custom Code Service Agent":service-xxx@gcp-sa-aiplatform-cc.iam.gserviceaccount.com
我们遇到了完全相同的问题 - 我们需要自动创建 CC 服务代理来支持 TF 自动化,以便在远程项目中访问工件注册表。 谷歌有没有为你提供过干净的解决方案? 谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.