Configurar um projeto

Neste documento, descrevemos como configurar um projeto e uma máquina virtual (VM) do Compute Engine. Google Cloud

Configurar um projeto do Google Cloud

  1. 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.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

  4. Enable the Google Cloud Dataproc API.

    Enable the API

  5. Install the Google Cloud CLI.

  6. If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

  7. To initialize the gcloud CLI, run the following command:

    gcloud init
  8. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  9. Make sure that billing is enabled for your Google Cloud project.

  10. Enable the Google Cloud Dataproc API.

    Enable the API

  11. Install the Google Cloud CLI.

  12. If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

  13. To initialize the gcloud CLI, run the following command:

    gcloud init
  14. 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.