- From: Kevin Karwaski <
>
- To:
- Subject: [chef] Re: knife-ec2 instance creation and management.
- Date: Wed, 19 Jun 2013 17:12:41 -0400
Also, I think you need ticks around the search query *and* the command:
knife ssh 'name:NODENAME' 'sudo chef-client' -x ubuntu -a ec2.public_hostname
-K.
On Wed, Jun 19, 2013 at 5:05 PM, Kevin Karwaski
<
>
wrote:
>
Hi James,
>
>
What node attributes do you see when you run:
>
>
knife search node 'name:NODENAME' -a ec2
>
>
You should see all of the ec2 related attributes cataloged by ohai...
>
do you see a valid public_hostname?
>
>
-K.
>
>
>
On Wed, Jun 19, 2013 at 4:54 PM, James Andrews
>
<
>
>
wrote:
>
> Hello,
>
>
>
> I am new to Chef and am evaluating it for future use at my company. Over
>
> the last week I have found a few useful tutorials to get me going. One
>
> in-particular is the EC2 Bootstrap guide which I've used with varied
>
> success.
>
>
>
> http://wiki.opscode.com/display/chef/EC2+Bootstrap+Fast+Start+Guide
>
>
>
> I have followed the instructions from this and have successfully spun up a
>
> small ubuntu server using the following options in my knife.rb file
>
>
>
> knife[:image] = 'ami-70f96e40'
>
> knife[:user] = 'ubuntu'
>
> knife[:availability_zone] = 'us-west-2b'
>
> knife[:region] = 'us-west-2'
>
> knife[:aws_access_key_id] = "secret"
>
> knife[:aws_secret_access_key] = "secret"
>
> knife[:aws_ssh_key_id] = "secret"
>
> knife[:identity_file] = "/Users/jandrews/.ssh/secret.pem"
>
> knife[:ssh_user] = "ubuntu"
>
>
>
> Next I create a run list to install the apache2 cookbook since that is the
>
> web server I am most comfortable with. The run list looks good so I move
>
> to Step 6 of the tutorial which allows me to execute "chef-client"
>
> remotely for the node I spun up. The command it says to use is:
>
>
>
> knife ssh name:NODENAME -x ubuntu "sudo chef-client" -a ec2.public_hostname
>
>
>
> The "-a ec2.public_hostname" is suppose to tell knife to use the public
>
> hostname of the server since the FDQN is set to the internal ip address.
>
> The problem is that it does not work. I instead get the following error
>
>
>
> "FATAL: 1 node found, but does not have the required attribute to
>
> establish the connection. Try setting another attribute to open the
>
> connection using --attribute."
>
>
>
> Googling has given me no useful information. I looked at the node
>
> attributes via the web browser on opscode.com and notice an ec2 node
>
> attributes with no value, and wonder if that's suppose to be a json
>
> valued key/pair list.
>
>
>
> So it seems either something is broken with knife-ec2 or I am missing
>
> something minor. I would really appreciate any insight anyone has on how
>
> to get this command to work.
>
>
>
> Thanks
>
> James
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
--
>
Kevin Karwaski
>
Operations Engineer @ {Fiksu}
--
Kevin Karwaski
Operations Engineer @ {Fiksu}
- [chef] knife-ec2 instance creation and management., James Andrews, 06/19/2013
- [chef] Re: knife-ec2 instance creation and management., Kevin Karwaski, 06/19/2013
- [chef] Re: Re: knife-ec2 instance creation and management., James Andrews, 06/19/2013
- [chef] Re: knife-ec2 instance creation and management., Kevin Karwaski, 06/19/2013
- [chef] Re: Re: knife-ec2 instance creation and management., James Andrews, 06/19/2013
- [chef] Re: Re: Re: knife-ec2 instance creation and management., Kevin Karwaski, 06/19/2013
- [chef] Re: Re: Re: knife-ec2 instance creation and management., Kevin Karwaski, 06/19/2013
- [chef] Re: Re: Re: Re: knife-ec2 instance creation and management., James Andrews, 06/19/2013
- [chef] Re: Re: Re: Re: Re: knife-ec2 instance creation and management., Kevin Karwaski, 06/19/2013
- [chef] Re: knife-ec2 instance creation and management., James Andrews, 06/19/2013
- [chef] Re: Re: knife-ec2 instance creation and management., Kevin Karwaski, 06/19/2013
- [chef] Re: Re: Re: knife-ec2 instance creation and management., James Andrews, 06/19/2013
- [chef] Re: Re: Re: Re: knife-ec2 instance creation and management., Kevin Karwaski, 06/20/2013
- [chef] Re: Re: Re: Re: Re: knife-ec2 instance creation and management., Maciej Pasternacki, 06/20/2013
Archive powered by MHonArc 2.6.16.