Help me create an application with 3 microservices called search, order, and
inventory in europe-west1 region.
然后,在后续提示中,您可以添加更多详细信息,例如定义前端要求:
I also want a frontend microservice which is exposed via an external load
balancer. The frontend layer invokes the three microservices. Order and
inventory microservices need to have a database with the same name as the
microservice.
然后,进一步优化微服务,例如定义日志要求:
For the inventory microservice, capture the changelog events and publish
them to a Pub/Sub topic.
然后,进一步优化微服务,例如定义后端要求:
The search microservice should use a distributed search and analytics backend. I
also want the inventory microservice to publish the changelog events to the
distributed search backend.
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-22。"],[],[],null,["# Design an application with Gemini assistance\n\n| **Note:** Use of this Preview offering of Gemini Cloud Assist is subject to the Google Cloud Agreement, including the Pre-GA Offering Terms of the [Google Cloud Specific Service Terms](/terms/service-terms), as supplemented by the terms for the [Gemini for Google Cloud Trusted Tester Program](https://cloud.google.com/trusted-tester/gemini-for-google-cloud-preview).\n\nThis document shows you how to design an application by using\n[Gemini Cloud Assist](/gemini/docs/cloud-assist/overview) along with\nApplication Design Center, an application design and deployment service in\nGoogle Cloud.\n\nWhen you use natural language assistance in\n[Gemini Cloud Assist chat](/gemini/docs/cloud-assist-panel) along\nwith Application Design Center, you can accelerate your application development\ntime. This combination lets you translate your application requirements and\ngoals into Terraform infrastructure as code (IaC), which you can then deploy in\na built-in or personal deployment pipeline. In this way,\nApplication Design Center offers an end-to-end assisted solution that lets you\nauthor, customize, export, and deploy applications.\n\nAt a high level, using Gemini Cloud Assist for design assistance\ngenerally involves the following steps:\n\n1. [Access the **Cloud Assist** chat panel](#access-chat).\n2. [Enter a prompt](#prompt).\n3. [Review the Gemini Cloud Assist response](#review).\n4. [Create a new application template](#create-a-new-application-template).\n5. [Iterate and refine the application design](#iterate).\n6. [Deploy your application infrastructure](#deploy-your-application-infrastructure).\n\nBefore you begin\n----------------\n\n- [Ensure that Gemini Cloud Assist is set up for your Google Cloud user account and project](/gemini/docs/cloud-assist/set-up-gemini).\n- [Ensure that you have set up Application Design Center](/application-design-center/docs/setup).\n\nAccess Gemini Cloud Assist chat\n-------------------------------\n\nIf Gemini Cloud Assist is set up for your project, you can access\nits chat capabilities from any page in the Google Cloud console.\n\n1. In the Google Cloud console, go to any page---for example, the **Dashboard**.\n\n [Go to Dashboard](https://console.cloud.google.com/home/dashboard)\n2. In the Google Cloud console toolbar, click\n spark **Open or close Gemini Cloud Assist chat**.\n\n The **Cloud Assist** panel opens.\n\nIf you're familiar with application templates, you can navigate to the\n[Application Design Center in the Google Cloud console](https://console.cloud.google.com/products/design-center/applications),\n[create a template](#create-a-new-application-template), and then open\n[Gemini Cloud Assist chat](/gemini/docs/codeassist/use-gemini-code-assist-chat).\n\nEnter a prompt\n--------------\n\nIn Gemini Cloud Assist chat, you can get assistance by using\nnatural language *prompts* (questions or statements) such as the following:\n\n- Product-oriented prompts---for example, \"Help me set up Cloud Run, Cloud SQL, and a Load Balancer together in region eu-west-2.\"\n- Business outcome-oriented prompts---for example, \"I need a data pipeline solution to process async events.\"\n\nIf you're exploring Gemini Cloud Assist design capabilities or\nare at an early phase of design, you can use basic design-related prompts such\nas the following:\n\n- \"I need to process short-lived, event-based actions triggered from other systems for data pipeline automation.\"\n- \"Set up a batch pipeline.\"\n- \"Help me set up jobs that periodically run on datasets.\"\n- \"Help me implement a high availability web application with a Java backend and a MySQL database. Traffic will be bursty so make sure it scales up and down fast.\"\n\nIn these examples, Gemini Cloud Assist responds with a suggested\napplication architecture that adheres to Google Cloud best practices and\napplies to\n[supported resource types](/application-design-center/docs/supported-resources).\nIt also provides the purpose of each resource in the stack.\n\nReview the Gemini Cloud Assist response\n---------------------------------------\n\nThe way you review a Gemini Cloud Assist response depends on\nwhether you prompted Gemini while an Application Design Center\ntemplate was open or not.\n\nIf you started from the [**Cloud Assist** panel](#access-chat) and have an\napplication template open in the Application Design Center, then the response\nprovides an explanation describing the purpose of each product in the stack\nbased on your prompt. Any suggested updates or modifications are directly\napplied to the application design visible on the\n[Application Design Center canvas](#iterate-in-canvas).\n\nIf you started from the [**Cloud Assist** panel](#access-chat) but are outside\nof an Application Design Center template, the response includes an initial\narchitecture diagram and an explanation detailing the purpose of each component\nin the suggested stack.\n\nClick **Edit App Design** to navigate to the\nApplication Design Center, where you need to\n[create a new application template](#create-a-new-application-template). After\nthe template is created, your generated application design is loaded onto the\n[Application Design Center canvas](#iterate-in-canvas) so you can further\niterate and refine the application design.\n\nIf you don't have access to the Application Design Center, then when you click\n**Edit App Design** , the Application Design Center launches your design in\n*preview mode* . In preview mode, you can visualize the Gemini-\ngenerated application design and refine it by using natural language\ninteractions in the **Cloud Assist** panel. When you're satisfied with the\napplication design, click **Get Code** to download the Terraform configuration.\nYou can then use this Terraform code with your deployment tools to provision the\ninfrastructure.\n\n### Iterate in the Application Design Center canvas\n\nWithin the canvas environment, Gemini Cloud Assist retains the context\nof your design. This means that if you manually make changes to the architecture,\nGemini is aware of these modifications, letting you continue\niterating and refining your application with its assistance.\n\nCreate a new application template\n---------------------------------\n\n1. In Gemini Cloud Assist chat, click **Edit App Design**.\n\n2. On the **Create a new template** page,\n [specify the template details](/application-design-center/docs/design-application-templates#specify_template_details),\n and then click **Create template**.\n\n The application design is imported as a template, which you can then further\n [iterate and edit in the canvas](#iterate-in-canvas).\n\nAfter you have the template that you like, you can\n[iterate and refine your application design](#iterate), or\n[deploy your application infrastructure](#deploy-your-application-infrastructure).\n\nIterate and refine your application design\n------------------------------------------\n\nThe more detailed initial information that you give\nGemini Cloud Assist, the more likely it is to produce an initial\napplication template that's well aligned to your design goals. You can\niteratively build the design by defining each sub-system and its requirements\nacross multiple prompts and turns of the conversation. For example, you might\nenter the following in Gemini Cloud Assist chat: \n\n Help me create an application with 3 microservices called search, order, and\n inventory in europe-west1 region.\n\nThen, in subsequent prompts, you can add more detail, such as defining frontend\nrequirements: \n\n I also want a frontend microservice which is exposed via an external load\n balancer. The frontend layer invokes the three microservices. Order and\n inventory microservices need to have a database with the same name as the\n microservice.\n\nThen, refine the microservice even more, such as defining log requirements: \n\n For the inventory microservice, capture the changelog events and publish\n them to a Pub/Sub topic.\n\nThen, refine your microservice even more, such as defining backend requirements: \n\n The search microservice should use a distributed search and analytics backend. I\n also want the inventory microservice to publish the changelog events to the\n distributed search backend.\n\nAfter you select an application design, you can\n[deploy your application infrastructure](#deploy-your-application-infrastructure).\n\nDeploy your application infrastructure\n--------------------------------------\n\n1. [Create an application instance](/application-design-center/docs/manage-application-instances)\n from an application template.\n\n2. Deploy the application using one of the following methods:\n\n - [Deploy from the Google Cloud console](/application-design-center/docs/deploy-from-console).\n The Google Cloud console lets you track changes and apply template\n revisions.\n\n - [Download and deploy Terraform](/application-design-center/docs/download-and-deploy).\n This approach lets you use your own deployment tools and workflows.\n\nWhat's next\n-----------\n\n- Learn more about [Gemini Cloud Assist](/gemini/docs/cloud-assist/overview).\n- Learn more about [Application Design Center](/application-design-center/docs/overview).\n- Learn how to [write better prompts for Gemini for Google Cloud](/gemini/docs/discover/write-prompts)."]]