LoginSignup
6
8

More than 5 years have passed since last update.

knife コマンド

Posted at

knife cookbook

knife cookbook create cookbook名 -o ディレクトリパス

指定したディレクトリへ cookbook の雛形を作成する。

knife cookbook test cookbook名

cookbookの文法をチェックする。

knife cookbook upload -a -o ディレクトリパス

指定したディレクトリの配下に存在する全 cookbook をchef server へアップロードする。

knife cookbook list

登録済み Cookbook を表示する。

knife node

knife node list

登録済み node を表示する。

knife node show node名

nodeの情報を表示する。

knife node create node名

node を作成する。

knife node run_list add node名 'recipe[cookbook名]'

cookbook を node へ関連付ける。

knife node run_list remove node名 cookbook名

cookbook の node への関連付けを解除する。

EDITOR=vi knife node edit node名

node の attributes を編集する。

knife role

EDITOR=vi knife role create role名

role を作成する。

cookbookの適用

sudo chef-client
6
8
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
6
8