インストールでエラーが出ていたけど、 Command Line Developer Toolsのインストールで無事エラー解消
$ sudo gem install chef
Building native extensions. This could take a while…
Successfully installed ffi-1.9.8
Fetching: libyajl2-1.2.0.gem (100%)
Building native extensions. This could take a while…
Successfully installed libyajl2-1.2.0
Fetching: ffi-yajl-1.4.0.gem (100%)
Building native extensions. This could take a while…
Successfully installed ffi-yajl-1.4.0
Fetching: ipaddress-0.8.0.gem (100%)
Successfully installed ipaddress-0.8.0
Fetching: wmi-lite-1.0.0.gem (100%)
Successfully installed wmi-lite-1.0.0
Fetching: rake-10.4.2.gem (100%)
rake’s executable “rake” conflicts with /usr/bin/rake
Overwrite the executable? [yN] y ⇐y入力
Successfully installed rake-10.4.2
Fetching: ohai-8.2.0.gem (100%)
Successfully installed ohai-8.2.0
Fetching: net-ssh-2.9.2.gem (100%)
Successfully installed net-ssh-2.9.2
Fetching: net-ssh-gateway-1.2.0.gem (100%)
Successfully installed net-ssh-gateway-1.2.0
Fetching: net-ssh-multi-1.2.0.gem (100%)
Successfully installed net-ssh-multi-1.2.0
Fetching: highline-1.7.1.gem (100%)
Successfully installed highline-1.7.1
Fetching: erubis-2.7.0.gem (100%)
Successfully installed erubis-2.7.0
Fetching: diff-lcs-1.2.5.gem (100%)
Successfully installed diff-lcs-1.2.5
Fetching: hashie-2.1.2.gem (100%)
Successfully installed hashie-2.1.2
Fetching: uuidtools-2.1.5.gem (100%)
Successfully installed uuidtools-2.1.5
Fetching: rack-1.6.0.gem (100%)
Successfully installed rack-1.6.0
Fetching: chef-zero-4.1.0.gem (100%)
Successfully installed chef-zero-4.1.0
Fetching: coderay-1.1.0.gem (100%)
Successfully installed coderay-1.1.0
Fetching: slop-3.6.0.gem (100%)
Successfully installed slop-3.6.0
Fetching: method_source-0.8.2.gem (100%)
Successfully installed method_source-0.8.2
Fetching: pry-0.10.1.gem (100%)
Successfully installed pry-0.10.1
Fetching: plist-3.1.0.gem (100%)
Successfully installed plist-3.1.0
Fetching: rspec-support-3.2.2.gem (100%)
Successfully installed rspec-support-3.2.2
Fetching: rspec-core-3.2.2.gem (100%)
Successfully installed rspec-core-3.2.2
Fetching: rspec-expectations-3.2.0.gem (100%)
Successfully installed rspec-expectations-3.2.0
Fetching: rspec-mocks-3.2.1.gem (100%)
Successfully installed rspec-mocks-3.2.1
Fetching: rspec-3.2.0.gem (100%)
Successfully installed rspec-3.2.0
Fetching: builder-3.2.2.gem (100%)
Successfully installed builder-3.2.2
Fetching: rspec_junit_formatter-0.2.0.gem (100%)
Successfully installed rspec_junit_formatter-0.2.0
Fetching: rspec-its-1.2.0.gem (100%)
Successfully installed rspec-its-1.2.0
Fetching: multi_json-1.11.0.gem (100%)
Successfully installed multi_json-1.11.0
Fetching: net-scp-1.2.1.gem (100%)
Successfully installed net-scp-1.2.1
Fetching: specinfra-2.27.1.gem (100%)
Successfully installed specinfra-2.27.1
Fetching: serverspec-2.14.0.gem (100%)
Successfully installed serverspec-2.14.0
Fetching: chef-12.2.1.gem (100%)
Successfully installed chef-12.2.1
Parsing documentation for ffi-1.9.8
Installing ri documentation for ffi-1.9.8
Parsing documentation for libyajl2-1.2.0
unable to convert “\xCA” from ASCII-8BIT to UTF-8 for lib/libyajl2/vendored-libyajl2/lib/libyajl.bundle, skipping
Installing ri documentation for libyajl2-1.2.0
Parsing documentation for ffi-yajl-1.4.0
unable to convert “\x90” from ASCII-8BIT to UTF-8 for lib/ffi_yajl/benchmark/subjects/ohai.marshal_dump, skipping
unable to convert “\xCA” from ASCII-8BIT to UTF-8 for lib/ffi_yajl/ext/encoder.bundle, skipping
unable to convert “\xCA” from ASCII-8BIT to UTF-8 for lib/ffi_yajl/ext/parser.bundle, skipping
Installing ri documentation for ffi-yajl-1.4.0
Parsing documentation for ipaddress-0.8.0
Installing ri documentation for ipaddress-0.8.0
Parsing documentation for wmi-lite-1.0.0
Installing ri documentation for wmi-lite-1.0.0
Parsing documentation for rake-10.4.2
Installing ri documentation for rake-10.4.2
Parsing documentation for ohai-8.2.0
Installing ri documentation for ohai-8.2.0
Parsing documentation for net-ssh-2.9.2
Installing ri documentation for net-ssh-2.9.2
Parsing documentation for net-ssh-gateway-1.2.0
Installing ri documentation for net-ssh-gateway-1.2.0
Parsing documentation for net-ssh-multi-1.2.0
Installing ri documentation for net-ssh-multi-1.2.0
Parsing documentation for highline-1.7.1
Installing ri documentation for highline-1.7.1
Parsing documentation for erubis-2.7.0
Installing ri documentation for erubis-2.7.0
Parsing documentation for diff-lcs-1.2.5
Installing ri documentation for diff-lcs-1.2.5
Parsing documentation for hashie-2.1.2
Installing ri documentation for hashie-2.1.2
Parsing documentation for uuidtools-2.1.5
Installing ri documentation for uuidtools-2.1.5
Parsing documentation for rack-1.6.0
Installing ri documentation for rack-1.6.0
Parsing documentation for chef-zero-4.1.0
Installing ri documentation for chef-zero-4.1.0
invalid options: -SNw2
(invalid options are ignored)
Parsing documentation for coderay-1.1.0
Installing ri documentation for coderay-1.1.0
Parsing documentation for slop-3.6.0
Installing ri documentation for slop-3.6.0
Parsing documentation for method_source-0.8.2
Installing ri documentation for method_source-0.8.2
Parsing documentation for pry-0.10.1
Installing ri documentation for pry-0.10.1
Parsing documentation for plist-3.1.0
Installing ri documentation for plist-3.1.0
Parsing documentation for rspec-support-3.2.2
Installing ri documentation for rspec-support-3.2.2
Parsing documentation for rspec-core-3.2.2
Installing ri documentation for rspec-core-3.2.2
Parsing documentation for rspec-expectations-3.2.0
Installing ri documentation for rspec-expectations-3.2.0
Parsing documentation for rspec-mocks-3.2.1
Installing ri documentation for rspec-mocks-3.2.1
Parsing documentation for rspec-3.2.0
Installing ri documentation for rspec-3.2.0
Parsing documentation for builder-3.2.2
Installing ri documentation for builder-3.2.2
Parsing documentation for rspec_junit_formatter-0.2.0
Installing ri documentation for rspec_junit_formatter-0.2.0
Parsing documentation for rspec-its-1.2.0
Installing ri documentation for rspec-its-1.2.0
Parsing documentation for multi_json-1.11.0
Installing ri documentation for multi_json-1.11.0
Parsing documentation for net-scp-1.2.1
Installing ri documentation for net-scp-1.2.1
Parsing documentation for specinfra-2.27.1
Installing ri documentation for specinfra-2.27.1
Parsing documentation for serverspec-2.14.0
Installing ri documentation for serverspec-2.14.0
Parsing documentation for chef-12.2.1
Installing ri documentation for chef-12.2.1
35 gems installed
続いてknife-soloインストール
$ sudo gem install knife-solo
Password:
Fetching: knife-solo-0.4.2.gem (100%)
Thanks for installing knife-solo!
If you run into any issues please let us know at:
https://github.com/matschaffer/knife-solo/issues
If you are upgrading knife-solo please uninstall any old versions by
running `gem clean knife-solo` to avoid any errors.
See http://bit.ly/CHEF-3255 for more information on the knife bug
that causes this.
Successfully installed knife-solo-0.4.2
Parsing documentation for knife-solo-0.4.2
Installing ri documentation for knife-solo-0.4.2
1 gem installed
インストール確認
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.0)
builder (3.2.2)
CFPropertyList (2.2.0)
chef (12.2.1)
chef-zero (4.1.0)
coderay (1.1.0)
diff-lcs (1.2.5)
erubis (2.7.0)
ffi (1.9.8)
ffi-yajl (1.4.0)
hashie (2.1.2)
highline (1.7.1)
io-console (0.4.2)
ipaddress (0.8.0)
json (1.7.7)
knife-solo (0.4.2)
libxml-ruby (2.6.0)
・
・
他のもいろいろ入ったっぽい。とりあえずOK
knifeコマンドの設定ファイル作成
$ knife configure
WARNING: No knife configuration file found
Where should I put the config file? [/Users/Ma/.chef/knife.rb]
Please enter the chef server URL: [https://mini.local:443]
Please enter an existing username or clientname for the API: [Ma]
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef-server/chef-validator.pem]
Please enter the path to a chef repository (or leave blank):
*****
You must place your client key in:
/Users/Ma/.chef/Ma.pem
Before running commands with Knife!
*****
You must place your validation key in:
/etc/chef-server/chef-validator.pem
Before generating instance data with Knife!
*****
Configuration file written to /Users/Ma/.chef/knife.rb
リターンを押してすすんでいく。
これで準備OK
追記:
個人開発環境用なので、chef soloを勉強していこうと思っていたのに、どうやらそのうちなくなるらしい・・
その代わりになるのが、Chef Zero だそう。
最初からこっちを勉強しよう。。
参考ありがとう:
http://qiita.com/TsuyoshiUshio@github/items/89030baca68b05a9783d