我是一个新手,试图引导和 ec2 实例,但对厨师没有任何作用。
- 我正在使用厨师服务器
- 我的开发机器的用户名是ubuntu。我想保持它与 ec2 的 ubuntu 相同的名称。
我试过这个命令。
ubuntu@ubuntu:~/.chef$ knife ec2 server create -x ubuntu -r "role[testredis]" --region ap-southeast-1 -Z ap-southeast-1a -i ami-ae1a5dfc -f t1.micro -S testpem -I ~/.ec2/testpem.pem -S knife --ssh-user ubuntu
我得到了以下输出
ERROR: You have not provided a valid image (AMI) value. Please note the short option for this value recently changed from '-i' to '-I'.
然后我尝试了以下。
knife bootstrap ec2-46-137-231-241.ap-southeast-1.compute.amazonaws.com -r "role[testredis]" -x ubuntu -i ~/.ec2/sg_development.pem --sudo
我得到了以下输出
ec2-46-137-231-241.ap-southeast-1.compute.amazonaws.com /usr/bin/knife
ec2-46-137-231-241.ap-southeast-1.compute.amazonaws.com /usr/bin/shef
ec2-46-137-231-241.ap-southeast-1.compute.amazonaws.com Successfully installed chef-0.10.8
ec2-46-137-231-241.ap-southeast-1.compute.amazonaws.com 1 gem installed
ec2-46-137-231-241.ap-southeast-1.compute.amazonaws.com [Fri, 23 Mar 2012 23:56:02 +0000] INFO: *** Chef 0.10.8 ***
ec2-46-137-231-241.ap-southeast-1.compute.amazonaws.com [Fri, 23 Mar 2012 23:56:03 +0000] INFO: Client key /etc/chef/client.pem is not present - registering
ec2-46-137-231-241.ap-southeast-1.compute.amazonaws.com [Fri, 23 Mar 2012 23:56:03 +0000] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
ec2-46-137-231-241.ap-southeast-1.compute.amazonaws.com [Fri, 23 Mar 2012 23:56:03 +0000] FATAL: OpenSSL::PKey::RSAError: private key needed.: no start line
我注意到 ec2 实例上的/etc/chef/client.pem是我运行刀命令的开发计算机上的 pem。
那么,我该怎么办?是节点名冲突吗?