appengine / 无法部署 / iam 故障排除
appengine / unable to deploy / iam troubleshooting
给定的服务帐户是 {project_id}@appspot.gserviceaccount.com
它具有以下 iam 角色:
Editor
Cloud Build Editor
(手动添加,验证是否是此问题背后的原因)
我有:
- 在我的笔记本电脑上下载了相应的服务帐户密钥到
{local_path}/.gcloud.json
- 通过
gcloud auth
activate-service-account {project_id}@appspot.gserviceaccount.com
--key-file={local_path}/.gcloud.json
激活了此服务帐户
- 将
$GOOGLE_APPLICATION_CREDENTIALS
环境变量设置为
{local_path}/.gcloud.json
部署如下:
gcloud app deploy --project {project_id} \
--quiet \
--verbosity=debug \
--account {project_id}@appspot.gserviceaccount.com \
./dispatch.yaml \
./app/app.yaml
我一直遇到以下错误:
"Permission to create cloud build is denied. 'Cloud Build Editor' role is required for the deployment: ht..."
检查 gcloud ui 上的 Google cloud build,build 已创建,但每次都失败(因此它与返回的给定错误匹配从命令行)
我只是不知道为什么会这样;任何帮助将不胜感激
此致
启用云 运行 Api 时,创建了 3 个服务帐户:
compute@developer.gserviceaccount.com,默认计算服务帐户,角色:编辑
service-@containerregistry.iam.gserviceaccount.com,Google容器注册服务代理,角色:编辑
service-@serverless-robot-prod.iam.gserviceaccount.com, Google 云 运行 服务代理,角色:云 运行 服务代理
最后两个服务帐户是 Google 托管服务帐户,用于访问 Google 的 API 云平台服务 link
By default, Cloud Run revisions are using the Compute Engine default
service account
(PROJECT_NUMBER-compute@developer.gserviceaccount.com), which has the
Project > Editor IAM role. This means that by default, your Cloud Run
revisions have read and write access to all resources in your GCP
project.
启用 Google App Engine 灵活环境 API 时,创建了 2 个与 Cloud 运行 相关的服务帐户:
@cloudbuild.gserviceaccount.com,角色:云构建服务账号
service-@gcp-sa-cloudbuild.iam.gserviceaccount.com,云构建服务账号,角色:云构建服务代理
启用 App Engine 管理 API 时,不会创建额外的服务帐户。
命令:gcloud beta app repair
This command will restore the App Engine staging
bucket if it has been deleted. It will no longer restore the service
account, instead, the IAM service account undelete API must be used
for the purpose.
部署 google 应用引擎后,在 google 云存储中至少创建了 4 个存储桶:
一个。 [项目编号].appspot.com
b。 staging.[project-id].appspot.com
c。 artifacts.[project-id].appspot.com
d。 vm-containers.[project-id].appspot.com
所以我认为您不小心删除了临时存储桶或服务帐户。
既不透明又高效:gcloud beta app repair
,将所需的 App Engine 功能恢复到当前应用程序
给定的服务帐户是 {project_id}@appspot.gserviceaccount.com
它具有以下 iam 角色:
Editor
Cloud Build Editor
(手动添加,验证是否是此问题背后的原因)
我有:
- 在我的笔记本电脑上下载了相应的服务帐户密钥到
{local_path}/.gcloud.json
- 通过
gcloud auth activate-service-account {project_id}@appspot.gserviceaccount.com --key-file={local_path}/.gcloud.json
激活了此服务帐户
- 将
$GOOGLE_APPLICATION_CREDENTIALS
环境变量设置为{local_path}/.gcloud.json
部署如下:
gcloud app deploy --project {project_id} \
--quiet \
--verbosity=debug \
--account {project_id}@appspot.gserviceaccount.com \
./dispatch.yaml \
./app/app.yaml
我一直遇到以下错误:
"Permission to create cloud build is denied. 'Cloud Build Editor' role is required for the deployment: ht..."
检查 gcloud ui 上的 Google cloud build,build 已创建,但每次都失败(因此它与返回的给定错误匹配从命令行)
我只是不知道为什么会这样;任何帮助将不胜感激
此致
启用云 运行 Api 时,创建了 3 个服务帐户:
compute@developer.gserviceaccount.com,默认计算服务帐户,角色:编辑
service-@containerregistry.iam.gserviceaccount.com,Google容器注册服务代理,角色:编辑
service-@serverless-robot-prod.iam.gserviceaccount.com, Google 云 运行 服务代理,角色:云 运行 服务代理
最后两个服务帐户是 Google 托管服务帐户,用于访问 Google 的 API 云平台服务 link
By default, Cloud Run revisions are using the Compute Engine default service account (PROJECT_NUMBER-compute@developer.gserviceaccount.com), which has the Project > Editor IAM role. This means that by default, your Cloud Run revisions have read and write access to all resources in your GCP project.
启用 Google App Engine 灵活环境 API 时,创建了 2 个与 Cloud 运行 相关的服务帐户:
@cloudbuild.gserviceaccount.com,角色:云构建服务账号
service-@gcp-sa-cloudbuild.iam.gserviceaccount.com,云构建服务账号,角色:云构建服务代理
启用 App Engine 管理 API 时,不会创建额外的服务帐户。
命令:gcloud beta app repair
This command will restore the App Engine staging bucket if it has been deleted. It will no longer restore the service account, instead, the IAM service account undelete API must be used for the purpose.
部署 google 应用引擎后,在 google 云存储中至少创建了 4 个存储桶:
一个。 [项目编号].appspot.com
b。 staging.[project-id].appspot.com
c。 artifacts.[project-id].appspot.com
d。 vm-containers.[project-id].appspot.com
所以我认为您不小心删除了临时存储桶或服务帐户。
既不透明又高效:gcloud beta app repair
,将所需的 App Engine 功能恢复到当前应用程序