流浪的伯克谢尔夫-货架路? [英] Vagrant Berkshelf - Shelf Path?

查看:85
本文介绍了流浪的伯克谢尔夫-货架路?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以设置berkshelf插件放置其安装的菜谱的路径? (如.berkshelf文件夹中的)

Is it possible to set the path where the berkshelf plugin puts the cookbooks it installs? (As in the .berkshelf folder)

我正在运行Windows 7.

I am running Windows 7.

我目前正在尝试使用opscode食谱将mysql服务器安装到vm,在这里工作时,他们将%HOMEDRIVE%系统变量设置为网络驱动器.因此,当.berkshelf从Vagrantfile的开头开始时,它将菜谱推送到网络驱动器上,并导致它变慢并且运行良好,而不是它应该位于的位置.有解决办法吗?

I am currently trying to install a mysql server using an opscode cookbook to a vm and here at work they have the %HOMEDRIVE% system variable set to a network drive. So when .berkshelf starts at the beginning of the Vagrantfile, it pushes the cookbooks to the network drive and it causes it to be slow and well, its not where it should be. Is there a fix to this?

VirtualBox也可以做到这一点,但是我通过更改设置对其进行了修复.我尝试为berkshelf寻找某种等效设置,但最接近的是标准berkshelf(不是流浪汉插件),看来您可以设置以下环境变量:

VirtualBox did this as well, but I fixed it by altering the settings. I tried looking for some sort of equivalent settings for berkshelf, but the closest I got was for the standard berkshelf (thats not a vagrant plugin), it appears you can set this environment variable:

ENV ['BERKSHELF_PATH']

在这里找到:

http://www.rubydoc.info/github/RiotGames/berkshelf/Berkshelf#berkshelf_path-class_method

我需要能够将其从berksfile存储中读取的菜谱保存到笔记本电脑的本地驱动器中,因为在我的方案中,由于文件存储在网络中,因此我无法将VM的移动性仅限于建筑物

I need to be able to have the cookbooks it reads from the berksfile store to my laptops local drive instead, as in my scenario I cannot have the mobility of the VM limited to the building because of files that are stored on the network.

任何煽动将不胜感激.

在流浪汉插件上使用实际的berkshelf更好吗?

Perhaps its better to use the actual berkshelf over the vagrant plugin?

谢谢.

推荐答案

如果您希望具有可移植性-运行完整的Chef-repo来准备chef-solo,最好使用独立的berkshelf而不是vagrant-berkshelf插件-这不是那么灵活.

If you want to have the portability - a full chef-repo ready for chef-solo runs, better off using standalone berkshelf instead of the vagrant-berkshelf plugin - which is NOT that flexibly.

对于复杂的食谱,我更喜欢使用独立的berkshelf,因为它允许我执行berks install --path chef/cookbooks来复制~/.berkshelf/cookbooks所需的所有食谱,然后我可以将全部内容焦油并转移到同一运行.有些人使用capistrano通过网络自动执行tar和scp/rsync.我只是使用rysnc/scp;-)

For complex cookbooks, I prefer to use standalone berkshelf as it allows me to do berks install --path chef/cookbooks to copy all cookbooks required from ~/.berkshelf/cookbooks, then I can just tar the whole thing and transfer to other machines for the same chef-solo run. some people use capistrano automate the tar and scp/rsync over the network. I just use rysnc/scp;-)

HTH

这篇关于流浪的伯克谢尔夫-货架路?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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