Cloud Deployment Manager dejará de estar disponible el 31 de diciembre de 2025. Si actualmente usas Deployment Manager, migra a Infrastructure Manager o a una tecnología de implementación alternativa antes del 31 de diciembre de 2025 para asegurarte de que tus servicios continúen sin interrupciones.
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En este instructivo, se explica Deployment Manager con la herramienta de línea de comandos de gcloud. Sigue los pasos de configuración a fin de preparar tu entorno local para utilizar Deployment Manager.
Crea un proyecto
Deployment Manager requiere un Google Cloud proyecto. Si ya tienes un proyecto creado, puedes usar ese.
Si es la primera vez que usas Google Cloud, puedes crear un proyecto nuevo y aprovechar el paquete de prueba gratuita deGoogle Cloud, con el que obtienes USD 300 para gastar en todos los productos de Google Cloud durante 90 días. Regístrate para obtener la prueba gratuita:
Sigue las instrucciones para registrarte a la prueba gratuita.
Cuando se te solicite crear un proyecto, ingresa un nombre y un ID de proyecto que se utilizará para identificarlo o acepta los valores predeterminados y haz clic en Crear.
…consulta los lineamientos para asignar nombres
Habilita las APIs para los Google Cloud recursos que deseas administrar
Deployment Manager usa las APIs de otros Google Cloud servicios para crear y administrar tus recursos. Si deseas crear estos recursos, primero debes habilitar las API de los servicios para tu proyecto.
Para esta explicación, implementarás los recursos de Compute Engine, por lo que debes habilitar la API de Compute Engine.
Otra opción es usar Cloud Shell, que ya tiene gcloud instalado.
Determina tu ID del proyecto:
Cada comando requiere un ID del proyecto. Establece un ID del proyecto predeterminado para que no necesites crear uno cada vez. Recuerda reemplazar myproject con el ID de tu proyecto.
gcloud config set project myproject
Configura tu zona y región predeterminadas. Algunos recursos de Google Cloud requieren una zona o una región, y puedes establecer una zona o región predeterminada, similar a un proyecto predeterminado. Para establecer una zona o región predeterminada, usa gcloud config set.
En este caso, usa us-central1 como la región y us-central1-f como la zona:
Clona el repositorio de GitHub de Deployment Manager
El repositorio de GitHub de Deployment Manager contiene ejemplos creados por Google y la comunidad de Deployment Manager, entre los que se incluyen los ejemplos que se usan en esta explicación.
gitclonehttps://github.com/GoogleCloudPlatform/deploymentmanager-samples
# open the samples foldercddeploymentmanager-samples/examples/v2/step_by_step_guide
Ahora que ya configuraste tu entorno, puedes empezar a crear la implementación.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-03 (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."]]