对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。

agentengine 部署

部署上一个成功的构建,或者使用 --build 构建一个新镜像。

部署工作区中上一个成功的构建,或者使用 --build 从当前目录构建一个新镜像并进行部署。

传递 --build-id 或 --version 以部署特定构建;两者都会跳过设置检查。

如果没有这两者,部署会检查登录、工作区绑定、声明的网络出口策略、本地 .env条目、最后一次成功的构建和 Atlas 设置。每个填充的 .env键必须作为项目或工作区密钥存在(平台保留名称将被跳过)。空白条目将被忽略。该检查仅比较键名,不会从 env.示例 或缺失的 .env 中进行推断。不可读的 .env或失败的密钥列表必须先解决。

部署不会自行启动构建。没有成功镜像的工作区在运行以下命令时会失败:agentengine deploy --build。

在交互式终端上,部署 提供存储每个缺失的 .envagentengine secret set值(在确认后),并保持现有密钥不变。当未绑定工作区时,它运行 agentengine init;在同步本地条目后,它为未链接的 Atlas 设置运行 agentengine atlas setup。如果 MONGODB_URI 与链接的 Atlas 项目中的实时集群不匹配,系统会报告该 URI,并提供 URI 或创建 URI 的说明。

非交互式部署、重定向 stdout、--json 和 --all 永远不会提示、运行 init 或预配 Atlas。它们会打印缺失的设置以及修复它的命令。当没有镜像存在时,--workspace 和 --all 会打印 agentengine build。--yes 在 atlas 设置期间接受计费的 Flex 默认值和 Atlas IP访问列表更改,并且不被 TTY 暗示。

--build 会存档当前目录,构建一个新镜像,并在构建成功后跟踪服务器启动的部署。这是单步构建和部署路径,且仅适用于单代理。它拒绝 --build-id、--version、--no-wait、--workspace 和 --all。

工作区 ID 来自 .agentengine/state.json,由 agentengine init 写入。从代理目录运行,或传递 --workspace-id 以部署到没有代理目录的现有工作区。如果没有本地代理目录,--workspace-id 无法启动源构建:提示是来自代理目录的 agentengine deploy --build。

agentengine deploy [flags]
--all Monorepo: deploy all workspaces sequentially --base-url string Platform base URL --build Build a new image from this directory, then deploy it --build-id string Build ID to deploy (default: last successful build) --context string Named context to target (see 'agentengine context list')-h, --help help for deploy --json Output deployment result as JSON --no-wait Return immediately after triggering without polling for status --org-id string Organization ID --project-id string Project ID --timeout duration Maximum time to wait per deployment (total time = timeout x number of agents for --all) (default 30m0s) --version string Deploy the release build for this declared agent.yaml version (mutually exclusive with --build-id) --workspace string Monorepo: deploy a specific workspace by name (from root agent.yaml) --workspace-id string Workspace ID-y, --yes Accept billed Flex defaults and Atlas IP access-list changes when deploy runs atlas setup
--log-file string override log file path --log-level string file log verbosity (error|warn|info|debug) (default "info") --no-log disable file logging-q, --quiet silence stderr below error-v, --verbose count raise stderr verbosity (-v info, -vv debug)
给本页内容打分