web-terminal-service:基于Web的终端服务组件项目

用户可通过Web浏览器访问命令行界面,管理容器内部、服务、应用程序或数据库。该项目作为openFuyao平台核心组件,提供可交互CLI界面,支持进入集群和容器的管理操作,简化Kubernetes集群操作维护。【此简介由AI生成】

分支16Tags3
文件最后提交记录最后更新时间
3 个月前
9 个月前
5 个月前
3 个月前
1 年前
1 年前
1 个月前
1 个月前
1 年前
1 年前
1 年前
1 年前
1 年前
7 个月前
7 个月前
22 天前
22 天前
3 个月前
3 个月前

Web Terminal Service

特性介绍

Web Terminal通常是广泛的云服务或者基于Web服务的一部分,用户能够通过Web浏览器访问命令行界面。这是一个虚拟终端,通常直接通过Web界面管理容器内部、服务、应用程序或者数据库,无需本地终端仿真软件或安全外壳(SSH)客户端。该特性通常用于管理集群中的资源对象,减少了对本地工具的依赖,简化了Kubernetes集群的操作和维护过程。

安装部署

在openFuyao平台上,Web Terminal为平台提供了可交互的CLI界面。该特性以核心组件方式随openFuyao平台一同部署,当前支持进入集群和容器的管理操作。

本地构建

镜像构建

构建参数

  • GOPRIVATE:配置Go语言私有仓库,相当于GOPRIVATE环境变量。
  • COMMIT:当前git commit的哈希值。
  • VERSION:组件版本。
  • SOURCE_DATE_EPOCH:镜像rootfs的时间戳。

构建命令

  • 构建并推送到指定OCI仓库。

    使用docker
    docker buildx build . -f <path/to/dockerfile> \
        -o type=image,name=<oci/repository>:<tag>,oci-mediatypes=true,rewrite-timestamp=true,push=true \
        --platform=linux/amd64,linux/arm64 \
        --provenance=false \
        --build-arg=GOPRIVATE=gopkg.openfuyao.cn \
        --build-arg=COMMIT=$(git rev-parse HEAD) \
        --build-arg=VERSION=0.0.0-latest \
        --build-arg=SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
    
    使用nerdctl
    nerdctl build . -f <path/to/dockerfile> \
        -o type=image,name=<oci/repository>:<tag>,oci-mediatypes=true,rewrite-timestamp=true,push=true \
        --platform=linux/amd64,linux/arm64 \
        --provenance=false \
        --build-arg=GOPRIVATE=gopkg.openfuyao.cn \
        --build-arg=COMMIT=$(git rev-parse HEAD) \
        --build-arg=VERSION=0.0.0-latest \
        --build-arg=SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
    

    其中,<path/to/dockerfile>为Dockerfile路径,<oci/repository>为镜像地址,<tag>为镜像tag。

  • 构建并导出OCI Layout到本地tarball。

    使用docker
    docker buildx build . -f <path/to/dockerfile> \
        -o type=oci,name=<oci/repository>:<tag>,dest=<path/to/oci-layout.tar>,rewrite-timestamp=true \
        --platform=linux/amd64,linux/arm64 \
        --provenance=false \
        --build-arg=GOPRIVATE=gopkg.openfuyao.cn \
        --build-arg=COMMIT=$(git rev-parse HEAD) \
        --build-arg=VERSION=0.0.0-latest \
        --build-arg=SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
    
    使用nerdctl
    nerdctl build . -f <path/to/dockerfile> \
        -o type=oci,name=<oci/repository>:<tag>,dest=<path/to/oci-layout.tar>,rewrite-timestamp=true \
        --platform=linux/amd64,linux/arm64 \
        --provenance=false \
        --build-arg=GOPRIVATE=gopkg.openfuyao.cn \
        --build-arg=COMMIT=$(git rev-parse HEAD) \
        --build-arg=VERSION=0.0.0-latest \
        --build-arg=SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
    

    其中,<path/to/dockerfile>为Dockerfile路径,<oci/repository>为镜像地址,<tag>为镜像tag,path/to/oci-layout.tar为tar包路径。

  • 构建并导出镜像rootfs到本地目录。

    使用docker
    docker buildx build . -f <path/to/dockerfile> \
        -o type=local,dest=<path/to/output>,platform-split=true \
        --platform=linux/amd64,linux/arm64 \
        --provenance=false \
        --build-arg=GOPRIVATE=gopkg.openfuyao.cn \
        --build-arg=COMMIT=$(git rev-parse HEAD) \
        --build-arg=VERSION=0.0.0-latest
    
    使用nerdctl
    nerdctl build . -f <path/to/dockerfile> \
        -o type=local,dest=<path/to/output>,platform-split=true \
        --platform=linux/amd64,linux/arm64 \
        --provenance=false \
        --build-arg=GOPRIVATE=gopkg.openfuyao.cn \
        --build-arg=COMMIT=$(git rev-parse HEAD) \
        --build-arg=VERSION=0.0.0-latest
    

    其中,<path/to/dockerfile>为Dockerfile路径,path/to/output为本地目录路径。

Helm Chart构建

  • 打包Helm Chart。

    helm package <path/to/chart> -u \
        --version=0.0.0-latest \
        --app-version=openFuyao-v25.09
    

    其中,<path/to/chart>为Chart文件夹路径。

  • 推送Chart包到指定OCI仓库。

    helm push <path/to/chart.tgz> oci://<oci/repository>:<tag>
    

    其中,<path/to/chart.tgz>为Chart包路径,<oci/repository>为Chart包推送地址,<tag>为Chart包tag。

安全能力说明

openFuyao v26.06 及往期版本仅提供基础安全功能:服务间双向认证(mTLS)与组件级用户认证鉴权(RBAC)的需使用者/集成伙伴根据自身部署环境自行适配与加固(如引入 cert-manager、做统一证书、部署鉴权中间件、配置 NetworkPolicy 收缩可达范围等)。当前聚焦基础功能交付,安全防护需用户自行加强,后续版本安全能力会逐步规划落地。

许可证

版权所有 © 2024。

根据 Apache 许可证 2.0 版(“许可证”)授权; 除非遵守许可证,否则您不得使用此文件。 您可以在以下网址获取许可证副本:

http://www.apache.org/licenses/LICENSE-2.0

除非适用法律要求或书面同意,根据许可证分发的软件是基于“按原样”基础分发的, 没有任何明示或暗示的担保或条件。 请参阅许可证以了解特定语言下的权限和限制。

项目介绍

用户可通过Web浏览器访问命令行界面,管理容器内部、服务、应用程序或数据库。该项目作为openFuyao平台核心组件,提供可交互CLI界面,支持进入集群和容器的管理操作,简化Kubernetes集群操作维护。【此简介由AI生成】

定制我的领域