Neste documento, descrevemos como configurar um projeto e uma máquina virtual (VM) do Compute Engine. Google Cloud
Configurar um projeto do Google Cloud
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Google Cloud Dataproc API.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Google Cloud Dataproc API.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
Você precisa de credenciais? As credenciais só serão necessárias se você chamar as APIs do Dataproc diretamente do seu aplicativo ou de um navegador. Se quiser usar o console Google Cloud ou a
Google Cloud CLI para
criar e gerenciar clusters e enviar jobs, basta fazer login
no SDK com o comando gcloud init
.
Opcional: configurar uma VM
Se você planeja executar a gcloud CLI em uma instância de máquina virtual (VM) do Compute Engine, a VM precisa ser configurada para acessar os serviços do Google Cloud .
Para testar se a VM está configurada corretamente, execute
gcloud compute instances describe YOUR_VM_INSTANCE_NAME
na linha de comando. É necessário listar uma conta de serviço que inclua o escopo https://www.googleapis.com/auth/cloud-platform
. Para mais informações
sobre como configurar uma VM, consulte
Criar uma VM que usa uma conta serviço gerenciado pelo usuário.