In diesem Dokument wird beschrieben, wie Sie ein Google Cloud -Projekt und eine Compute Engine-VM einrichten.
Google Cloud -Projekt einrichten
- 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
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.