Dokumen ini menjelaskan cara menyiapkan Google Cloud project dan virtual machine (VM) Compute Engine.
Menyiapkan project 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
Apakah Anda Memerlukan Kredensial? Anda hanya memerlukan kredensial jika berencana memanggil Dataproc API secara langsung dari aplikasi atau dari browser. Jika Anda berencana menggunakan konsol Google Cloud atau
Google Cloud CLI untuk
membuat dan mengelola cluster serta mengirimkan tugas, Anda hanya perlu login
ke SDK dengan perintah gcloud init
.
Opsional: Siapkan VM
Jika Anda berencana menjalankan gcloud CLI dari instance virtual machine (VM) Compute Engine, VM harus disiapkan untuk mengakses Google Cloud layanan.
Untuk menguji apakah VM Anda disiapkan dengan benar, jalankan
gcloud compute instances describe YOUR_VM_INSTANCE_NAME
dari command line. Akun layanan yang tercantum harus menyertakan cakupan https://www.googleapis.com/auth/cloud-platform
. Untuk mengetahui informasi selengkapnya tentang cara menyiapkan VM, lihat Membuat VM yang menggunakan akun layanan yang dikelola pengguna.