7
9

More than 5 years have passed since last update.

Chefをダウングレードする(CentOS)

Last updated at Posted at 2014-04-17

Goal

* 2014/4上旬ごろから、Chefをデフォルトのコマンドでインストールすると、knife configureが動かないバグがあり、修正されていない
* 一度インストールしてしまったchefのバージョンを下げる対応を実行する

Preparation

uname -a
  # Linux *** 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/issue
  # CentOS release 6.5 (Final)
  # Kernel \r on an \m

Problem

[root]

curl -L https://www.opscode.com/chef/install.sh | bash
  # gem install knife-soloが別途必要だけど省略
chef-solo --version
  # Chef: 11.12.2
knife --version
  # Chef: 11.12.2

[youruser]

## 
## knife configureを実行してインタラクティブ入力を進めようとするとプラグインがないというエラーで次に進めない
## 

knife configure
  # WARNING: No knife configuration file found
  # Where should I put the config file? [/home/nomaduser/.chef/knife.rb]
  # ERROR: Ohai::Exceptions::DependencyNotFound: Can not find a plugin for dependency os

Fix

* chefのバージョンを11.10系に戻す
* 上のURLから、利用OSなどを選択し、利用可能バージョンだけ確認する
* Enterprise Linuxだと、11.10.4-1が利用可能
[root]

curl -L https://www.opscode.com/chef/install.sh | bash -s -- -v 11.10.4-1
  # versionを指定して再度installコマンドを実行

Check

[youruser]

chef-solo --version
  # Chef: 11.10.4
knife --version
  # Chef: 11.10.4

knife configure
  # Interactive settings
cat ~/.chef/knife.rb
  # Check knife configure succeeded

References

7
9
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
7
9