温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Chef社区 cookbook 哪找

发布时间:2026-10-03 09:01:43 来源:亿速云 阅读:85 作者:小樊 栏目:系统运维

你说的 Chef 社区 cookbook 一般是指 Chef Supermarket(官方社区 cookbook 仓库)。下面给你几种常见找法:


1. 官方社区仓库(最推荐)

Chef Supermarket

  • 网址:https://supermarket.chef.io
  • 功能:
    • 搜索社区维护的 cookbook
    • 查看下载量、版本、依赖、README
    • 直接 knife supermarket install <cookbook> 或 berks install

示例:

knife supermarket search nginx
knife supermarket install nginx

2. 使用命令行工具

如果你已安装 Chef Workstation:

# 搜索
knife supermarket search <关键字>

# 查看详情
knife supermarket show <cookbook名>

# 安装到本地
knife supermarket install <cookbook名>

或使用 Berkshelf:

berks install <cookbook名>

3. GitHub 上的社区 Cookbook

很多 cookbook 源码也在 GitHub:

  • https://github.com/sous-chefs (社区维护组织,非常活跃)
  • https://github.com/chef-cookbooks (历史官方仓库)

例如:

  • nginx: https://github.com/sous-chefs/nginx
  • apache2: https://github.com/sous-chefs/apache2

4. 在代码中引用

Berksfile

source 'https://supermarket.chef.io'

cookbook 'nginx'

metadata.rb

depends 'nginx'

小提示

  • 优先用 Supermarket + sous-chefs
  • 注意 cookbook 是否还在维护(最后更新时间)
  • 生产环境建议锁定版本

如果你是想找 某个具体软件(如 MySQL / Docker / K8s)的 cookbook,可以告诉我,我直接帮你列。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI
助
手