From 478b5a6aaa7d39793ce0084b3fb495164c58c575 Mon Sep 17 00:00:00 2001 From: Selam Waktola Date: Tue, 5 May 2026 17:36:43 -0700 Subject: [PATCH 1/2] add gcloud auth prerequisites to deployment guide --- .../adk/gemini_enterprise/cloud_run/README.md | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/samples/agent/adk/gemini_enterprise/cloud_run/README.md b/samples/agent/adk/gemini_enterprise/cloud_run/README.md index 930e59f82..b670609d6 100644 --- a/samples/agent/adk/gemini_enterprise/cloud_run/README.md +++ b/samples/agent/adk/gemini_enterprise/cloud_run/README.md @@ -14,6 +14,24 @@ Gemini-based agent that can communicate with users with A2UI components. By the end of this guide, you will have an agent running on Cloud Run and can display A2UI components on Gemini Enterprise UI. +## Prerequisites + +Before running the deployment script, ensure you have completed the following authentication steps: + +1. **Authenticate with Google Cloud**: + ```bash + gcloud auth login + ``` +2. **Set up Application Default Credentials**: + ```bash + gcloud auth application-default login + ``` +3. **Enable Required APIs**: + Ensure the Cloud Run and Discovery Engine APIs are enabled in your project. + ```bash + gcloud services enable run.googleapis.com discoveryengine.googleapis.com --project= + ``` + ## Steps There are 2 steps: @@ -33,8 +51,8 @@ chmod +x deploy.sh ./deploy.sh [MODEL_NAME] ``` -* `MODEL_NAME`: Optional. Can be `gemini-2.5-pro` or `gemini-2.5-flash`. - Defaults to `gemini-2.5-flash` if not specified. +- `MODEL_NAME`: Optional. Can be `gemini-2.5-pro` or `gemini-2.5-flash`. + Defaults to `gemini-2.5-flash` if not specified. For example: @@ -86,15 +104,15 @@ curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Co **Placeholder Descriptions:** -* `PROJECT_NUMBER`: Your Google Cloud project number. -* `LOCATION`: The location of your Discovery Engine instance (e.g., `global`). -* `ENGINE_ID`: The ID of your Gemini Enterprise engine (a.k.a App ID). -* `AGENT_NAME`: A unique name for your agent. -* `AGENT_DISPLAY_NAME`: The name that will be displayed in the Gemini - Enterprise UI. -* `AGENT_DESCRIPTION`: A brief description of your agent's capabilities. -* `AGENT_URL`: The service URL of your deployed agent which was printed in the - previous step. +- `PROJECT_NUMBER`: Your Google Cloud project number. +- `LOCATION`: The location of your Discovery Engine instance (e.g., `global`). +- `ENGINE_ID`: The ID of your Gemini Enterprise engine (a.k.a App ID). +- `AGENT_NAME`: A unique name for your agent. +- `AGENT_DISPLAY_NAME`: The name that will be displayed in the Gemini + Enterprise UI. +- `AGENT_DESCRIPTION`: A brief description of your agent's capabilities. +- `AGENT_URL`: The service URL of your deployed agent which was printed in the + previous step. **3. Locate the agent on the Gemini Enterprise UI:** From 023839eb5aa629c49ad6dafd0d74a4ed6d07ea82 Mon Sep 17 00:00:00 2001 From: Selam Waktola Date: Tue, 5 May 2026 18:21:43 -0700 Subject: [PATCH 2/2] add gcloud auth prerequisites to deployment guide --- .../adk/gemini_enterprise/cloud_run/README.md | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/samples/agent/adk/gemini_enterprise/cloud_run/README.md b/samples/agent/adk/gemini_enterprise/cloud_run/README.md index b670609d6..186951304 100644 --- a/samples/agent/adk/gemini_enterprise/cloud_run/README.md +++ b/samples/agent/adk/gemini_enterprise/cloud_run/README.md @@ -16,21 +16,33 @@ A2UI components on Gemini Enterprise UI. ## Prerequisites -Before running the deployment script, ensure you have completed the following authentication steps: - -1. **Authenticate with Google Cloud**: - ```bash - gcloud auth login - ``` -2. **Set up Application Default Credentials**: - ```bash - gcloud auth application-default login - ``` -3. **Enable Required APIs**: - Ensure the Cloud Run and Discovery Engine APIs are enabled in your project. - ```bash - gcloud services enable run.googleapis.com discoveryengine.googleapis.com --project= - ``` +Before running the deployment script, ensure you have the following: + +- A **Google Cloud Project** with billing enabled. +- **Google Cloud SDK** installed and up to date. + +### Authentication + +Authenticate with Google Cloud by running the following commands: + +```bash +gcloud auth login +gcloud auth application-default login +gcloud config set project +``` + +### Enable Required APIs + +Enable the required Google Cloud APIs for Cloud Run, Cloud Build, Vertex AI, and Discovery Engine: + +```bash +gcloud services enable \ +run.googleapis.com \ +cloudbuild.googleapis.com \ +aiplatform.googleapis.com \ +discoveryengine.googleapis.com \ +--project +``` ## Steps