Skip to content

feat(fnos): add FnOS NAS app packaging (Docker + native .fpk) - #407

Merged
jubaoliang merged 5 commits into
TencentCloud:developfrom
veenyi:upstream-fnos-packaging
Aug 25, 2026
Merged

feat(fnos): add FnOS NAS app packaging (Docker + native .fpk)#407
jubaoliang merged 5 commits into
TencentCloud:developfrom
veenyi:upstream-fnos-packaging

Conversation

@veenyi

@veenyi veenyi commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

概要

FnOS(飞牛 NAS)应用中心增加打包支持,Octop 可以 Docker 容器应用和原生(非 Docker)应用两种方式安装。两种 .fpk 包共享 pyproject.toml 的版本号。

包含内容

  • fnos/ — Docker 部署版 FPK 树:薄壳包装,通过 docker-compose 在 NAS 上运行 Octop 容器镜像(镜像名 ghcr.io/TencentCloud/octop:latest 为占位,维护者可发布到自己的命名空间)。
  • fnos-native/ — 原生版 FPK 树:使用飞牛系统 Python 3.12 直接运行,无需 Docker。
  • scripts/build-fpk.sh — 通用 FPK 构建脚本,使用官方 fnpack CLI(把 pyproject.toml 版本注入 manifest)。
  • .github/workflows/fnos-build-fpk.yml — 完整打包流水线模板:构建 Docker 镜像、Docker .fpk、原生 .fpk,并发布 GitHub release(固定版本 + 滚动 latest)。仅 workflow_dispatch 手动触发,不会在上游仓库自动运行;fork 维护者替换镜像命名空间后可按需启用 push 触发。

首次使用体验

初始管理员凭据为 admin / Octop123(与官方 Docker 镜像默认一致,满足 octop init 的密码策略)。manifest 安装文案和 fnos/README.md 明确写出凭据并提示首次登录后修改密码——用户无需翻数据目录找密码。

说明

veenyi added 5 commits August 25, 2026 11:32
…talls

Adds the packaging tree to build Octop as a FnOS app center package (.fpk):

- fnos/: Docker-deployable FPK (thin wrapper that runs the Octop image
  via docker-compose on the NAS)
- fnos-native/: native FPK that runs Octop directly on the FnOS host with
  the system Python 3.12 runtime (no Docker required)
- scripts/build-fpk.sh: generic FPK build helper using the official fnpack
  CLI (injects the version from pyproject.toml into the manifest)

Both packages share the same app version as pyproject.toml. Container image
name is referenced as ghcr.io/TencentCloud/octop:latest — maintainers can
republish under their own namespace; the per-repo CI (image build + release
workflow) is intentionally left out of this PR.
…3 with docs

- The previous default password 'octop' does not satisfy the password
  policy (>=8 chars incl. letters and digits) enforced by 'octop init',
  so the bootstrap admin could not be created
- Switch the default to Octop123, identical to the official Docker image
- Manifest install text now prints the initial account/password and tells
  users to change it after first login
- fnos/README.md gains a 'First use' section (credentials table + change
  password guidance) so users never need to dig into data directories
Provides a complete CI template that builds the Octop Docker image,
the Docker .fpk and the native .fpk, then publishes GitHub releases
(fixed version + rolling latest):

- Trigger: workflow_dispatch only, so it never auto-runs on upstream
- Image namespace referenced as ghcr.io/TencentCloud/octop (placeholder;
  fork maintainers replace with their own)
- Iteration numbering, changelog generation (install-first, no-merges,
  capped at 30 entries) and rolling release management included
… tighten process kill

Addresses review feedback:

- Extract find_python312 / fix_ownership_and_perms / free_octop_ports into a
  single shared library scripts/fnos/common.sh (injected into both packages'
  cmd/common.sh by build-fpk.sh at package time) instead of duplicating them
  across 7 docker/native lifecycle scripts
- Tighten the leftover-process cleanup: only kill processes under this
  install dir (TRIM_APPDEST), no more broad 'pgrep -f octop' that could kill
  other users' / other installs' processes
- Root README: add an 'FnOS Installation' section pointing to fnos/README.md
  and noting the initial credentials + the TencentCloud#406 dependency for non-root CLI
  installs
@veenyi
veenyi changed the base branch from main to develop August 25, 2026 06:18
@jubaoliang
jubaoliang merged commit d9cb476 into TencentCloud:develop Aug 25, 2026
jubaoliang added a commit that referenced this pull request Aug 25, 2026
#421)

* fix(tests): align subagent catalog division count with bundled library

The bundled subagent catalog now loads 19 divisions (272 agents), but two
tests still hard-coded an expected count of 16. Update the assertions so the
pre-commit suite is green.

* refactor(fnos): split fnos packaging into docker/ and native/ variants

Restructure the FnOS package layout so the Docker build and the native
installer live under separate directories (fnos/docker and fnos/native)
instead of a single fnos/ tree plus a parallel fnos-native/. Update the
FPK build workflow, build-fpk.sh and fnos/common.sh to source from the
new paths, and refresh fnos/README.md accordingly.

Follow-up to PR #407.

---------

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
@veenyi

veenyi commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

说明:为方便中文团队沟通,本 PR 描述已更新为中文。后续讨论请直接使用中文。

@veenyi

veenyi commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

镜像名已修正(修复 buildx 大写 tag 报错)

收到反馈:ghcr.io/TencentCloud/octop 不是官方镜像(抱歉,之前是错误占位)。已修正:

  1. workflow 镜像 tag 改用动态小写ghcr.io/${{ lower(github.repository_owner) }}/octop——任何 fork 都会生成合法 tag(repository name must be lowercase 的 buildx 报错已消除)。
  2. compose / Dockerfile / manifest / README 的镜像占位改为 ghcr.io/jubaolaing/octop(对齐官方实际使用的镜像命名空间);如维护者发布到其他命名空间,替换这几处即可。

提交:15f3d708(fix(fnos): Docker 镜像 tag 转小写)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants