Projekt einrichten

In diesem Dokument wird beschrieben, wie Sie ein Google Cloud -Projekt und eine Compute Engine-VM einrichten.

Google Cloud -Projekt einrichten

  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. Benötigen Sie Anmeldedaten? Anmeldedaten benötigen Sie nur, wenn Sie planen, Dataproc APIs direkt über Ihre Anwendung oder einen Browser aufzurufen. Wenn Sie die Google Cloud -Konsole oder die Google Cloud CLI verwenden möchten, um Cluster zu erstellen und zu verwalten und Jobs zu senden, müssen Sie nur mit dem Befehl gcloud init im SDK angemeldet sein.

    Optional: VM einrichten

    Wenn Sie planen, die gcloud CLI über eine Compute Engine-VM-Instanz auszuführen, muss die VM für den Zugriff auf Google Cloud Dienste eingerichtet sein.

    Wenn Sie testen möchten, ob die VM ordnungsgemäß eingerichtet ist, führen Sie gcloud compute instances describe YOUR_VM_INSTANCE_NAME über die Befehlszeile aus. Ein Dienstkonto muss aufgeführt sein, das den Bereich https://www.googleapis.com/auth/cloud-platform enthält. Weitere Informationen zum Einrichten einer VM finden Sie unter VM erstellen, die ein vom Nutzer verwaltetes Dienstkonto verwendet.