| layout | page |
|---|---|
| lang | en |
| title | Installation |
IMHO,
If you make a program of Ruby, I recommend using Bundler while combining with a version manager of Ruby (rvm, rbenv) like other projects.
Next, if you are not required Ruby management, and you want to use the co-workstation server. In this case, I recommend using Chef-DK.
Install via chef gem subcommand.
$ chef gem install knife-zero
Add this line to your application's Gemfile:
gem 'knife-zero'And then execute:
$ bundle
I usually bundle gems with --binstubs and --path option.
$ bundle install --binstubs --path vendor/bundle
When pass --path option to bundler, RubyGems are installed under one directory.
Previous command creates tree below.
$ tree . -L 5
.
βββ Gemfile
βββ Gemfile.lock
βββ bin
βΒ Β βββ chef-apply
βΒ Β βββ chef-client
βΒ Β βββ chef-shell
βΒ Β βββ chef-solo
βΒ Β βββ chef-zero
βΒ Β βββ coderay
βΒ Β βββ erubis
βΒ Β βββ ffi-yajl-bench
βΒ Β βββ htmldiff
βΒ Β βββ knife
βΒ Β βββ ldiff
βΒ Β βββ ohai
βΒ Β βββ pry
βΒ Β βββ rackup
βΒ Β βββ rake
βΒ Β βββ rspec
βΒ Β βββ serverspec-init
βββ vendor
βββ bundle
βββ ruby
βββ 2.1.0
βββ bin
βββ build_info
βββ cache
βββ doc
βββ extensions
βββ gems
βββ specifications
12 directories, 19 files
When pass --binstubs option to bundler, Command Line Tools which included with RubyGems are installed under ./bin(configurable).
$ ./bin/chef-client -v
Chef: 12.3.0
$ ./bin/knife zero 2>/dev/null
Available zero subcommands: (for details, knife SUB-COMMAND --help)
** ZERO COMMANDS **
knife zero bootstrap FQDN (options)
knife zero chef_client QUERY (options) | It's same as converge
knife zero converge QUERY (options)
knife zero diagnose # show configuration from file
install it yourself as:
$ gem install knife-zero