ChefDKを試す

ChefDKというものがある事を知り、早速試してみることにしました。


以下の環境が用意されているようです。


今回はCentOS6にインストールしてみることにしました。

# yum install https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chefdk-0.2.0-2.el6.x86_64.rpm


インストールされているgemを見てみます。

# /opt/chefdk/embedded/bin/gem list                                             

*** LOCAL GEMS ***

activesupport (4.1.4, 3.2.19)
addressable (2.3.6)
app_conf (0.4.2)
appbundler (0.2.0)
archive (0.0.6)
aruba (0.6.0)
ast (2.0.0)
axiom-types (0.1.1)
berkshelf (3.1.3)
berkshelf-api (1.4.0)
berkshelf-api-client (1.2.0)
bigdecimal (1.2.4)
buff-config (1.0.0)
buff-extensions (1.0.0)
buff-ignore (1.1.1)
buff-ruby_engine (0.1.0)
buff-shell_out (0.1.1)
builder (3.2.2)
bundler (1.5.2)
cane (2.6.2)
celluloid (0.16.0.pre2)
celluloid-io (0.16.0.pre2)
chef (11.14.0.rc.2, 11.12.8)
chef-dk (0.2.0)
chef-vault (2.2.1)
chef-zero (2.2, 2.0.2, 1.5.6)
chefspec (4.0.1)
childprocess (0.5.3)
coderay (1.1.0)
coercible (1.0.0)
columnize (0.8.9)
cookbook-omnifetch (0.2.0)
countloc (0.4.0)
crack (0.4.2)
cucumber (1.3.15)
debugger (1.6.8)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.5)
dep-selector-libgecode (1.0.2)
dep_selector (1.0.3)
descendants_tracker (0.0.4)
diff-lcs (1.2.5)
diffy (3.0.5)
docile (1.1.5)
equalizer (0.0.9)
erubis (2.7.0)
fakefs (0.5.2)
faraday (0.9.0)
fauxhai (2.1.2)
ffi (1.9.3)
ffi-yajl (0.2.0)
foodcritic (3.0.3)
fuubar (1.3.3)
gherkin (2.12.2, 2.11.8)
git (1.2.7)
grape (0.8.0)
grape-msgpack (0.1.2)
hashie (2.1.2)
highline (1.6.21)
hitimes (1.2.2)
http (0.6.1)
http_parser.rb (0.6.0)
i18n (0.6.11)
ice_nine (0.11.0)
io-console (0.4.2)
ipaddress (0.8.0)
json (1.8.1)
kitchen-vagrant (0.15.0)
knife-spork (1.3.4)
libyajl2 (0.1.17)
log_switch (0.4.0)
maruku (0.7.2)
metaclass (0.0.4)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.6.0)
minitar (0.5.4)
minitest (5.4.0, 5.1.0, 4.7.5)
mixlib-authentication (1.3.0)
mixlib-cli (1.5.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (1.4.0)
mocha (0.14.0)
moneta (0.6.0)
msgpack (0.5.8)
multi_json (1.10.1)
multi_test (0.1.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
net-http-persistent (2.9.4)
net-scp (1.2.1)
net-ssh (2.9.1)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0)
nio4r (1.0.0)
nokogiri (1.6.2.1, 1.5.11)
octokit (3.2.0)
ohai (7.4.0.dev, 7.2.0.rc.2, 7.0.4)
parallel (1.0.0)
parser (2.1.9)
polyglot (0.3.5)
powerpack (0.0.9)
pry (0.10.0)
pry-debugger (0.2.3)
psych (2.0.3)
puma (1.6.3)
rack (1.5.2)
rack-accept (0.4.5)
rack-mount (0.8.3)
rainbow (2.0.0)
rake (10.3.2, 10.1.1, 10.1.0, 0.9.6)
rake-compiler (0.8.3)
rdoc (4.1.1, 4.1.0)
reel (0.5.0)
rest-client (1.6.8)
retryable (1.3.5)
ridley (4.0.0)
rspec (3.0.0, 2.99.0, 2.14.1)
rspec-core (3.0.2, 2.99.1, 2.14.8)
rspec-expectations (3.0.2, 2.99.1, 2.14.5)
rspec-mocks (3.0.2, 2.99.1, 2.14.6)
rspec-support (3.0.2)
rspec_junit_formatter (0.1.6)
rubocop (0.18.1)
ruby-progressbar (1.5.1)
ruby-shadow (2.3.4)
safe_yaml (1.0.3)
sawyer (0.5.4)
semverse (1.1.0)
simplecov (0.8.2)
simplecov-html (0.8.0)
slop (3.5.0)
solve (1.2.0)
spork (0.9.2)
systemu (2.6.4, 2.5.2)
tailor (1.4.0)
term-ansicolor (1.3.0)
test-kitchen (1.2.2.dev, 1.2.1)
test-unit (2.1.1.0)
text-table (1.2.3)
thor (0.19.1)
thread_safe (0.3.4)
timers (3.0.1)
tins (1.3.0)
treetop (1.4.15)
tzinfo (1.2.1)
varia_model (0.4.0)
virtus (1.0.2)
webmock (1.18.0)
websocket_parser (0.1.6)
wmi-lite (1.0.0)
yajl-ruby (1.2.1, 1.1.0)
yard (0.8.7.4)


パスを設定しておくと楽なので、.bash_profileにパスを追加します。

PATH=$PATH:$HOME/bin:/opt/chefdk/embedded/bin


個人的に良く使うserverspecとknife-soloが入っていなかったので、gemコマンドでインストールしておくことにします。

# /opt/chefdk/embedded/bin/gem install serverspec
# /opt/chefdk/embedded/bin/gem install knife-solo


手軽なのでよさげです。今日はこんなところで。