Skip to content

Latest commit

Β 

History

History
executable file
Β·
111 lines (83 loc) Β· 2.33 KB

10_install.md

File metadata and controls

executable file
Β·
111 lines (83 loc) Β· 2.33 KB
layout page
lang en
title Installation

About plugin installation method of Chef. For example, such as Knife-Zero.

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 with Chef-DK

Install via chef gem subcommand.

$ chef gem install knife-zero

Install from Rubygems

Add this line to your application's Gemfile:

gem 'knife-zero'

And then execute:

$ bundle

Bundler Example

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

gem command(I don't recommend it)

install it yourself as:

$ gem install knife-zero