Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
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.
Führen Sie folgenden Befehl aus, um die gcloud CLI zu initialisieren:
gcloudinit
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.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-22 (UTC)."],[[["\u003cp\u003eThis document provides instructions on setting up a Google Cloud project and a Compute Engine virtual machine (VM).\u003c/p\u003e\n"],["\u003cp\u003eCredentials are only necessary when directly calling Dataproc APIs from an application or browser, not when using the Google Cloud console or the gcloud CLI.\u003c/p\u003e\n"],["\u003cp\u003eIf utilizing a Compute Engine VM to run gcloud CLI, it must be configured to access Google Cloud services, with a service account that includes the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eCloud Shell can be used as an alternative to setting up a personal VM, as it automatically provisions a VM with the necessary scopes to run gcloud CLI commands.\u003c/p\u003e\n"]]],[],null,["# Set up a project\n\nThis document describes how to set up a Google Cloud project and a\nCompute Engine virtual machine (VM).\n\nSet up a Google Cloud project\n-----------------------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Google Cloud Dataproc API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dataproc)\n-\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n- If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n-\n To [initialize](/sdk/docs/initializing) the gcloud CLI, run the following command:\n\n ```bash\n gcloud init\n ```\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Google Cloud Dataproc API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dataproc)\n-\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n- If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n-\n To [initialize](/sdk/docs/initializing) the gcloud CLI, run the following command:\n\n ```bash\n gcloud init\n ```\n\n\u003cbr /\u003e\n\n| **Note:** When you enable the Dataproc API, the Dataproc Control API is also enabled. Disabling the Dataproc API doesn't disable the Dataproc Control API. You must separately disable the Dataproc Control API.\n\n**Do you Need Credentials?** You need credentials only if\nyou plan to directly call Dataproc APIs from your application or from\na browser. If you plan on using the Google Cloud console or the\n[Google Cloud CLI](/sdk/gcloud/reference/dataproc) to\ncreate and manage clusters and to submit jobs, you only need to be logged in\nto the SDK with the `gcloud init` command.\n\nOptional: Set up a VM\n---------------------\n\nIf you plan to run [gcloud CLI](/sdk/docs) from a\nCompute Engine virtual machine (VM) instance, the VM must be set up\nto access Google Cloud services.\n\nTo test whether your VM is set up correctly, run\n`gcloud compute instances describe `\u003cvar translate=\"no\"\u003eYOUR_VM_INSTANCE_NAME\u003c/var\u003e\nfrom the command line. A service account must be listed that includes the\n`https://www.googleapis.com/auth/cloud-platform` scope. For more information\non setting up a VM, see\n[Create a VM that uses a user-managed service account](/compute/docs/access/create-enable-service-accounts-for-instances).\n| **Use Cloud Shell to run\n| gcloud CLI commands.** As an alternative to setting up your own VM to run SDK commands, open a [Cloud Shell](/shell/docs/quickstart) session to automatically provision a VM with the necessary scopes, and then run gcloud CLI commands from Cloud Shell.\n\n*** ** * ** ***\n\n[Next Step: Create a Cluster](/dataproc/docs/guides/create-cluster)"]]