问题标签 [berkshelf]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2842 浏览

chef-infra - 我怎样才能让厨师重新启动节点,并从它停止的地方拿起食谱?

我正在尝试使用 Berkshelf 和 Vagrant 与厨师一起设置星号服务器,我首先想通过运行来升级内核

apt-get 升级

,并重新启动我的机器。

如何在配方中触发重新启动,并在机器重新启动后启动它?我使用 Fabric 对此没有任何问题,但是

执行“重启”

Vagrant 中的 Chef 供应商在机器重启时死亡

0 投票
1 回答
831 浏览

chef-infra - 厨师食谱依赖 - berkshelf

我使用 chef-server 来管理我的服务器,我不想让半官方的 logstash 食谱正常工作,但我遇到了配方依赖问题。

我将所有的食谱和我克隆的 logstash 放在一个 chef-config repo 中。

我需要安装 logstash 依赖的食谱,这可以用 berkshelf 完成,但是 berks install 将它们放在 ~/.berkshelf/cookbooks/apache2 中,这似乎有点毫无意义,因为我需要它们在我的食谱文件夹中以允许我将它们上传到厨师服务器。

我确实尝试过:

但这有两个问题,首先我覆盖了其他同名的食谱(mysql),我所有的食谱都被删除了。

人们如何处理这个问题?

0 投票
1 回答
325 浏览

provisioning - Veewee, Vagrant and Berkshelf integration

I'm trying to learn how to set up a virtual development environment using VirtualBox, Veewee, Vagrant and Chef-solo with Berkshelf.

Since I'm very new to this, I've read all I could find online, but I think I'm missing something crucial. Hopefully somebody here can help me understand.

The part I'm having problems with is provisioning the Veewee-generated Vagrant box using Chef-solo and Berkshelf.

From my point of view, the main advantage of using Vagrant and virtual environments is that they're reproducible and portable, so I do not understand why I have to install the Berkshelf gem and download recipes on my local host machine.

Why isn't all this done on the guest?

If I give my customized Vagrantfile to someone else, vagrant up will not work on their machine because the Vagrantfile references local recipes the other person will not have by default. Installing Berkshelf and recipes on their machine as well kinda defeats the purpose and so does referencing recipes available on the web somewhere.

Isn't it a better idea to just install the Berkshelf gem on the guest, download recipes locally there and tell Vagrant to use the recipes on the guest? I couldn't find any reference in the new Vagrant documentation on how to do this, but in the old version specifying cookbook folders within the virtual machine was an available option.

So basically what I'd like to know is:

  1. Is my reasoning a valid option or am I missing either a useful tool or the general picture?

  2. If my reasoning is valid, could you please point me in the right direction of how to do this? I was thinking of finding out how to customize the Veewee templates for building the Vagrant base box, using a post installation script to add Berkshelf and download recipes, but perhaps it's either overkill or the wrong way to go about this?

Thanks in advance!

0 投票
2 回答
3529 浏览

chef-infra - 配置流浪盒后如何运行厨师食谱

我正在使用 Vagrant + Berkshelf + Chef Solo 来反映我的生产 AWS OpsWorks 盒子在我的开发机器上的行为。

我可以很好地安装 vagrant box,但是现在,在配置好之后,我希望能够运行与配置期间使用的食谱不同的 Chef 食谱。我想这样做是因为我试图模仿 OpsWorks 的行为:他们让我deploy只需按一下按钮即可运行配方。我希望能够在我的 vagrant box 中使用 vagrant 或 chef-solo 来运行相同的食谱。

solo.rb我想我可以通过在配置过程中添加一个配方来解决这个问题,该过程为我想要运行的不同按需配方构建不同的配置文件。这些配置文件将指向 Vagrant/Berkshelf cookbooks_path/tmp/vagrant-chef-1/对我而言),然后将运行列表设置为适当的配方。然后厨师独奏将使用这些配置文件。

我感觉以前有人以更优雅的方式解决了这个问题。有一个更好的方法吗?

如果没有,是否有人知道从 Vagrant 或配方中找到食谱路径的方法,这样我就不必硬编码/tmp/vagrant-chef-1/到我的solo.rb配置文件中?

0 投票
1 回答
953 浏览

chef-infra - 除了 Puppet 模块,是否有等效的 Berkshelf?

目前,Berkshelf 似乎仅限于管理厨师食谱。

只是想知道是否有任何与 Berkshelf 等效的东西,但对于 Puppet Modules ?

0 投票
2 回答
2835 浏览

chef-infra - 如何使用 Berkshelf 管理组织回购?

我是 Berkshelf 的忠实粉丝,我已经发布了几本使用它的社区食谱,而且它很棒。

现在,我正在开始一个新的厨师项目,我也继续与 Berkshelf 合作。

但是我发现在项目中使用它时会遇到一些困惑/困难。

以下是在 Berksfile 中:

我已经在site-cookbooks文件夹中生成了我的应用程序说明书。

当我这样做时berks install,它会出错:

现在我想知道在哪里生成我的应用程序sp-mediawiki说明书?

如果只是创建一个新的berks cookbook sp-mediawiki,它将类似于图书馆食谱。

librarian-chef使用我在另一个项目中使用的这种流程可以完美地完成。

所以,我想写一条线:

  1. Berkshelf 很适合开发个人食谱
  2. Librarian-chef 擅长管理顶层编排

我是对/错吗?你们是如何使用 Berkshelf 来管理 Org 的 chef-repo 的?

0 投票
1 回答
1176 浏览

vagrant - 运行“vagrant 插件安装”时,vagrant 插件命令不可用

我尝试从 apt repo 和 gem 安装 vagrant,但这是我尝试运行时得到的输出vagrant plugin install(输出中显然没有插件命令):

我尝试从 apt 和 Rubygems 安装 vagrant,在这两种情况下我都没有得到插件命令。我正在运行 Ubuntu 12.04 LTS。

0 投票
4 回答
24484 浏览

virtualbox - Vagrant:网络类型“桥接”无效。请使用有效的网络类型

谁能解释为什么我收到以下错误

“Vagrant:网络类型‘桥接’无效。请使用有效的网络类型。”

当我尝试使用以下 Vagrantfile 将 vagrant 带到 Virtual Box 时

我已经尝试了所有可能的桥接配置组合,但它根本不喜欢它。我找不到任何有关原因的其他信息。这里的任何帮助将不胜感激。

0 投票
2 回答
228 浏览

ruby - 包括 Vagrant 的 Apache 不会“升级”

所以基本上一切都运行良好,直到我添加:

depends "apache2", "~> 1.6.0"对我metadata.rb

include_recipe "apache2"recipes/default.rb

有时候是这样的:

有没有人遇到这个甚至更好地解决它?

我正在尝试遵循本教程

0 投票
2 回答
437 浏览

chef-infra - 如何将 Chef Solo 与 Application_python 一起使用

我开始学习 Chef、Berkshelf 和 Vagrant。我设法使用 Chef Server 部署了一个简单的应用程序,但是当我尝试使用 Chef Solo 时,我遇到了一些错误:

连接被拒绝 - 连接拒绝连接到 /search/node 的 localhost:4000,放弃或无法使用 client.pem

基本上它缺乏加密的数据包和搜索功能。有没有办法模拟这个功能?

我想使用 Chef Solo 进行测试,因为每当我将 Berkshelf 与 vagrant provision 一起使用时,它都会重新上传我所有的食谱,每次大约需要 1-2 分钟。