2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

knife-solo CheatSheet

Last updated at Posted at 2014-07-31

knife

knife-soloのよく使うコマンドのチートシート。

  • knife solo init
  • knife solo prepare
  • knife cookbook
  • knife cook

solo

description here

init

Chefレポジトリの作成。

knife solo init (init_directory)

cd path_to_chef_dir
# カレントディレクトリにChefリポジトリを作成
knife solo init .

生成されるファイル構成は以下。

init_dir/
├── .chef
│   └── knife.rb
├── cookbooks
├── data_bags
├── nodes
├── roles
└── site-cookbooks

prepare

ゲストOSにオムニバスのChefをインストール

knife solo prepare user@hostname

knife solo prepare user@hostname

cook

Chefの実行

knife solo cook user@hostname

knife solo cook user@hostname

cookbook

cookbook系コマンドの紹介

show

knife cookbook show

knife cookbook show

list

knife cookbook list

knife cookbook list

create

クックブックの作成。

knife cookbook create

knife cookbook create COOKBOOK_NAME

delete

クックブックの削除

knife cookbook delete

knife cookbook delete COOKBOOK_NAME

test

クックブックの文法をチェック。

knife cookbook test

knife cookbook test COOKBOOK_NAME

Plugins

oh-my-zshのプラグインとしても提供されているので是非利用してみましょう。

.zshrc
plugins=(knife chef)
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?