I'm a newbie trying to boot and an ec2 instance, and nothing works with the chef.
- I am using a chef server
- My development computer has an ubuntu username. I want to keep it with the same name as ubuntu for ec2.
I tried this command.
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
And I got the following output
ERROR: You have not provided a valid image (AMI) value. Please note the short option for this value recently changed from '-i' to '-I'.
Then I tried the following.
knife bootstrap ec2-46-137-231-241.ap-southeast-1.compute.amazonaws.com -r "role[testredis]" -x ubuntu -i ~/.ec2/sg_development.pem --sudo
And I got the following output
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
I notice that /etc/chef/client.pem in the ec2 instance is the pem on the dev machine where I ran the knife command.
So what should I do? Is that the name node?
source share