eve-deploy-debugging

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Eve Deploy and Debug

Eve 部署与调试

Use these steps to deploy and diagnose app issues quickly.
使用以下步骤快速部署应用并诊断问题。

Environment Setup

环境设置

  • Get the staging API URL from your admin.
  • Create and use a profile:
bash
eve profile create staging --api-url https://api.eh1.incept5.dev
eve profile use staging
  • 从管理员处获取预发布(staging)API URL。
  • 创建并使用配置文件:
bash
eve profile create staging --api-url https://api.eh1.incept5.dev
eve profile use staging

Deploy Flow (Staging)

预发布环境部署流程

bash
undefined
bash
undefined

Create env if needed

如有需要,创建环境

eve env create staging --project proj_xxx --type persistent
eve env create staging --project proj_xxx --type persistent

Deploy (requires --ref with 40-char SHA or a ref resolved against --repo-dir)

部署(需要带40字符SHA的--ref参数,或指定--repo-dir对应的引用)

eve env deploy staging --ref main --repo-dir .
eve env deploy staging --ref main --repo-dir .

When environment has a pipeline configured, the above triggers the pipeline.

如果环境已配置流水线,上述命令将触发流水线。

Use --direct to bypass pipeline and deploy directly:

使用--direct参数绕过流水线直接部署:

eve env deploy staging --ref main --repo-dir . --direct
eve env deploy staging --ref main --repo-dir . --direct

Pass inputs to pipeline:

向流水线传递输入参数:

eve env deploy staging --ref main --repo-dir . --inputs '{"key":"value"}'
undefined
eve env deploy staging --ref main --repo-dir . --inputs '{"key":"value"}'
undefined

Observe the Deploy

部署状态监控

bash
eve job list --phase active
eve job follow <job-id>
eve job watch <job-id>
eve job diagnose <job-id>
eve job result <job-id>
bash
eve job list --phase active
eve job follow <job-id>
eve job watch <job-id>
eve job diagnose <job-id>
eve job result <job-id>

CLI-First Debugging

基于CLI的调试

  1. eve job follow
    and
    eve job diagnose
    for the deploy job
  2. eve system health
    for API + DB health
Only use cluster tools if you have access and the CLI is insufficient.
  1. 对部署任务使用
    eve job follow
    eve job diagnose
  2. 使用
    eve system health
    检查API和数据库健康状态
仅当CLI工具无法满足需求且你有访问权限时,才使用集群工具。

Common Failure Points

常见故障点

  • Registry auth missing (
    GHCR_USERNAME
    ,
    GHCR_TOKEN
    )
  • Secrets interpolation missing (
    ${secret.KEY}
    not set)
  • Healthcheck failing, blocking readiness
  • Environment gate held by another deploy job
  • 缺少镜像仓库认证信息(
    GHCR_USERNAME
    GHCR_TOKEN
  • 缺少密钥插值配置(未设置
    ${secret.KEY}
  • 健康检查失败,阻止服务就绪
  • 环境部署被其他部署任务占用

Build Failures

构建失败

If a deploy pipeline fails at the build step:
bash
undefined
如果部署流水线在构建步骤失败:
bash
undefined

Find the build ID from the pipeline run

从流水线运行记录中找到构建ID

eve build list --project <project_id>
eve build list --project <project_id>

Full diagnostic

完整诊断

eve build diagnose <build_id>
eve build diagnose <build_id>

Check build logs for errors

检查构建日志中的错误

eve build logs <build_id>
eve build logs <build_id>

Verify registry credentials are set

验证镜像仓库凭据是否已设置

eve secrets list --project <project_id>
eve secrets list --project <project_id>

Required: GHCR_USERNAME, GHCR_TOKEN (or GITHUB_TOKEN)

必填项:GHCR_USERNAME、GHCR_TOKEN(或GITHUB_TOKEN)


Common build failures:
- **Registry auth**: Missing GHCR_USERNAME or GHCR_TOKEN secrets
- **Dockerfile not found**: Check `build.context` path in manifest
- **Multi-stage build failure**: BuildKit handles these correctly; Kaniko may have issues
- **Workspace errors**: Build context not available — check `eve build diagnose`

常见构建故障:
- **镜像仓库认证**:缺少GHCR_USERNAME或GHCR_TOKEN密钥
- **未找到Dockerfile**:检查清单中的`build.context`路径
- **多阶段构建失败**:BuildKit可正确处理此类构建;Kaniko可能存在问题
- **工作区错误**:构建上下文不可用——查看`eve build diagnose`结果

Access URLs

访问URL

  • URL pattern:
    {service}.{orgSlug}-{projectSlug}-{env}.{domain}
  • Ask the admin for the correct domain (staging vs production).
  • URL格式:
    {service}.{orgSlug}-{projectSlug}-{env}.{domain}
  • 向管理员确认正确的域名(预发布环境 vs 生产环境)。

Related Skills

相关技能

  • Local dev loop:
    eve-local-dev-loop
  • Secrets:
    eve-auth-and-secrets
  • Manifest changes:
    eve-manifest-authoring
  • 本地开发循环:
    eve-local-dev-loop
  • 密钥管理:
    eve-auth-and-secrets
  • 清单编写:
    eve-manifest-authoring