如何通过服务帐户创建dataproc集群 [英] how to create dataproc cluster by service account

查看:68
本文介绍了如何通过服务帐户创建dataproc集群的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对该文档感到非常困惑,在此处输入链接描述

I am quite confused by this document enter link description here

Service account requirements and Limitations:
* Service accounts can only be set when a cluster is created.
* You need to create a service account before creating the Cloud Dataproc cluster that will be associated with the service account.
* Once set, the service account used for a cluster cannot be changed.

这意味着我无法创建服务帐户,该帐户具有创建dataproc集群的作用?对于Now,我只能通过自己的帐户"gcloud auth login"创建一个dataproc集群但是我想通过设置从詹金斯创建dataproc集群

Dose this means I cannot create a service account, which have role to create a dataproc cluster? For Now, I can only create a dataproc cluster by my own account " gcloud auth login" But I want create dataproc cluster from jenkins by setup

gcloud auth激活服务帐户-密钥文件

推荐答案

是的,您可以使用服务帐户来创建Dataproc集群并提交作业.但是,您引用的链接使用服务帐户来处理正在运行的Dataproc集群,而该服务帐户不适用于您所关心的问题.

Yes, you can use a service account to create Dataproc clusters and submit jobs. However, the link you refer deals with running Dataproc clusters with a service account which isn't applicable to your concern.

要使用服务帐户创建Dataproc,请执行以下操作:

To create a Dataproc using a service account:

  1. 创建服务帐户

  1. Create a service account

分配Cloud Dataproc编辑器角色

Assign Cloud Dataproc Editor role

下载其json凭证文件

Download its json credentials file

配置身份验证机制:

4.1 gcloud auth激活服务帐户--key-file = JSON_FILE_PATH

4.1 gcloud auth activate-service-account --key-file=JSON_FILE_PATH

4.2 GOOGLE_APPLICATION_CREDENTIALS = JSON_FILE_PATH

4.2 GOOGLE_APPLICATION_CREDENTIALS=JSON_FILE_PATH

创建您的Dataproc集群

Create your Dataproc cluster

这篇关于如何通过服务帐户创建dataproc集群的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆