You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: cli funcionality to deploy an Agent to a running GKE cluster
Merge #1607
- Added CLI functionality so that we can deploy and Agent onto a GKE cluster
- Related documentation google/adk-docs#445
COPYBARA_INTEGRATE_REVIEW=#1607 from vicentefb:GkeDeployAgent 42f35d9
PiperOrigin-RevId: 786857789
click.echo(f'Cleaning up the temp folder: {temp_folder}')
445
445
shutil.rmtree(temp_folder)
446
+
447
+
448
+
defto_gke(
449
+
*,
450
+
agent_folder: str,
451
+
project: Optional[str],
452
+
region: Optional[str],
453
+
cluster_name: str,
454
+
service_name: str,
455
+
app_name: str,
456
+
temp_folder: str,
457
+
port: int,
458
+
trace_to_cloud: bool,
459
+
with_ui: bool,
460
+
log_level: str,
461
+
verbosity: str,
462
+
adk_version: str,
463
+
allow_origins: Optional[list[str]] =None,
464
+
session_service_uri: Optional[str] =None,
465
+
artifact_service_uri: Optional[str] =None,
466
+
memory_service_uri: Optional[str] =None,
467
+
a2a: bool=False,
468
+
):
469
+
"""Deploys an agent to Google Kubernetes Engine(GKE).
470
+
471
+
Args:
472
+
agent_folder: The folder (absolute path) containing the agent source code.
473
+
project: Google Cloud project id.
474
+
region: Google Cloud region.
475
+
cluster_name: The name of the GKE cluster.
476
+
service_name: The service name in GKE.
477
+
app_name: The name of the app, by default, it's basename of `agent_folder`.
478
+
temp_folder: The local directory to use as a temporary workspace for preparing deployment artifacts. The tool populates this folder with a copy of the agent's source code and auto-generates necessary files like a Dockerfile and deployment.yaml.
479
+
port: The port of the ADK api server.
480
+
trace_to_cloud: Whether to enable Cloud Trace.
481
+
with_ui: Whether to deploy with UI.
482
+
verbosity: The verbosity level of the CLI.
483
+
adk_version: The ADK version to use in GKE.
484
+
allow_origins: The list of allowed origins for the ADK api server.
485
+
session_service_uri: The URI of the session service.
486
+
artifact_service_uri: The URI of the artifact service.
487
+
memory_service_uri: The URI of the memory service.
488
+
"""
489
+
click.secho(
490
+
'\n🚀 Starting ADK Agent Deployment to GKE...', fg='cyan', bold=True
0 commit comments