在过去的几周里,我不得不重新安装我的整个工作环境几次,这可能需要一段时间,所以现在我有一个雄心勃勃的想法,利用流浪汉和图书管理员厨师来创建我的工作环境,所以我所要做的就是运行一个bash脚本和中提琴我在。
所以我第一次这样做是独自流浪,我进去做了所有的事情,把它包装好,这只是一段时间的伟大。包装是600兆,所以下一个想法是让厨师做这一切但是我以前从来没有和厨师一起工作过,所以我发现基本上我都是这样做的

site 'http://community.opscode.com/api/v1'

cookbook 'apt'
cookbook 'git'
cookbook 'build-essential'
cookbook 'ruby_build',
  git: 'git://github.com/fnichol/chef-ruby_build'
cookbook 'rbenv',
  git: 'git://github.com/fnichol/chef-rbenv'
cookbook 'sqlite',
  git: 'git://github.com/opscode-cookbooks/sqlite.git'
cookbook 'nodejs',
  git: 'http://github.com/mdxp/nodejs-cookbook'
cookbook 'mysql',
  git: 'git://github.com/opscode-cookbooks/mysql.git'
cookbook 'redis',
  git: 'git://github.com/brianbianco/redisio.git'
cookbook 'zlib',
  git: 'git://github.com/opscode-cookbooks/zlib'
cookbook 'wkhtmltopdf',
  git: 'git://github.com/firstbanco/chef-wkhtmltopdf.git'

当你打电话给librarian-chef init
在流浪者档案里
config.vm.provision :chef_solo do |chef|
  chef.cookbooks_path = ["cookbooks","site-cookbooks"]
  chef.add_recipe "apt"
  chef.add_recipe "build-essential"
  chef.add_recipe "git"
  chef.add_recipe "ruby_build"
  chef.add_recipe "rbenv::install"
  chef.add_recipe "sqlite"
  chef.add_recipe "nodejs"
  chef.add_recipe "mysql"
  chef.add_recipe "redis"
  chef.add_recipe "zlib"
  chef.add_recipe "wkhtmltopdf"
end

现在我想知道是否可以让vagrent up安装1.9.3-p290,我发现这个librarian-chef似乎有答案,但我得到了以下信息
Running chef-solo...
stdin: is not a tty
[2013-05-23T14:31:18+00:00] INFO: *** Chef 10.14.2 ***
[2013-05-23T14:31:18+00:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[build-essential]", "recipe[git]", "recipe[ruby_build]", "recipe[rbenv::install]", "recipe[sqlite]", "recipe[nodejs]", "recipe[mysql]", "recipe[redis]", "recipe[zlib]", "recipe[wkhtmltopdf]"] from JSON
[2013-05-23T14:31:18+00:00] INFO: Run List is [recipe[apt], recipe[build-essential], recipe[git], recipe[ruby_build], recipe[rbenv::install], recipe[sqlite], recipe[nodejs], recipe[mysql], recipe[redis], recipe[zlib], recipe[wkhtmltopdf]]
[2013-05-23T14:31:18+00:00] INFO: Run List expands to [apt, build-essential, git, ruby_build, rbenv::install, sqlite, nodejs, mysql, redis, zlib, wkhtmltopdf]
[2013-05-23T14:31:18+00:00] INFO: Starting Chef Run for precise64
[2013-05-23T14:31:18+00:00] INFO: Running start handlers
[2013-05-23T14:31:18+00:00] INFO: Start handlers complete.

================================================================================
Recipe Compile Error
================================================================================

Chef::Exceptions::RecipeNotFound
--------------------------------
could not find recipe ruby_build for cookbook rbenv

[2013-05-23T14:31:19+00:00] ERROR: Running exception handlers
[2013-05-23T14:31:19+00:00] ERROR: Exception handlers complete
[2013-05-23T14:31:19+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-05-23T14:31:19+00:00] FATAL: Chef::Exceptions::RecipeNotFound: could not find recipe ruby_build for cookbook rbenv
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

如何通过ruby build安装ruby呢这是可能的还是不可能的

最佳答案

图书管理员将在本地安装您的烹饪书,但它们不会转移到远程流浪箱。您需要使用Vagrant Librarian Chef plugin
另见:
Berkshelf
Vagrant Berkshelf

10-08 02:01