olares-chart
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDeploy your code or any project to your Olares
将你的代码或任意项目部署到Olares
Flags and syntax come from . Read the shared Olares platform model before porting: chart decisions depend on its storage, uid-1000, namespace, middleware and version semantics.
olares-cli chart <verb> --helpAuthoring (, , ) is local-only. Building for a specific Olares needs the target node architecture before the first image build, and deployment needs the active profile.
from-composelintpackagePorting targets Olares 1.12.6+; load versioning before writing manifest/chart version and dependency fields.
参数与语法可通过 查询。迁移前请阅读共享的Olares平台模型:Chart的决策依赖于其存储、uid-1000、命名空间、中间件和版本语义。
olares-cli chart <verb> --help编写(、、)仅在本地执行。为特定Olares构建时,首次镜像构建前需确定目标节点架构,部署则需要激活的配置文件。
from-composelintpackage迁移适用于Olares 1.12.6及以上版本;编写清单/Chart版本和依赖字段前,请查看版本控制文档。
When to use
适用场景
- Turn a repo / docker-compose / generic Helm chart into an Olares app, or validate an OlaresManifest; package its image; wire storage / middleware / entrances / env / GPU
- Deploy / run the app on your own Olares (+
market upload); afterinstallidentifies a chart-owned root cause, edit, lint, and redeploy the chartolares-doctor - Serve a generation/chat model with an official base app, integrate , or route an embedding app to the appropriate Market install
llm-init
This skill owns changes to your chart. finds runtime root causes, manages published apps, configures and calls a model once its application is running, and prepares a public listing.
olares-doctorolares-marketolares-routerolares-publish- 将代码仓库/docker-compose/通用Helm chart转换为Olares应用,或验证OlaresManifest;打包镜像;配置存储/中间件/入口/环境变量/GPU
- 在你自己的Olares上部署/运行应用(+
market upload);通过install识别由Chart导致的根本原因后,编辑、校验并重新部署Chartolares-doctor - 使用官方基础应用运行生成式/对话模型,集成,或引导嵌入型应用至合适的市场安装渠道
llm-init
本技能负责管理你的Chart变更。用于排查运行时根本原因,管理已发布应用,在应用运行后配置并调用模型,用于准备公开上架。
olares-doctorolares-marketolares-routerolares-publishThe shape of the work — two axes
工作流程——两个核心维度
Porting an app is not a fixed pipeline — it is driving two orthogonal but coupled axes each to its own ready state, looping back as constraints surface (an image's baked-in uid/paths constrain the chart's mounts/permissions; a deploy constraint can send you back to rebuild the image). Start wherever your app already stands, not at a fixed step 1. Once both axes are ready, deploy to the current Olares — an automatic upload + install + diagnose loop.
from-compose → lint → deploy- Packaging — the image: the app built into a pullable, arch-correct artifact. Olares only pulls, never builds.
- Deployment — the chart: a -passing OlaresManifest + templates.
lintis only one way in.from-compose
First move (not a pipeline): locate where the app already sits on the packaging and deployment state tables → drive the concerns to ready, looping as constraints surface → deploy to your Olares.
迁移应用并非固定的流水线,而是推动两个正交但相互关联的维度各自达到“就绪”状态,当约束条件出现时循环调整(镜像内置的uid/路径会限制Chart的挂载/权限;部署约束可能需要你重新构建镜像)。从应用当前的状态开始,而非固定的第一步。当两个维度都就绪后,部署到当前Olares——自动执行上传+安装+诊断循环。
from-compose → lint → deploy- 打包——镜像:将应用构建为可拉取、架构匹配的制品。Olares仅拉取镜像,从不从源码构建。
- 部署——Chart:通过校验的OlaresManifest + 模板。
lint只是一种入门方式。from-compose
首要行动(非流水线):定位应用在打包和部署状态表中的当前位置→推动相关事项达到就绪状态,根据约束条件循环调整→部署到你的Olares。
Axis 1 — Packaging (the image)
维度1——打包(镜像)
Olares pulls images from a registry and never builds from source, so every workload must reference a publicly pullable, node-arch-correct image. Image work is agent-driven: resolve the target Olares node's architecture with , then ask which registry the developer uses (Docker Hub / ghcr), check docker is usable and logged in, and build + push yourself — only stays manual, and only when not already authenticated (references/olares-chart-image.md). Build for the target node's arch (single-arch), never the development host's implicit/default arch; multi-arch is only for publishing.
olares-cli cluster node listdocker loginThe target architecture is a build input, so resolving it cannot be deferred.says what the chart claims; nothing opens the image to check what it is. A wrong guess therefore survives build, push andspec.supportArch, and first appears aslintin the cluster — and on Apple Silicon an unresolved target silently becomes arm64. Query the node or have the developer state the arch; with neither, ask instead of guessing. Only a chart nobody is deploying yet needs no target.exec format error
| Packaging state | Do this | Ready when |
|---|---|---|
| No Dockerfile (just source) | author a Dockerfile, then build+push | — |
| Dockerfile, but no pullable image | build+push (Docker Hub or ghcr) | — |
| A pullable image exists | check its arch; rebuild if it doesn't match the target Olares node ( | every workload has a pullable, arch-correct image |
Olares仅从镜像仓库拉取镜像,从不从源码构建,因此每个工作负载必须引用可公开拉取、与节点架构匹配的镜像。镜像工作由代理驱动:通过确定目标Olares节点的架构,然后询问开发者使用的仓库(Docker Hub/ghcr),检查Docker是否可用并已登录,然后自行构建+推送——仅需手动执行,且仅在未认证时需要(参考references/olares-chart-image.md)。针对目标节点的架构构建(单架构),切勿使用开发主机的默认架构;多架构仅用于发布。
olares-cli cluster node listdocker login目标架构是构建输入,不可延迟确定。声明Chart支持的架构;系统不会检查实际镜像的架构。错误的判断会在构建、推送和spec.supportArch中存活,直到在集群中出现lint——在Apple Silicon上未确定目标架构时会默认使用arm64。请查询节点信息或让开发者指定架构;若两者都无法获取,请询问而非猜测。仅当Chart尚未部署时无需指定目标。exec format error
| 打包状态 | 操作 | 就绪条件 |
|---|---|---|
| 无Dockerfile(仅源码) | 编写Dockerfile,然后构建+推送 | — |
| 有Dockerfile,但无可拉取镜像 | 构建+推送至Docker Hub或ghcr | — |
| 已存在可拉取镜像 | 检查其架构;若与目标Olares节点不匹配则重新构建( | 每个工作负载都有可拉取、架构匹配的镜像 |
Axis 2 — Deployment (the chart)
维度2——部署(Chart)
The target is a -passing Olares chart. (kompose) is just one entry method — a bare repo, a generic Helm chart, or an already-Olares chart each begin elsewhere (see the state table below). Local authoring ( / / ) needs no login.
lintfrom-composefrom-composelintpackage| Deployment state | Do this | Ready when |
|---|---|---|
| Source only (no compose) | author a docker-compose from the code (compose.md) | — |
| A docker-compose | | — |
| A generic Helm chart (no OlaresManifest) | hand-author | — |
| Uploaded to the Olares, but no local copy left | | — |
| Already an Olares chart | go straight to validation | a chart that passes |
目标是通过校验的Olares Chart。(基于kompose)只是一种入门方式——裸仓库、通用Helm chart或已有的Olares Chart都从不同的起点开始(见下方状态表)。本地编写(//)无需登录。
lintfrom-composefrom-composelintpackage| 部署状态 | 操作 | 就绪条件 |
|---|---|---|
| 仅源码(无compose) | 根据代码编写docker-compose(参考compose.md) | — |
| 已有docker-compose | 执行 | — |
| 通用Helm chart(无OlaresManifest) | 手动编写 | — |
| 已上传至Olares,但无本地副本 | 执行 | — |
| 已是Olares Chart | 直接进行验证 | 通过 |
Deploy to your Olares (the done step)
部署到你的Olares(完成步骤)
Both axes ready → deploy to the current Olares automatically. proves the chart is structurally valid; it does not prove the app pulls its images, wires its middleware, and reaches — the deploy loop does. After passes, proceed without asking: check login → verify intersects → package → → → on failure fetch logs → diagnose → fix chart + re-lint → retry. An architecture upload rejection is terminal until the manifest/image changes; never bump and retry the unchanged package. Only stop to ask when the profile fails olares-shared's auth-readiness gate ( / ) — / both proceed. Full procedure: references/olares-chart-deploy.md.
lintrunninglintspec.supportArchcluster node listmarket uploadmarket install -s upload --watchinvalidatedneverlogged-inexpiredFor deploying to your own Olares, metadata can stay a stub as long as passes; functional refinement (storage / middleware / entrances) is still required.
lint两个维度就绪后→自动部署到当前Olares。仅证明Chart结构有效;无法证明应用能拉取镜像、配置中间件并进入状态——部署循环会验证这些。通过后无需询问即可继续:检查登录状态→验证与的架构匹配→打包→→→失败时获取日志→诊断→修复Chart并重新校验→重试。架构不匹配导致的上传失败需修改清单/镜像后才能解决;切勿在未修改包的情况下重试版本。仅当配置文件未通过olares-shared的认证就绪检查(/)时才需停止询问——/状态均可继续。完整流程参考references/olares-chart-deploy.md。
lintrunninglintspec.supportArchcluster node listmarket uploadmarket install -s upload --watchinvalidatedneverlogged-inexpired对于部署到自己的Olares,只要通过,元数据可暂留为占位符;但仍需进行功能优化(存储/中间件/入口)。
lintConcern router
问题导航
from-composefrom-composeEvery port
所有迁移场景
| Trigger | Read |
|---|---|
| Build or select every workload image | image |
| Decide process uid, then mounted-volume ownership — two independent questions, see below | run identity |
| Map persistence, entrances, metadata and workload replicas | manifest |
| Map configuration and platform values | environment, then defaults or system values only when needed |
| Handle passwords, API keys or generated keys | secrets |
| Set manifest/chart versions and dependencies | versioning |
| Validate after a chart change | lint |
| Prove the chart on the target Olares | deploy |
The manifest reference covers four concerns separately: storage, entrances/ports, workloads/replicas and metadata. Together with image, run identity, env, secrets, versioning, validation and deployment, these are the 11 concerns every port checks.
| 触发条件 | 参考文档 |
|---|---|
| 构建或选择每个工作负载的镜像 | image |
| 确定进程uid,然后确定挂载卷的所有权——两个独立问题,见下文 | run identity |
| 映射持久化、入口、元数据和工作负载副本数 | manifest |
| 映射配置和平台值 | environment,仅在需要时参考defaults或system values |
| 处理密码、API密钥或生成的密钥 | secrets |
| 设置清单/Chart版本和依赖 | versioning |
| 变更Chart后进行验证 | lint |
| 在目标Olares上验证Chart | deploy |
清单参考文档单独涵盖四个事项:存储、入口/端口、工作负载/副本数和元数据。加上镜像、运行身份、环境变量、密钥、版本控制、验证和部署,这些是所有迁移场景都需检查的11项事项。
Run identity: answer two questions
运行身份:回答两个问题
Q1 (what uid the process ends up as) and Q2 (who owns the directories it writes) are independent: every Q1 answer can be paired with either Q2 answer. Answer both, then open the run identity reference for the how.
| Question | Answer | Do |
|---|---|---|
| Q1 What is the image's effective uid? | 1000 | |
0, and the entrypoint drops via | Leave | |
| 0 and stays root, or any other non-1000 uid | Try | |
| Q2 Does it write a userspace mount? | no | Done |
| yes | Add a non-recursive |
Two red lines: never at runtime, and never set an explicit root — the permissions initContainer is the only exception.
chown -RsecurityContextbeclab/问题1(进程最终使用的uid)和问题2(进程写入目录的所有者)是独立的:每个问题1的答案都可与任意问题2的答案配对。回答两个问题后,查看运行身份参考文档了解具体操作。
| 问题 | 答案 | 操作 |
|---|---|---|
| Q1 镜像的有效uid是什么? | 1000 | 设置 |
0,且入口点通过 | 不设置 | |
| 0且保持root,或其他非1000的uid | 尝试设置 | |
| Q2 是否写入用户空间挂载? | 否 | 完成 |
| 是 | 添加非递归的 |
两个红线规则:运行时切勿执行,切勿设置显式的root——权限初始化容器是唯一例外。
chown -RsecurityContextbeclab/Conditional
条件场景
| Trigger | Read |
|---|---|
| Compose bundles a database/queue, or an app dependency is needed | middleware and dependencies |
| CUDA image, model provisioning or shared model cache | GPU and models |
Generation/chat, custom | model routing, model operations, custom integration |
| The model application is already running and serves the wrong thing | |
| GPU/accelerator scheduling modes or resource envelope | accelerator |
| The app must run Docker or Compose | DinD |
| One heavy backend serves multiple users | shared backend |
| The running app needs a memorable route or custom FQDN | custom URL |
After passes, drive the deploy/debug loop within the authorised chart task without asking at every install, upgrade, restart, uninstall or clean reinstall. Stop for login, missing registry credentials, an ambiguous target or work outside that task scope. The full assembly sequence is in workflow.
lint| 触发条件 | 参考文档 |
|---|---|
| Compose包含数据库/队列,或需要应用依赖 | middleware and dependencies |
| CUDA镜像、模型部署或共享模型缓存 | GPU and models |
生成式/对话模型、自定义 | model routing、model operations、custom integration |
| 模型应用已运行但服务内容错误 | |
| GPU/加速器调度模式或资源限制 | accelerator |
| 应用必须运行Docker或Compose | DinD |
| 单个重型后端服务多个用户 | shared backend |
| 运行中的应用需要易记路由或自定义FQDN | custom URL |
lintCLI verbs
CLI子命令
The only subcommands (source of truth: ). Everything else above is docker or sibling skills.
olares-cli chart--help| Verb | What it does | Reference |
|---|---|---|
| kompose-convert compose file(s) into an Olares chart skeleton | from-compose.md |
| validate a chart dir / | lint.md |
| package a chart dir into a | workflow.md (D4) |
以下是唯一的子命令(权威来源:)。其他操作均使用Docker或关联技能。
olares-cli chart--help| 子命令 | 功能 | 参考文档 |
|---|---|---|
| 将compose文件转换为Olares Chart骨架 | from-compose.md |
| 使用市场导入流水线验证Chart目录/ | lint.md |
| 将Chart目录打包为 | workflow.md(D4部分) |
Special porting patterns
特殊迁移模式
Most of this skill assumes a web app with an HTTP entrance. When the upstream doesn't fit, match a known pattern first; if still unsure, see how the official ports solved it.
- Headless CLI / service (no web UI) — no GUI to point an entrance at: add a web-terminal sidecar as a visible entrance + expose the API/MCP port as an internal entrance. → archetype-headless.md
invisible - GUI desktop app (browser-streamed) — a native Linux desktop app with no web UI: wrap it in a web-desktop base image (Selkies default, or KasmVNC for old hardware/static UIs), point one visible window entrance at HTTP , and device-gate optional iGPU/VAAPI acceleration on
:3000. → archetype-gui.md.Values.deviceName - If no documented pattern fits, inspect a current active port in beclab/apps before guessing:
bash
gh search code --repo beclab/apps <keyword> # find charts using a pattern (e.g. type: application, accelerator, appCommon)本技能大多假设应用为带有HTTP入口的Web应用。若上游应用不符合该模式,请先匹配已知模式;若仍不确定,请查看官方迁移案例的解决方案。
- 无头CLI/服务(无Web UI):无GUI可设置入口:添加web-terminal边车作为可见入口 + 将API/MCP端口暴露为内部入口。→ archetype-headless.md
invisible - GUI桌面应用(浏览器流式传输):无Web UI的原生Linux桌面应用:将其包装在web-desktop基础镜像中(默认使用Selkies,旧硬件/静态UI使用KasmVNC),将一个可见窗口入口指向HTTP ,并通过
:3000设置可选的iGPU/VAAPI加速设备权限。→ archetype-gui.md.Values.deviceName - 若无文档化模式可用,请先查看beclab/apps中的现有迁移案例,切勿猜测:
bash
gh search code --repo beclab/apps <keyword> # 查找使用指定模式的Chart(例如type: application, accelerator, appCommon)then browse https://github.com/beclab/apps/tree/main/<app> — its OlaresManifest.yaml + templates/
然后浏览https://github.com/beclab/apps/tree/main/<app> ——查看其OlaresManifest.yaml + templates/
Skip references that would mislead:
- **Apps with a `.suspend` (or `.remove`) control file in the OAC root** — suspended / no longer distributed; not a current, reliable pattern.
- **Shared / cluster-scoped charts** that express sharing with `spec.subCharts[].shared: true` + `options.appScope.clusterScoped: true` + `appRef` (the `ollamaserver`/`ollamav2` shape). Copy the shared-app pattern from an `apiVersion: v3` app, not from these. See [shared.md](references/olares-chart-shared.md).
跳过可能误导的参考内容:
- **OAC根目录包含`.suspend`(或`.remove`)控制文件的应用**——已暂停/不再分发;并非当前可靠模式。
- **共享/集群范围的Chart**,通过`spec.subCharts[].shared: true` + `options.appScope.clusterScoped: true` + `appRef`实现共享(`ollamaserver`/`ollamav2`模式)。请从`apiVersion: v3`应用中复制共享应用模式,而非这些旧模式。参考[shared.md](references/olares-chart-shared.md)。Gotchas (what lint
won't catch)
lint注意事项(lint
无法检测的问题)
lintlint- must match the chart folder and
metadata.nameChart.yaml, and bename. Keep^[a-z][a-z0-9]{0,29}$equal tometadata.appid(metadata.namesets it). Rename all four together.from-composedoes NOT requirelint— a chart lints without it, butmetadata.appidrejects a missingmarket upload, so set it explicitly or a lint-clean chart still fails to upload. It does not decide the entrance host: the platform derives that from the app name, so read the real value from theappidcolumn ofURLrather than computing it.settings apps list - Cluster upload requires to intersect at least one current node architecture. Query
spec.supportArch; ensure the referenced images support the same target architecture. If upload reportsolares-cli cluster node list, fix and repackage before retrying. If it reportsarchitecture_incompatible, keep the package/version unchanged and wait for node discovery to recover.cluster_arch_unavailable - Declared /
.Values.userspace.appData/appCachemounts MUST have the matchinguserDatafield, or the app-data cross-check fails.permission - volumes + rolling updates are incompatible — replace host mounts with the userspace volumes above.
hostPath - The entrance proxy caps every request at seconds (default 15s) — long LLM streams / big uploads / slow reports get cut at the entrance (504 / closed connection) even when the pod is healthy. Set
options.apiTimeoutto disable, or a large bounded value; a negative value is not "unlimited" (it falls back to 15s). See the Manifest refinement areas.options.apiTimeout: 0
lint- 必须与Chart文件夹和
metadata.name中的Chart.yaml匹配,且格式为name。保持^[a-z][a-z0-9]{0,29}$与metadata.appid一致(metadata.name会自动设置)。需同时重命名这四项。from-compose不要求lint——无metadata.appid的Chart可通过校验,但**appid会拒绝缺少market upload的包**,因此需显式设置,否则通过校验的Chart仍会上传失败。appid不决定入口主机:平台会根据应用名称生成入口主机,因此请从appid的settings apps list列读取实际值,而非自行计算。URL - 集群上传要求至少与一个当前节点的架构匹配。查询
spec.supportArch;确保引用的镜像支持相同的目标架构。若上传提示olares-cli cluster node list,请修复后重新打包重试。若提示architecture_incompatible,请保持包/版本不变,等待节点发现恢复。cluster_arch_unavailable - 声明的/
.Values.userspace.appData/appCache挂载必须包含匹配的userData字段,否则应用数据交叉检查会失败。permission - 卷与滚动更新不兼容——请将主机挂载替换为上述用户空间卷。
hostPath - 入口代理会将每个请求的超时时间限制为秒(默认15秒)——长LLM流/大文件上传/慢报告即使Pod健康也会被入口截断(504/连接关闭)。设置
options.apiTimeout禁用超时,或设置一个较大的有限值;负值并非“无限制”(会回退到15秒)。请查看清单优化部分。options.apiTimeout: 0