在厨师仓库中管理自定义菜谱 [英] Managing custom cookbooks in a chef repo

查看:49
本文介绍了在厨师仓库中管理自定义菜谱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道Chef用户如何组织与主Chef库相关的自定义菜谱。我基于空白的 Chef Repo 启动了一个存储库,然后将自定义食谱安装到Chef Repo中(也就是说,食谱代码是在厨师仓库代码库中管理的。不过,这变得有点难以管理-尤其是当我们想处理不同版本的菜谱时,我想知道创建独立的菜谱项目然后与Berkshelf一起制作菜谱是否更有意义-最佳建议做法以及您如何做?

I was wondering how Chef users organize custom cookbooks with relation to the main Chef repository. I started a repository based on a blank Chef Repo, and then installed custom cookbooks into the chef repo (i.e. the cookbook code is managed in the chef repo codebase). It's becoming a bit unmanageable though - especially when we want to work on different versions of a cookbook, and I'm wondering if it makes more sense to create independent cookbook projects and then pull in the cookbooks with Berkshelf - what's recommended in terms of best practises and how are you doing it?

推荐答案

在GIT中保存食谱主存储库无法很好地扩展。我将食谱保存在Chef服务器实例中,作为Cookbook存储库(我不将VM连接到该Chef服务器)。它旨在实现与 Nexus (或 artifactory ),一个存放我的开发依赖项的地方。

Keeping cookbooks in a GIT chef repository doesn't scale well. I keep my cookbooks in an instance of Chef server, acting as a cookbook repository (I don't connect VMs to this chef server). It is designed to fulfil the same purpose as Nexus (or artifactory) in Java development, a place to hold my development dependencies.

加载新的厨师服务器时,我使用Berkshelf下载了食谱的依赖项,并使用 chef_api指令引用了该厨师服务器:

When loading a new chef server I download my cookbook's dependencies using Berkshelf, referencing this chef server using an "chef_api" directive:

  • Provision developer environment with chef server and vagrant without registering node

这一切都将随着Berkshelf 3.0(刚刚发布)而改变。我想查看 berkshelf-api ,希望以此简化我的工作流程。据报道,Berkshelf-api可以提供以下方面的食谱:

This will all change with Berkshelf 3.0 (Just released). I want to check out berkshelf-api which I'm hoping will simplify my work-flow. Reportedly Berkshelf-api can serve up cookbooks from:


  • 社区食谱网站

  • 厨师实例服务器(像我一样)

  • 存储在文件系统上的食谱(这可能更适合您)

希望这会有所帮助。

这篇关于在厨师仓库中管理自定义菜谱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆