2014年4月22日火曜日

Vagrantで楽々開発環境構築(失敗)

遅まきながらVagrantに挑戦してみた。
参考文献↓
VagrantでRails開発環境を整備 (CentOS 6.5/Nginx/mysql5.6/rbenv/ruby2.1.0) - 酒と泪とRubyとRailsと
http://morizyun.github.io/blog/vagrant-centos-nginx-mysql-rbenv/
Winodows環境で試したが、
bundle exec berks install --path site-cookbooks
を実行した際に以下のエラーが表示されたため、下記の対応を実施後、Berksfileを下記の通り修正した
エラーメッセージ↓
>bundle exec berks install --path site-cookbooks
Using mysql (4.1.2)
Using database (2.0.0)
Using nginx (2.4.4)
Using base (0.1.0) at './site-cookbooks/base'
Using mysql56 (0.1.0) at './site-cookbooks/mysql56'
Using ruby_build (0.8.0)
Failed to download 'rbenv' from github: 'fnichol/chef-rbenv' with branch: 'master' over protocol: 'git'
Cookbook 'rbenv' not found in any of the default locations
下記コマンド実行↓
>cd site-cookbooks
>git clone https://github.com/fnichol/chef-rbenv.git
>cd ..
Berksfile変更前↓
site :opscode
cookbook 'mysql'
cookbook 'database'
cookbook 'nginx', path: 'site-cookbooks/nginx'
cookbook 'base', path: 'site-cookbooks/base'
cookbook 'mysql56', path: 'site-cookbooks/mysql56'
cookbook 'ruby_build', github: 'fnichol/chef-ruby_build'
cookbook 'rbenv',  github: 'fnichol/chef-rbenv'
cookbook 'ruby_gem', path: 'site-cookbooks/ruby_gem'
Breksfile変更↓(rbenvをpathに変更)
site :opscode
cookbook 'mysql'
cookbook 'database'
cookbook 'nginx', path: 'site-cookbooks/nginx'
cookbook 'base', path: 'site-cookbooks/base'
cookbook 'mysql56', path: 'site-cookbooks/mysql56'
cookbook 'ruby_build', github: 'fnichol/chef-ruby_build'
cookbook 'rbenv',  path: 'site-cookbooks/chef-rbenv'
cookbook 'ruby_gem', path: 'site-cookbooks/ruby_gem'
と思ったら、なんだかエラーが出て失敗した。
今日はここまでにしておこう。。。
エラーメッセージ↓
[2014-04-22T13:20:41+00:00] DEBUG: Re-raising exception: Chef::Exceptions::CookbookNotFound - Cookbook base not found. If you're loading base from another cookbook, make sure you configure the dependency in your metadata
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/cookbook/cookbook_collection.rb:38:in `block in initialize'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.2/lib/ohai/mash.rb:77:in`yield'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.2/lib/ohai/mash.rb:77:in`default'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.2/lib/ohai/mash.rb:77:in`default'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:277:in `[]'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:277:in `each_cookbook_dep'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:255:in `add_cookbook_with_deps'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:88:in `block in cookbook_order'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:86:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:86:in `cookbook_order'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:98:in `compile_libraries'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:71:in `compile'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context.rb:88:in `load'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/policy_builder/expand_node_object.rb:73:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:265:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:429:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:213:in `block in run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:207:in `fork'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:207:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application.rb:217:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application/solo.rb:221:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application/solo.rb:213:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application/solo.rb:213:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application.rb:67:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:23:in `load'
/usr/bin/chef-solo:23:in `<main>'
[2014-04-22T13:20:41+00:00] ERROR: Running exception handlers
[2014-04-22T13:20:41+00:00] ERROR: Exception handlers complete
[2014-04-22T13:20:41+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-04-22T13:20:41+00:00] DEBUG: Chef::Exceptions::CookbookNotFound: Cookbookbase not found. If you're loading base from another cookbook, make sure you configure the dependency in your metadata
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/cookbook/cookbook_collection.rb:38:in `block in initialize'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.2/lib/ohai/mash.rb:77:in `yield'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.2/lib/ohai/mash.rb:77:in `default'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-7.0.2/lib/ohai/mash.rb:77:in `default'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:277:in `[]'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:277:in `each_cookbook_dep'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:255:in `add_cookbook_with_deps'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:88:in `block in cookbook_order'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:86:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:86:in `cookbook_order'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:98:in `compile_libraries'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context/cookbook_compiler.rb:71:in `compile'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/run_context.rb:88:in `load'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/policy_builder/expand_node_object.rb:73:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:265:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:429:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:213:in `block in run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:207:in `fork'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/client.rb:207:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application.rb:217:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application/solo.rb:221:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application/solo.rb:213:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application/solo.rb:213:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/lib/chef/application.rb:67:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.2/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:23:in `load'
/usr/bin/chef-solo:23:in `<main>'
[2014-04-22T13:20:41+00:00] ERROR: Cookbook base not found. If you're loading base from another cookbook, make sure you configure the dependency in your metadata
[2014-04-22T13:20:41+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.

0 件のコメント :

コメントを投稿