sealos-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSealos Deploy
Sealos 部署
Identity and Discovery
身份标识与发现
- Owner: (
sealos-deployand deploy, update, publish, or cloud-runtime requests)./sealos-deploy - Class: across readiness, Dockerfile, template, build, deployment, and Runtime Truth.
composite-orchestration - Canaries: ,
DEP-KUBECONFIG-SCOPE,DEP-CONFIRM-MUTATION, andDEP-REDACT.DEP-RUNTIME-TRUTH - Contract: Read after the canaries pass. It defines the typed phase handoffs, owned
references/deploy-contract.mdartifacts, terminal states, and the read-only Canvas boundary..sealos
- 所有者: (对应
sealos-deploy以及部署、更新、发布或云运行时请求)。/sealos-deploy - 类别: 跨就绪检查、Dockerfile、模板、构建、部署及Runtime Truth的(复合编排)。
composite-orchestration - 金丝雀标识: 、
DEP-KUBECONFIG-SCOPE、DEP-CONFIRM-MUTATION和DEP-REDACT。DEP-RUNTIME-TRUTH - 契约: 金丝雀标识验证通过后,阅读。它定义了类型化阶段交接、专属
references/deploy-contract.md工件、终端状态以及只读Canvas边界。.sealos
Scope and Boundaries
范围与边界
Accept a local path or GitHub URL and scope all work to the selected namespace/app. Preserve the current DEPLOY/UPDATE phase order, artifact inventory, one log file, dependency handoffs, and cleanup footprint. All Kubernetes commands use ; unsupported workloads stop before scoring/build.
.sealosKUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify接受本地路径或GitHub URL,并将所有工作限定在选定的命名空间/应用范围内。保留当前DEPLOY/UPDATE阶段顺序、工件清单、单个日志文件、依赖项交接及清理足迹。所有Kubernetes命令均使用;不支持的工作负载会在评分/构建前终止。
.sealosKUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verifyRisk and Confirmation
风险与确认
Keep auth/workspace, kubeconfig scope, system-tool installation, public exposure, credential changes, deletion, rollback, and cleanup confirmation visible before module detail. Redact passwords, tokens, cookies, env values, kubeconfig, Secret data, and full connection strings. A quality gate and actual Runtime Truth evidence are acceptance conditions.
For every gated mutation, report the exact operation, impact, confirmation, and post-action evidence. Keep sanitized logs, state, diagnostics, and footprint evidence free of secret data.
在展示模块详情前,需明确显示认证/工作区、kubeconfig范围、系统工具安装、公共暴露、凭证变更、删除、回滚及清理的确认信息。对密码、令牌、Cookie、环境变量值、kubeconfig、Secret数据及完整连接字符串进行脱敏处理。质量门控和实际Runtime Truth证据是验收条件。
对于每个门控式变更,需报告确切操作、影响、确认信息及操作后证据。确保脱敏后的日志、状态、诊断信息及足迹证据不含敏感数据。
Lifecycle Workflow
生命周期工作流
For each request, run preflight/auth/workspace, detect mode, enforce eligibility, assess/detect/build or reuse, generate/validate the template, deploy or update, run Runtime Truth, and record state/cleanup evidence. Emit request-scoped , , or ; the existing phase modules below remain authoritative for detailed behavior.
successstoppederror针对每个请求,依次运行预检/认证/工作区检查、检测模式、强制合规性评估、评估/检测/构建或复用、生成/验证模板、部署或更新、运行Runtime Truth,并记录状态/清理证据。输出请求范围的、或;以下现有阶段模块仍为详细行为的权威依据。
successstoppederrorProgressive Disclosure
渐进式披露
Load and helper scripts one phase at a time after the corresponding canaries pass. Preserve typed readiness → Dockerfile → Docker-to-Sealos handoffs, , , , , and delivery evidence; do not hide phase order behind a generic deploy shortcut.
modules/.sealos/analysis.json.sealos/build/build-result.json.sealos/template/index.yaml.sealos/state.json在对应金丝雀标识验证通过后,分阶段加载及辅助脚本。保留类型化的就绪→Dockerfile→Docker到Sealos的交接、、、、及交付证据;不要用通用部署快捷方式隐藏阶段顺序。
modules/.sealos/analysis.json.sealos/build/build-result.json.sealos/template/index.yaml.sealos/state.jsonOutput, Stop, and Error States
输出、终止与错误状态
- : actual returned App URL/live identity, route and port match, setup/login proof, recent logs/events, workload convergence, database/object evidence, full footprint, and saved deploy state.
success - : unsupported eligibility, missing auth/tool, unresolved configuration, or unconfirmed public/destructive/cleanup boundary with the safe next action.
stopped - : failed preflight, build/template/deploy/runtime/rollback/cleanup step and recovery action with sensitive values redacted.
error
- :实际返回的应用URL/实时身份、路由与端口匹配、设置/登录证明、近期日志/事件、工作负载收敛、数据库/对象存储证据、完整资源占用情况及已保存的部署状态。
success - :不符合合规性、缺少认证/工具、配置未解决或未确认公共/破坏性/清理边界,并提供安全的下一步操作建议。
stopped - :预检失败、构建/模板/部署/运行时/回滚/清理步骤失败,并提供脱敏后的恢复操作建议。
error
Handoffs
交接机制
Readiness, Dockerfile, and Docker-to-Sealos inputs use typed , , , , and fields. A verified deploy can hand , , , , and .
targetinputArtifactallowedActionfailureReturnresponseOwnertarget: sealos-canvasinputArtifact: sanitized .sealos/state.json and Runtime TruthallowedAction: read-only topology inspectionfailureReturn: runtime/state diagnosticresponseOwner: sealos-deploy就绪检查、Dockerfile及Docker到Sealos的输入使用类型化的、、、和字段。已验证的部署可传递、、、及。
targetinputArtifactallowedActionfailureReturnresponseOwnertarget: sealos-canvasinputArtifact: 脱敏后的.sealos/state.json和Runtime TruthallowedAction: 只读拓扑检查failureReturn: 运行时/状态诊断responseOwner: sealos-deployVerification
验证机制
Use the existing eligibility, artifact, quality-gate, footprint, live-smoke, rollout, Runtime Truth, and cleanup checks. Baseline cases and must preserve actual App URL/live identity, auth/cleanup confirmation, log scans, and redaction.
deploy-positive-runtime-truthdeploy-violating-missing-runtime-proof使用现有的合规性、工件、质量门控、资源占用、实时冒烟测试、发布、Runtime Truth及清理检查。基准案例和必须保留实际应用URL/实时身份、认证/清理确认、日志扫描及脱敏处理。
deploy-positive-runtime-truthdeploy-violating-missing-runtime-proofCompatibility
兼容性
Sealos auth/workspace are required for deploys. Docker, buildx, and gh CLI are required only when the selected path needs local build/push. git is required when cloning from a GitHub URL or when git metadata is needed. Node.js 18+ remains an optional accelerator. Phase 5 requires Python 3.8+ with PyYAML; root Compose conversion also requires kompose and may require crane when image tags are floating.
部署需要Sealos认证/工作区。仅当选定路径需要本地构建/推送时,才需要Docker、buildx和gh CLI。当从GitHub URL克隆或需要git元数据时,需要git。Node.js 18+为可选加速工具。阶段5需要Python 3.8+及PyYAML;根Compose转换还需要kompose,当镜像标签为浮动标签时可能还需要crane。
Brain Managed Mode
Brain托管模式
The skill has two deliberately separate execution modes:
- Local mode is the existing interactive workflow. It is selected when is absent or has any value other than
SEALAI_DEPLOY_MODE; its auth, prompts, Template API flow, and output remain unchanged.managed - Managed mode is selected only when . The Devbox Codex is the deployment executor: it analyzes, builds, applies, observes, diagnoses, repairs, and verifies with the injected kubeconfig. Brain is the task control plane and form owner; it is not a second Kubernetes executor.
SEALAI_DEPLOY_MODE=managed
Managed mode is non-interactive. Do not start OAuth, install tools, ask for confirmation in the turn, or replace a missing callback with a file, webhook, curl request, or a Brain-side apply. Before doing any work, confirm that the Codex tool registry contains both exact MCP tools and . If either tool is unavailable, stop with a managed-mode fatal error; never claim a deployment result.
template_readydeployment_completedBrain supplies these task-scoped values through the environment:
text
SEALAI_DEPLOY_MODE=managed
SEALAI_DEPLOY_TASK_ID=<task id>
SEALAI_PROJECT_ID=<Brain project id>
SEALAI_NAMESPACE=<target namespace>
SEALAI_INPUTS_PATH=/run/sealai/deployment/inputs.json
SEALAI_TURN_DEADLINE_AT=<absolute deadline>Use the injected kubeconfig/context for every Kubernetes command. Do not perform login or switch workspace. Keep the input file and kubeconfig out of prompts, logs, Timeline text, and generated artifacts; read the input file only when the managed flow says to do so.
The actual Sealos Instance name is owned by the Template/Skill path. Brain does not pre-allocate it and the managed adapter does not add Brain identity labels or .
extraLabelsDeploy compatible cloud workloads to Sealos Cloud, stopping unsupported targets
before build or deployment.
该技能有两个明确分离的执行模式:
- Local mode(本地模式):现有交互式工作流。当不存在或值为
SEALAI_DEPLOY_MODE以外的任何内容时选择;其认证、提示、Template API流程及输出保持不变。managed - Managed mode(托管模式):仅当时选择。Devbox Codex为部署执行器:它通过注入的kubeconfig进行分析、构建、应用、观察、诊断、修复及验证。Brain为任务控制平面及表单所有者;它不是第二个Kubernetes执行器。
SEALAI_DEPLOY_MODE=managed
托管模式为非交互式。不要启动OAuth、安装工具、在当前轮次请求确认,或用文件、Webhook、curl请求或Brain端应用操作替代缺失的回调。在执行任何工作前,确认Codex工具注册表包含两个确切的MCP工具和。若任一工具不可用,则终止并返回托管模式致命错误;绝不要声称部署完成。
template_readydeployment_completedBrain通过环境变量提供以下任务范围的值:
text
SEALAI_DEPLOY_MODE=managed
SEALAI_DEPLOY_TASK_ID=<task id>
SEALAI_PROJECT_ID=<Brain project id>
SEALAI_NAMESPACE=<target namespace>
SEALAI_INPUTS_PATH=/run/sealai/deployment/inputs.json
SEALAI_TURN_DEADLINE_AT=<absolute deadline>所有Kubernetes命令均使用注入的kubeconfig/上下文。不要执行登录或切换工作区。不要在提示、日志、时间线文本及生成的工件中暴露输入文件和kubeconfig;仅在托管流程要求时读取输入文件。
实际Sealos实例名称由Template/Skill路径管控。Brain不会预分配实例名称,托管适配器也不会添加Brain身份标签或。
extraLabels将兼容的云工作负载部署到Sealos Cloud,在构建或部署前终止不支持的目标。
kubectl Safety Rules (all phases)
kubectl安全规则(所有阶段)
All kubectl commands MUST use the Sealos kubeconfig:
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verifySystem tool installation requires user confirmation. If , , or is missing and the skill can install it for the current platform, ask first and only run the install command after the user explicitly replies .
dockerghkubectlykubectl deleteWARNING: About to delete <resource kind>/<resource name>. This data cannot be recovered. Confirm? (y/n)Only proceed after user confirms. This applies even if the pipeline logic suggests deletion — always ask first.
Template API cleanup must include Instance CRs. Deployments created through create in addition to App/workload resources. A cleanup is incomplete until , , workloads, Services, Ingresses, PVCs, and Pods are all checked.
scripts/deploy-template.mjsinstances.app.sealos.io/<app-name>instances.app.sealos.ioapps.app.sealos.ioUse this check when cleaning Template API test deployments:
bash
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" \
get instances.app.sealos.io,app,statefulset,deployment,svc,ingress,pvc,pod | grep "$APP"Delete in this order after confirmation:
bash
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete instances.app.sealos.io "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete app "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete statefulset "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete deployment "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete ingress "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete svc "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" get pvc -o name | grep "$APP" | while read -r PVC; do
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete "$PVC" --ignore-not-found --wait=false
doneAnti-example: do not report cleanup complete after only checking ; that misses and leaves the Sealos Instance layer dirty.
app,statefulset,svc,ingress,pvc,podinstances.app.sealos.io/<app-name>所有kubectl命令必须使用Sealos kubeconfig:
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify系统工具安装需要用户确认。若、或缺失且技能可针对当前平台进行安装,需先询问用户,仅在用户明确回复后才运行安装命令。
dockerghkubectlykubectl deleteWARNING: About to delete <resource kind>/<resource name>. This data cannot be recovered. Confirm? (y/n)仅在用户确认后继续执行。即使流水线逻辑建议删除,也必须先询问。
Template API清理必须包含Instance CRs。 通过创建的部署除了应用/工作负载资源外,还会创建。仅当、、工作负载、服务、Ingresses、PVCs及Pods均已检查完毕,清理才算完成。
scripts/deploy-template.mjsinstances.app.sealos.io/<app-name>instances.app.sealos.ioapps.app.sealos.io清理Template API测试部署时使用以下检查命令:
bash
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" \
get instances.app.sealos.io,app,statefulset,deployment,svc,ingress,pvc,pod | grep "$APP"确认后按以下顺序删除:
bash
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete instances.app.sealos.io "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete app "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete statefulset "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete deployment "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete ingress "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete svc "$APP" --ignore-not-found --wait=false
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" get pvc -o name | grep "$APP" | while read -r PVC; do
KUBECONFIG=~/.sealos/kubeconfig kubectl --insecure-skip-tls-verify -n "$NS" delete "$PVC" --ignore-not-found --wait=false
done反例:仅检查后不要报告清理完成;这会遗漏,导致Sealos实例层残留脏数据。
app,statefulset,svc,ingress,pvc,podinstances.app.sealos.io/<app-name>Usage
使用方式
/sealos-deploy <github-url>
/sealos-deploy # deploy current project
/sealos-deploy <local-path>/sealos-deploy <github-url>
/sealos-deploy # 部署当前项目
/sealos-deploy <local-path>Quick Start
快速开始
Execute the modules in order:
- — Environment checks & Sealos auth
modules/preflight.md - — Full deployment pipeline (Phase 1–6)
modules/pipeline.md - — Post-deploy Runtime Truth Pass (Phase 6.5)
modules/runtime-truth.md
按顺序执行模块:
- — 环境检查 & Sealos认证
modules/preflight.md - — 完整部署流水线(阶段1–6)
modules/pipeline.md - — 部署后Runtime Truth验证(阶段6.5)
modules/runtime-truth.md
Logging
日志记录
Every run MUST write a log file at .
~/.sealos/logs/deploy-<YYYYMMDD-HHmmss>.logAt the very start of execution, create the log file once:
bash
mkdir -p ~/.sealos/logs
LOG_FILE=~/.sealos/logs/deploy-$(date +%Y%m%d-%H%M%S).log
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Deploy started" > "$LOG_FILE"Important: create the log file ONLY ONCE at the start. All subsequent writes MUST append () to this same . Do NOT create a second log file.
>>$LOG_FILEAt each phase boundary, append a log entry to the same file with Bash :
>>[2026-03-05 14:30:01] === Phase 0: Preflight ===
[2026-03-05 14:30:01] Docker: ✓ 27.5.1
[2026-03-05 14:30:01] Node.js: ✓ 22.12.0
[2026-03-05 14:30:02] Sealos auth: ✓ (region: <REGION from config.json>)
[2026-03-05 14:30:02] Project: /Users/dev/myapp (github: https://github.com/owner/repo)
[2026-03-05 14:30:03] === Phase 1: Assess ===
[2026-03-05 14:30:03] Score: 9/12 (good)
[2026-03-05 14:30:03] Language: python, Framework: fastapi, Port: 8000
[2026-03-05 14:30:03] Decision: CONTINUE
[2026-03-05 14:30:04] === Phase 2: Detect Image ===
[2026-03-05 14:30:05] Docker Hub: owner/repo:latest (arm64 only, no amd64)
[2026-03-05 14:30:05] GHCR: not found
[2026-03-05 14:30:05] Decision: no amd64 image → continue to Phase 3
[2026-03-05 14:30:06] === Phase 3: Dockerfile ===
[2026-03-05 14:30:06] Existing Dockerfile: none
[2026-03-05 14:30:07] Generated: python-fastapi template, port 8000
[2026-03-05 14:30:08] === Phase 4: Build & Push ===
[2026-03-05 14:30:08] Registry: ghcr (auto-detected via gh CLI)
[2026-03-05 14:30:30] Build: ✓ ghcr.io/zhujingyang/repo:20260305-143022
[2026-03-05 14:30:32] GHCR pullability: private package detected — deploy will auto-create image pull Secret from gh CLI
[2026-03-05 14:30:33] IMAGE_REF=ghcr.io/zhujingyang/repo:20260305-143022
[2026-03-05 14:30:34] === Phase 5: Template ===
[2026-03-05 14:30:35] Output: .sealos/template/index.yaml
[2026-03-05 14:30:36] === Phase 6: Deploy ===
[2026-03-05 14:30:36] Deploy URL: https://template.gzg.sealos.run/api/v2alpha/templates/raw
[2026-03-05 14:30:38] Status: 201 — deployed successfully
[2026-03-05 14:30:38] === DONE ===On error, log the error details before stopping:
[2026-03-05 14:30:10] === ERROR ===
[2026-03-05 14:30:10] Phase: 4 (Build & Push)
[2026-03-05 14:30:10] Error: docker buildx build failed — "npm ERR! Missing script: build"
[2026-03-05 14:30:10] Retry: 1/3At the very end, tell the user where the log is:
Log saved to: ~/.sealos/logs/deploy-20260305-143001.log每次运行必须在路径下写入日志文件。
~/.sealos/logs/deploy-<YYYYMMDD-HHmmss>.log在执行开始时,仅创建一次日志文件:
bash
mkdir -p ~/.sealos/logs
LOG_FILE=~/.sealos/logs/deploy-$(date +%Y%m%d-%H%M%S).log
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Deploy started" > "$LOG_FILE"重要提示:仅在开始时创建一次日志文件。后续所有写入必须使用追加模式()写入同一个。不要创建第二个日志文件。
>>$LOG_FILE在每个阶段边界,使用Bash的命令向同一文件追加日志条目:
>>[2026-03-05 14:30:01] === Phase 0: Preflight ===
[2026-03-05 14:30:01] Docker: ✓ 27.5.1
[2026-03-05 14:30:01] Node.js: ✓ 22.12.0
[2026-03-05 14:30:02] Sealos auth: ✓ (region: <REGION from config.json>)
[2026-03-05 14:30:02] Project: /Users/dev/myapp (github: https://github.com/owner/repo)
[2026-03-05 14:30:03] === Phase 1: Assess ===
[2026-03-05 14:30:03] Score: 9/12 (good)
[2026-03-05 14:30:03] Language: python, Framework: fastapi, Port: 8000
[2026-03-05 14:30:03] Decision: CONTINUE
[2026-03-05 14:30:04] === Phase 2: Detect Image ===
[2026-03-05 14:30:05] Docker Hub: owner/repo:latest (arm64 only, no amd64)
[2026-03-05 14:30:05] GHCR: not found
[2026-03-05 14:30:05] Decision: no amd64 image → continue to Phase 3
[2026-03-05 14:30:06] === Phase 3: Dockerfile ===
[2026-03-05 14:30:06] Existing Dockerfile: none
[2026-03-05 14:30:07] Generated: python-fastapi template, port 8000
[2026-03-05 14:30:08] === Phase 4: Build & Push ===
[2026-03-05 14:30:08] Registry: ghcr (auto-detected via gh CLI)
[2026-03-05 14:30:30] Build: ✓ ghcr.io/zhujingyang/repo:20260305-143022
[2026-03-05 14:30:32] GHCR pullability: private package detected — deploy will auto-create image pull Secret from gh CLI
[2026-03-05 14:30:33] IMAGE_REF=ghcr.io/zhujingyang/repo:20260305-143022
[2026-03-05 14:30:34] === Phase 5: Template ===
[2026-03-05 14:30:35] Output: .sealos/template/index.yaml
[2026-03-05 14:30:36] === Phase 6: Deploy ===
[2026-03-05 14:30:36] Deploy URL: https://template.gzg.sealos.run/api/v2alpha/templates/raw
[2026-03-05 14:30:38] Status: 201 — deployed successfully
[2026-03-05 14:30:38] === DONE ===出现错误时,在终止前记录错误详情:
[2026-03-05 14:30:10] === ERROR ===
[2026-03-05 14:30:10] Phase: 4 (Build & Push)
[2026-03-05 14:30:10] Error: docker buildx build failed — "npm ERR! Missing script: build"
[2026-03-05 14:30:10] Retry: 1/3执行结束时,告知用户日志位置:
Log saved to: ~/.sealos/logs/deploy-20260305-143001.logScripts
脚本
Located in within this skill directory ():
scripts/<SKILL_DIR>/scripts/| Script | Usage | Purpose |
|---|---|---|
| | Read-only fail-closed workload classification; decision is stdout-only |
| | Deterministic readiness scoring (0-12) |
| | Detect configured GitHub repo → Sealos template fast-path matches |
| | Validate |
| | Detect existing Docker/GHCR images |
| | Build amd64 image & push to the selected registry (Docker Hub path assumes a public image at deploy time; omitting |
| | Create/update app-scoped GHCR pull Secret and optionally patch an existing Deployment to reference it |
| | Refresh GHCR package access in the current TTY; |
| | Resolve the current region, enforce private sensitive-args files on POSIX, post a local template YAML, and emit an allowlisted result with credential values redacted |
| | Validate the Brain managed contract and compute the exact template SHA without injecting Instance identity or labels |
| | Read-only Launchpad public-network discovery check with App URL and Service port matching |
| | Read-only inventory of Instance/App/workloads/Jobs/KubeBlocks/PVCs/ObjectStorageBuckets for deploy debug and cleanup planning |
| | Read-only or credentialed HTTP smoke test for the real Sealos App entry URL, authenticated routes, and API/SPA negative probes |
| | Read-only JSON scan of Pod/init/main logs plus Warning Event convergence after readiness, login, and documented API or missing-static-asset checks |
| | Sealos Cloud authentication & workspace switching |
All scripts output JSON. Run via Bash and parse the result.
For public web applications, run before HTTP smoke. Acceptance requires , an open public network, the expected Service port, and an App URL host match. The script emits an allowlisted network summary and excludes raw Launchpad application data, environment variables, Secrets, and kubeconfig content.
sealos-launchpad-network.mjsok: trueRuntime Event acceptance uses two scans. Capture the first report after readiness with no baseline, wait at least 60 seconds, then pass that report through for the final scan. Extend to cover one full known reconciliation, probe, or scheduled-work period. An initial Warning Event is an observation; a Warning that advances after the baseline, an unresolved referenced Secret, a Ready transition, a Pod replacement, or a restart delta is an active failure.
--baseline--min-window-secondsFor intentional fault injection, retain a pre-injection report as evidence. After recovery reaches Ready, capture a fresh recovery baseline and compare the final scan against that recovery baseline after the full stability window.
位于该技能目录下的路径():
scripts/<SKILL_DIR>/scripts/| 脚本 | 使用方式 | 用途 |
|---|---|---|
| | 只读式故障关闭工作负载分类;决策仅输出到标准输出 |
| | 确定性就绪评分(0-12) |
| | 检测已配置的GitHub仓库与Sealos模板的快速路径匹配 |
| | 根据强制验证的Schema校验 |
| | 检测现有Docker/GHCR镜像 |
| | 构建amd64镜像并推送到选定的注册表(Docker Hub路径假设部署时为公开镜像;省略 |
| | 创建/更新应用范围的GHCR拉取Secret,并可选地修补现有Deployment以引用该Secret |
| | 在当前TTY中刷新GHCR包访问权限; |
| | 解析当前区域,在POSIX系统上强制使用私有敏感参数文件,提交本地模板YAML,并输出脱敏后的许可结果 |
| | 验证Brain托管契约,并计算模板的精确SHA值,不注入实例身份或标签 |
| | 只读式Launchpad公共网络发现检查,验证应用URL与服务端口匹配 |
| | 只读式实例/应用/工作负载/Job/KubeBlocks/PVC/对象存储桶清单,用于部署调试和清理规划 |
| | 针对真实Sealos应用入口URL、认证路由及API/SPA负探针的只读或带凭证HTTP冒烟测试 |
| | 就绪检查、登录及已记录API或缺失静态资源检查后,对Pod/初始化/主容器日志及Warning事件收敛情况进行只读JSON扫描 |
| | Sealos Cloud认证与工作区切换 |
所有脚本输出JSON格式内容。通过Bash运行并解析结果。
对于公共Web应用,在HTTP冒烟测试前运行。验收要求、开放的公共网络、预期的服务端口及应用URL主机匹配。脚本输出许可的网络摘要,排除原始Launchpad应用数据、环境变量、Secrets及kubeconfig内容。
sealos-launchpad-network.mjsok: true运行时事件验收使用两次扫描。就绪检查后捕获第一个无基准的报告,等待至少60秒,然后将该报告通过参数传入进行最终扫描。延长以覆盖完整的已知协调、探测或定时任务周期。初始Warning事件为观察项;基准后出现的Warning、未解决的引用Secret、Ready状态转换、Pod替换或重启增量为主动故障。
--baseline--min-window-seconds对于故意故障注入,保留注入前的报告作为证据。恢复至Ready状态后,捕获新的恢复基准,并在完整稳定窗口后将最终扫描结果与该恢复基准进行比较。
Internal Skill Dependencies
内部技能依赖
This skill references knowledge files from co-installed internal skills. These are not user-facing — they are loaded on-demand during specific phases.
<SKILL_DIR>SKILL.md<SKILL_DIR>/../<SKILL_DIR>/../
├── sealos-deploy/ ← this skill (user entry point) = <SKILL_DIR>
├── dockerfile-skill/ ← Phase 3: Dockerfile generation knowledge
├── cloud-native-readiness/ ← Phase 0.4 eligibility policy + Phase 1 assessment criteria
└── docker-to-sealos/ ← Phase 5: Sealos template rulesPaths used in pipeline.md follow the pattern:
<SKILL_DIR>/../dockerfile-skill/knowledge/error-patterns.md
<SKILL_DIR>/../dockerfile-skill/templates/<lang>.dockerfile
<SKILL_DIR>/../docker-to-sealos/references/sealos-specs.md该技能引用协同安装的内部技能的知识文件。这些文件不面向用户 —— 它们会在特定阶段按需加载。
<SKILL_DIR>SKILL.md<SKILL_DIR>/../<SKILL_DIR>/../
├── sealos-deploy/ ← 本技能(用户入口) = <SKILL_DIR>
├── dockerfile-skill/ ← 阶段3:Dockerfile生成知识
├── cloud-native-readiness/ ← 阶段0.4合规性策略 + 阶段1评估标准
└── docker-to-sealos/ ← 阶段5:Sealos模板规则pipeline.md中使用的路径遵循以下模式:
<SKILL_DIR>/../dockerfile-skill/knowledge/error-patterns.md
<SKILL_DIR>/../dockerfile-skill/templates/<lang>.dockerfile
<SKILL_DIR>/../docker-to-sealos/references/sealos-specs.mdPhase Overview
阶段概述
| Phase | Action | Skip When |
|---|---|---|
| 0 — Preflight | Capability scan, path-specific warnings, Sealos auth | Initial blockers resolved |
| 0.4 — Eligibility | Confirm the repository root is a supported cloud workload | Any non-eligible result → stop |
| 0.5 — Template Fast Path | Match GitHub repo to a configured Sealos template | No match, or match cannot materialize template YAML |
| 1 — Assess | Clone repo (or use current project), analyze deployability | Score too low → stop |
| 2 — Detect | Route an evidence-confirmed source-ready static tree to the pinned Nginx image build; otherwise find an existing image | Existing image → jump to Phase 5 |
| 3 — Dockerfile | Generate Dockerfile if missing | Already has one → skip |
| 4 — Build & Push | | — |
| 5 — Template | Generate Sealos application template | — |
| 5.5 — Configure | Guide user through app env vars and inputs | No inputs needed |
| 6 — Deploy | Deploy template to Sealos Cloud | — |
| 6.5 — Runtime Truth Pass | Verify Launchpad public networking, the actual Sealos runtime, logs, Event convergence, App URL, login path, object-storage flow, and resource footprint | User explicitly requests deploy-only output |
| 阶段 | 操作 | 跳过条件 |
|---|---|---|
| 0 — 预检 | 能力扫描、路径特定警告、Sealos认证 | 初始阻塞问题已解决 |
| 0.4 — 合规性 | 确认仓库根目录为受支持的云工作负载 | 任何不合规结果 → 终止 |
| 0.5 — 模板快速路径 | 匹配GitHub仓库与已配置的Sealos模板 | 无匹配,或匹配无法生成模板YAML |
| 1 — 评估 | 克隆仓库(或使用当前项目),分析可部署性 | 评分过低 → 终止 |
| 2 — 检测 | 将经证据确认的源码就绪静态树路由到固定的Nginx镜像构建;否则查找现有镜像 | 找到现有镜像 → 跳至阶段5 |
| 3 — Dockerfile | 缺失时生成Dockerfile | 已有Dockerfile → 跳过 |
| 4 — 构建与推送 | | — |
| 5 — 模板 | 生成Sealos应用模板 | — |
| 5.5 — 配置 | 引导用户配置应用环境变量及输入参数 | 无需输入参数 |
| 6 — 部署 | 将模板部署到Sealos Cloud | — |
| 6.5 — Runtime Truth验证 | 验证Launchpad公共网络、实际Sealos运行时、日志、事件收敛、应用URL、登录路径、对象存储流程及资源占用情况 | 用户明确请求仅输出部署结果 |
Decision Flow
决策流程
Input (GitHub URL / local path)
│
▼
[Phase 0] Preflight ── fail → guide user to fix and STOP
│ pass
▼
[Phase 0.5] Template fast path
│
├── materialized template match ───────┐
│ │
▼ │
[Phase 1] Assess ── not suitable → STOP with reason
│ suitable
▼
[Phase 2] Detect existing image
│
├── found (amd64) ────────────────────┐
│ │
▼ │
[Phase 3] Dockerfile (generate/reuse) │
│ │
▼ │
[Phase 4] Build & Push to registry │
│ │
◄─────────────────────────────────────┘
│
▼
[Phase 5] Generate Sealos Template
◄──────────────────────────────────────┘
│
▼
[Phase 5.5] Configure ── present env vars → ask user for inputs → confirm
│
▼
[Phase 6] Deploy to Sealos Cloud ── 401 → re-auth
│ 409 → instance exists
▼
[Phase 6.5] Runtime Truth Pass ── network/runtime/log/login issue → debug template or runtime config
│
▼
Done — app deployed ✓Execution rule: Phase 1 must never start while Phase 0 still has unresolved entry blockers. Docker, , builder, and registry failures must be reported early, but only become hard blockers if the run later requires local build/push.
gh输入(GitHub URL / 本地路径)
│
▼
[阶段0] 预检 ── 失败 → 引导用户修复并终止
│ 通过
▼
[阶段0.5] 模板快速路径
│
├── 匹配到可生成的模板 ───────┐
│ │
▼ │
[阶段1] 评估 ── 不适用 → 终止并说明原因
│ 适用
▼
[阶段2] 检测现有镜像
│
├── 找到(amd64) ────────────────────┐
│ │
▼ │
[阶段3] Dockerfile(生成/复用) │
│ │
▼ │
[阶段4] 构建并推送到注册表 │
│ │
◄─────────────────────────────────────┘
│
▼
[阶段5] 生成Sealos模板
◄──────────────────────────────────────┘
│
▼
[阶段5.5] 配置 ── 展示环境变量 → 请求用户输入 → 确认
│
▼
[阶段6] 部署到Sealos Cloud ── 401 → 重新认证
│ 409 → 实例已存在
▼
[阶段6.5] Runtime Truth验证 ── 网络/运行时/日志/登录问题 → 调试模板或运行时配置
│
▼
完成 — 应用部署成功 ✓执行规则: 阶段1绝不能在阶段0仍有未解决的入口阻塞问题时启动。Docker、、构建器及注册表故障需尽早报告,但仅当后续运行需要本地构建/推送时才成为硬阻塞。
gh