我正在尝试使用ec2
knife
命令行工具将实例部署到chef
。正在运行
knife --version
给出Chef: 11.14.0.alpha.1
我已正确配置knife.rb
文件
knife[:aws_access_key_id] = 'ABSDGYRB7KXSFHGSF'
knife[:aws_secret_access_key] = 'SDHGsdbstsdsdgdfhdfAGSDGC5IOfqsdgdfhAS'
knife[:flavor] = 't1.micro'
knife[:aws_ssh_key_id] = 'myawskey'
knife[:identity_file] = "/Users/place/pem/myawskey.pem"
然而,当我跑
时knife ec2 server list
我得到了
FATAL: Cannot find sub command for: 'ec2 server list'
The ec2 commands were moved to plugins in Chef 0.10
You can install the plugin with `(sudo) gem install knife-ec2
但是我已经多次安装了包,每次都有相同的结果。
Successfully installed knife-ec2-0.8.0
Parsing documentation for knife-ec2-0.8.0
Done installing documentation for knife-ec2 after 0 seconds
1 gem installed
可能导致此问题的原因,我该怎么做才能修复它?
我觉得它可能与我正在运行的主厨的alpha版本有关,但那是chef developer kit安装的版本所以我想它会稳定。任何建议表示赞赏。谢谢。
答案 0 :(得分:0)
关注this后出现了解决问题的方法。
第一步:
sudo xcode-select --switch /Library/Developer/CommandLineTools/
接下来是:
sudo chef gem install knife-ec2