Cloud Deployment Manager akan mencapai akhir dukungan pada 31 Desember 2025. Jika saat ini Anda menggunakan Deployment Manager, migrasikan ke Infrastructure Manager atau teknologi deployment alternatif paling lambat 31 Desember 2025 untuk memastikan layanan Anda berlanjut tanpa gangguan.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Tutorial ini membahas Deployment Manager menggunakan alat command line gcloud. Ikuti langkah-langkah penyiapan untuk menyiapkan lingkungan lokal Anda agar dapat menggunakan Deployment Manager.
Membuat project
Deployment Manager memerlukan Google Cloud project. Jika sudah memiliki
project, Anda dapat menggunakan project yang ada.
Jika baru menggunakan Google Cloud, Anda dapat membuat project baru dan memanfaatkan paket uji coba gratis Google Cloud, yang memberi Anda $300 untuk dibelanjakan pada semua produk Google Cloud selama 90 hari. Untuk mendaftar ke uji coba gratis:
Saat diminta untuk membuat project, masukkan nama dan project ID yang akan digunakan untuk mengidentifikasi project Anda, atau terima nilai default, lalu klik Buat.
...lihat panduan penamaan
Aktifkan API untuk Google Cloud resource yang ingin Anda kelola
Deployment Manager menggunakan API layanan lain untuk membuat dan mengelola resource Anda. Google Cloud Untuk membuat resource ini, Anda harus
mengaktifkan API layanan terlebih dahulu untuk project Anda.
Untuk panduan ini, Anda akan men-deploy resource Compute Engine, jadi Anda perlu mengaktifkan Compute Engine API.
Atau, gunakan
Cloud Shell,
yang sudah menginstal gcloud.
Tetapkan project ID Anda.
Setiap perintah memerlukan ID project. Tetapkan project ID default agar Anda tidak
perlu memberikannya setiap saat. Jangan lupa untuk mengganti myproject dengan
project ID Anda sendiri.
gcloud config set project myproject
Tetapkan zona dan region default Anda. Beberapa resource Google Cloud memerlukan
zona atau region, dan Anda dapat menetapkan zona atau region default, mirip dengan
project default. Untuk menetapkan zona atau region default, gunakan gcloud config set.
Dalam hal ini, gunakan us-central1 sebagai region dan us-central1-f sebagai
zona:
Repositori GitHub Deployment Manager berisi contoh yang dibuat oleh Google dan komunitas Deployment Manager, termasuk contoh yang digunakan dalam panduan ini.
gitclonehttps://github.com/GoogleCloudPlatform/deploymentmanager-samples
# open the samples foldercddeploymentmanager-samples/examples/v2/step_by_step_guide
Setelah menyiapkan lingkungan, Anda dapat mulai membuat deployment.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-19 UTC."],[[["\u003cp\u003eThis tutorial guides users through setting up and using Deployment Manager with the \u003ccode\u003egcloud\u003c/code\u003e command-line tool.\u003c/p\u003e\n"],["\u003cp\u003eA Google Cloud project is required, and new users can sign up for a free trial offering $300 in credits.\u003c/p\u003e\n"],["\u003cp\u003eUsers must enable the necessary APIs, such as the Compute Engine API and Deployment Manager API, for their project.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egcloud\u003c/code\u003e CLI, which can be installed locally or accessed via Cloud Shell, needs to be set up with a default project ID, region, and zone.\u003c/p\u003e\n"],["\u003cp\u003eUsers should clone the Deployment Manager GitHub repository to access sample configurations and the walkthrough materials.\u003c/p\u003e\n"]]],[],null,["# Installation and Setup\n\nThis tutorial goes through Deployment Manager using the `gcloud`\ncommand-line tool. Follow the setup steps to prepare your local environment to\nuse Deployment Manager.\n\nCreate a project\n----------------\n\nDeployment Manager requires a Google Cloud project. If you already have a\nproject, you can use your existing project.\n\nIf you are new to Google Cloud, you can create a new project and take\nadvantage of [Google Cloud's free trial](/free-trial)\npackage, which gives you $300 to spend on all Google Cloud products\nover 90 days. To sign up for the free trial:\n\n1. Open the [Google Cloud console](https://console.cloud.google.com/freetrial).\n2. Follow the instructions to sign up for the free trial.\n3. When prompted to create a project, enter a name and a project ID that will be used to identify your project, or accept the defaults, and click **Create** .\n | **Important:** The name you use must be between 4 and 30 characters. When you type the name, the form will suggest a project ID, which you can edit. The project ID you use must be between 6 and 30 characters, with a lowercase letter as the first character. You can use a dash, lowercase letter, or digit for the remaining characters, but the last character cannot be a dash. You should be aware that some resource identifiers (such as project IDs) might be retained beyond the life of your project. For this reason, avoid storing sensitive information in resource identifiers.\n ...see naming guidelines\n\nEnable the APIs for the Google Cloud resources that you want to manage\n----------------------------------------------------------------------\n\nDeployment Manager uses the APIs of other Google Cloud services to\ncreate and manage your resources. To create these resources, you must first\nenable the services' APIs for your project.\n\nFor this walkthrough, you deploy Compute Engine resources, so\nyou need to enable the Compute Engine API.\n\n\n[Enable the Compute Engine API](https://console.cloud.google.com/start/api?id=compute.googleapis.com)\n\nNext, enable Deployment Manager:\n\n\n[Enable the Deployment Manager API](https://console.cloud.google.com/start/api?id=deploymentmanager)\n\n\u003cbr /\u003e\n\nInstall Google Cloud CLI\n------------------------\n\nThe Google Cloud CLI offers a command-line tool, `gcloud`, that makes interacting\nwith Deployment Manager easy.\n\nTo install gcloud CLI:\n\n1. [Download and authenticate `gcloud`](https://cloud.google.com/sdk/#Quick_Start).\n\n Alternatively, use\n [Cloud Shell](https://console.cloud.google.com?cloudshell=true),\n which comes with `gcloud` already installed.\n2. Set your project ID.\n\n Every command requires a project ID. Set a default project ID so you do not\n need to provide it every time. **Remember to replace `myproject` with your\n own project ID**. \n\n gcloud config set project \u003cvar translate=\"no\"\u003emyproject\u003c/var\u003e\n\n3. Set your default zone and region. Some Google Cloud resources require\n a zone or a region, and you can set a default zone or region, similar to a\n default project. To set a default zone or region, use `gcloud config set`.\n In this case, use `us-central1` as the region and `us-central1-f` as the\n zone:\n\n gcloud config set compute/region us-central1\n gcloud config set compute/zone us-central1-f\n\nClone the Deployment Manager GitHub repository\n----------------------------------------------\n\nThe Deployment Manager GitHub repository contains samples created by\nGoogle and the Deployment Manager community, including the samples used in\nthis walkthrough. \n\n git clone https://github.com/GoogleCloudPlatform/deploymentmanager-samples\n\n # open the samples folder\n cd deploymentmanager-samples/examples/v2/step_by_step_guide\n\nNow that you have set up your environment, you can start creating your\ndeployment."]]