각 명령어마다 프로젝트 ID가 필요합니다. 기본 프로젝트 ID를 설정하면 매번 제공하지 않아도 됩니다. myproject를 개발자의 고유의 프로젝트 ID로 바꿔야 합니다.
gcloud config set project myproject
기본 영역 및 리전을 설정합니다. 일부 Google Cloud 리소스에는 영역이나 리전이 필요하고 기본 프로젝트와 비슷하게 기본 영역이나 리전을 설정할 수 있습니다. 기본 영역 또는 리전을 설정하려면 gcloud config set을 사용합니다.
이 경우에는 us-central1을 리전으로, us-central1-f를 영역으로 사용합니다.
Deployment Manager GitHub 저장소에는 이 둘러보기에서 사용된 샘플을 포함하여 Google 및 Deployment Manager 커뮤니티에서 생성된 샘플이 있습니다.
gitclonehttps://github.com/GoogleCloudPlatform/deploymentmanager-samples
# open the samples foldercddeploymentmanager-samples/examples/v2/step_by_step_guide
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-05-06(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."]]