Token导航 LogoToken导航TokenDH.com
运维需要联网clawhub未标认证来源可访问clear审计通过

ostreeostree 运维

Agent Skill

ostree 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 OpenClaw 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,333

周安装

177

GitHub Stars

公开资料未说明

下载量

1,402
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ostree(ostree 运维)
来源仓库:https://github.com/weidongkl/ostree
安装命令:
openclaw skills install ostree
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install ostree

简介

通过存储库、提交、部署、分支、远程同步和 RPM-OSTree 集成来管理 OSTree 原子系统更新,以实现不可变的系统基础架构。

SKILL.md

OSTree Skill - 原子化系统更新

技能描述 | Skill Description

名称 | Name: ostree 版本 | Version: 1.0.0 作者 | Author: OS Build Agent 领域 | Domain: Atomic System Updates (Fedora/RHEL CoreOS)

专业的 OSTree 原子化系统更新管理技能,支持不可变基础设施、原子更新、版本回滚等现代系统管理功能。

Professional OSTree atomic system update management skill supporting immutable infrastructure, atomic updates, version rollback, and modern system management features.


功能列表 | Features

1. 仓库管理 | Repository Management

  • 创建 OSTree 仓库 | Create OSTree repos
  • 初始化系统仓库 | Initialize system repos
  • 仓库配置 | Repository configuration
  • 远程仓库 | Remote repositories

2. 提交管理 | Commit Management

  • 创建提交 | Create commits
  • 查看提交历史 | View commit history
  • 提交签名 | Commit signing
  • 提交验证 | Commit verification

3. 部署管理 | Deployment Management

  • 系统部署 | System deployment
  • 版本切换 | Version switching
  • 回滚操作 | Rollback operations
  • 部署清理 | Deployment cleanup

4. 分支管理 | Branch Management

  • 创建分支 | Create branches
  • 列出分支 | List branches
  • 删除分支 | Delete branches
  • 分支合并 | Branch merging

5. 远程同步 | Remote Synchronization

  • 添加远程 | Add remotes
  • 拉取更新 | Pull updates
  • 推送提交 | Push commits
  • 镜像同步 | Mirror sync

6. 系统管理 | System Management

  • 状态查询 | Status query
  • 配置管理 | Configuration management
  • 解锁系统 | Unlock system
  • 叠加层管理 | Overlay management

配置 | Configuration

工具安装 | Tool Installation

# RHEL/Fedora
dnf install ostree rpm-ostree

# openSUSE
zypper install ostree

# Debian/Ubuntu
apt-get install ostree

仓库类型 | Repository Types

# 系统仓库 (bare-user)
# System repo (bare-user)
ostree --repo=/ostree/repo init --mode=bare-user

# 归档仓库 (archive-z2)
# Archive repo (archive-z2)
ostree --repo=/path/to/repo init --mode=archive-z2

#  bare 仓库
# Bare repo
ostree --repo=/path/to/repo init --mode=bare

使用示例 | Usage Examples

仓库初始化 | Repository Initialization

# 初始化系统仓库
# Initialize system repository
ostree --repo=/ostree/repo init --mode=bare-user

# 初始化归档仓库
# Initialize archive repository
ostree --repo=/var/www/html/repo init --mode=archive-z2

# 配置仓库
# Configure repository
cat > /ostree/repo/config << EOF
[core]
repo_version=1
mode=bare-user

[remote "fedora"]
url=https://ostree.fedoraproject.org
gpg-verify=true
EOF

提交管理 | Commit Management

# 创建提交
# Create commit
ostree commit \
  --repo=/path/to/repo \
  --branch=fedora/x86_64/server \
  --subject="Initial commit" \
  --tree=dir=/path/to/rootfs

# 从目录树创建提交
# Create commit from directory tree
ostree commit \
  --repo=/path/to/repo \
  --branch=main \
  --subject="Update packages" \
  --tree=dir=/var/www/html/rootfs

# 查看提交历史
# View commit history
ostree log --repo=/ostree/repo fedora/x86_64/server

# 显示提交详情
# Show commit details
ostree show --repo=/ostree/repo fedora/x86_64/server

# 删除提交
# Delete commit
ostree prune --repo=/path/to/repo --ref=main

签名和验证 | Signing and Verification

# 导入 GPG 密钥
# Import GPG key
ostree remote gpg-import \
  --repo=/ostree/repo \
  fedora \
  --stdin < /path/to/gpg-key

# 签名提交
# Sign commit
ostree sign \
  --repo=/path/to/repo \
  --gpg-key=KEYID \
  fedora/x86_64/server

# 验证提交
# Verify commit
ostree verify \
  --repo=/ostree/repo \
  fedora/x86_64/server

# 添加远程仓库(带签名验证)
# Add remote with signature verification
ostree remote add \
  --repo=/ostree/repo \
  fedora \
  https://ostree.fedoraproject.org/repo \
  --gpg-verify

部署管理 | Deployment Management

# 查看部署状态
# View deployment status
ostree admin status

# 部署新版本
# Deploy new version
ostree admin deploy --os=fedora fedora/x86_64/server

# 切换部署
# Switch deployment
ostree admin switch --os=fedora fedora/x86_64/server

# 回滚到上一版本
# Rollback to previous version
ostree admin rollback

# 清理旧部署
# Cleanup old deployments
ostree admin undeploy 1

# 设置下次启动版本
# Set next boot version
ostree admin set-origin --os=fedora fedora

# 查看部署历史
# View deployment history
journalctl -b -1

远程仓库管理 | Remote Repository Management

# 添加远程仓库
# Add remote repository
ostree remote add \
  --repo=/ostree/repo \
  fedora \
  https://ostree.fedoraproject.org/repo

# 列出远程仓库
# List remote repositories
ostree remote list --repo=/ostree/repo

# 删除远程仓库
# Remove remote repository
ostree remote delete \
  --repo=/ostree/repo \
  fedora

# 拉取更新
# Pull updates
ostree pull \
  --repo=/ostree/repo \
  --remote=fedora \
  fedora/x86_64/server

# 拉取最新提交
# Pull latest commit
ostree pull \
  --repo=/ostree/repo \
  --remote=fedora \
  --depth=1 \
  fedora/x86_64/server

# 推送提交
# Push commits
ostree push \
  --repo=/path/to/repo \
  --remote=origin \
  main

分支管理 | Branch Management

# 列出所有分支
# List all branches
ostree refs --repo=/path/to/repo

# 创建分支
# Create branch
ostree refs --repo=/path/to/repo \
  --create=feature/new-feature

# 删除分支
# Delete branch
ostree refs --repo=/path/to/repo \
  --delete=feature/old-feature

# 重命名分支
# Rename branch
ostree refs --repo=/path/to/repo \
  --rename=old/new

# 显示分支内容
# Show branch content
ostree ls --repo=/path/to/repo fedora/x86_64/server

RPM-OSTree 集成 | RPM-OSTree Integration

包管理 | Package Management

# 叠加安装包
# Layer packages
rpm-ostree install vim wget curl

# 卸载叠加包
# Remove layered packages
rpm-ostree uninstall vim

# 查看叠加包
# View layered packages
rpm-ostree status

# 替换包
# Replace packages
rpm-ostree override replace https://example.com/package.rpm

# 安装本地 RPM
# Install local RPM
rpm-ostree install ./package.rpm

系统更新 | System Updates

# 检查更新
# Check for updates
rpm-ostree upgrade --check

# 执行更新
# Perform update
rpm-ostree upgrade

# 回滚更新
# Rollback update
rpm-ostree rollback

# 重新部署当前版本
# Redeploy current version
rpm-ostree rebase :current

# 切换到不同分支
# Switch to different branch
rpm-ostree rebase fedora/x86_64/silverblue

自定义镜像 | Custom Image

# 从 Kickstart 创建
# Create from Kickstart
rpm-ostree compose tree \
  --repo=/path/to/repo \
  --ref=fedora/x86_64/custom \
  --compose=/path/to/compose.json \
  /path/to/manifest.json

# 容器构建
# Container build
rpm-ostree compose container \
  --repo=/path/to/repo \
  --ref=fedora/x86_64/custom \
  fedora-custom:latest

# 导出为 ISO
# Export to ISO
rpm-ostree compose image \
  --repo=/path/to/repo \
  fedora/x86_64/custom \
  ./output.iso

高级用法 | Advanced Usage

自定义 OSTree 仓库 | Custom OSTree Repository

# 创建自定义仓库配置
# Create custom repo config
cat > /etc/ostree/remotes.d/custom.conf << EOF
[remote "custom"]
url=https://ostree.example.com/repo
gpg-verify=true
gpg-keypath=/etc/pki/ostree/gpg-keys
EOF

# 创建分支策略
# Create branch policy
cat > /etc/ostree/branches.conf << EOF
[branch "fedora/x86_64/*"]
collection-id=org.fedoraproject
EOF

自动化部署 | Automated Deployment

# 自动化部署脚本
# Automated deployment script
cat > /usr/local/bin/ostree-deploy.sh << 'EOF'
#!/bin/bash
set -e

# 拉取最新提交
# Pull latest commit
ostree pull --repo=/ostree/repo --remote=fedora fedora/x86_64/server

# 部署
# Deploy
ostree admin deploy --os=fedora fedora/x86_64/server

# 清理
# Cleanup
ostree admin undeploy 1
ostree prune --repo=/ostree/repo

echo "Deployment complete"
EOF

chmod +x /usr/local/bin/ostree-deploy.sh

监控和日志 | Monitoring and Logging

# 查看 OSTree 日志
# View OSTree logs
journalctl -u ostree-remount
journalctl -u rpm-ostreed

# 监控系统状态
# Monitor system status
watch -n 5 'ostree admin status'

# 检查仓库健康
# Check repo health
ostree fsck --repo=/ostree/repo

命令参考 | Command Reference

OSTree 核心命令 | Core Commands

命令Command描述Description
ostree initinitialize初始化仓库Initialize repo
ostree commitcommit创建提交Create commit
ostree loglog查看日志View log
ostree showshow显示提交Show commit
ostree refsrefs管理分支Manage branches
ostree remoteremote远程管理Remote management
ostree pullpull拉取提交Pull commits
ostree pushpush推送提交Push commits
ostree verifyverify验证提交Verify commit

OSTree Admin 命令 | Admin Commands

命令Command描述Description
ostree admin statusstatus部署状态Deployment status
ostree admin deploydeploy部署系统Deploy system
ostree admin rollbackrollback回滚Rollback
ostree admin switchswitch切换版本Switch version
ostree admin undeployundeploy删除部署Remove deployment

RPM-OSTree 命令 | RPM-OSTree Commands

命令Command描述Description
rpm-ostree statusstatus系统状态System status
rpm-ostree upgradeupgrade系统升级System upgrade
rpm-ostree rollbackrollback回滚Rollback
rpm-ostree installinstall安装包Install package
rpm-ostree uninstalluninstall卸载包Uninstall package
rpm-ostree rebaserebase切换分支Switch branch

最佳实践 | Best Practices

1. 仓库管理 | Repository Management

  • 定期清理旧提交 | Prune old commits regularly
  • 使用 GPG 签名 | Use GPG signing
  • 配置多个远程 | Configure multiple remotes

2. 部署策略 | Deployment Strategy

  • 测试后再部署 | Test before deploying
  • 保留回滚版本 | Keep rollback versions
  • 监控部署状态 | Monitor deployment status

3. 安全性 | Security

  • 验证所有提交 | Verify all commits
  • 使用 HTTPS 远程 | Use HTTPS remotes
  • 定期更新密钥 | Rotate keys regularly

故障排除 | Troubleshooting

部署失败 | Deployment Failed

# 查看详细状态
# View detailed status
ostree admin status --verbose

# 检查仓库完整性
# Check repo integrity
ostree fsck --repo=/ostree/repo

# 清理并重新部署
# Clean and redeploy
rpm-ostree cleanup -b
rpm-ostree upgrade

签名验证失败 | Signature Verification Failed

# 重新导入密钥
# Re-import keys
ostree remote gpg-import --repo=/ostree/repo fedora

# 检查密钥
# Check keys
ostree remote gpg-list-keys --repo=/ostree/repo fedora

参考资料 | References


许可证 | License

MIT License


更新日志 | Changelog

v1.0.0 (2026-03-23)

  • 初始版本,完整的 OSTree 支持
  • Initial release with full OSTree support
  • 中英文双语文档
  • Bilingual documentation (Chinese/English)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

86.19%
按下载量换算1,208

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills