[chef] Re: Re: chef-metal AWS Profile


Chronological Thread 
  • From: John Keiser < >
  • To:
  • Subject: [chef] Re: Re: chef-metal AWS Profile
  • Date: Tue, 14 Oct 2014 09:40:26 -0700

Looking at your issue, I'm guessing the problem is that it's looking in ~/.aws/config and you have ~/.aws.config (at least from the mail, maybe it was a typo?).

Can you try putting the file at that location and let us know if it works?  Is ~/.aws.config a standard location we should be handling as well?

On Tue, Oct 14, 2014 at 9:35 AM, Douglas Garstang < " target="_blank"> > wrote:
No replies. Is chef-metal an active project? Has it been replaced by something else?

Doug


On Mon, Oct 13, 2014 at 4:47 PM, Douglas Garstang < " target="_blank"> > wrote:
Not sure if this the right place to ask a chef-metal question.

Can't seem to get the AWS profiles to work. I keep getting this:

RuntimeError
------------
No AWS profile specified!  Are you missing something in the Chef config or ~/.aws/config?



My ~/.aws.config contains this:

[profile prod]
aws_access_key_id = <key_id>
aws_secret_access_key = <key>
region = us-east-1

[profile test]
aws_access_key_id = <key_id>
aws_secret_access_key = <key>
region = us-east-1


The reason the profille names have 'profile' at the front is because this is required for the AWS CLI, and boto as well, which also use this file.

I've tried setting these:

export CHEF_DRIVER="fog:AWS:test:us-east-1"
export CHEF_DRIVER="fog:AWS:profile test:us-east-1"

export CHEF_DRIVER="fog:AWS:<aws account #>:us-east-1"
export CHEF_DRIVER="fog:AWS:<aws account #> test:us-east-1"

None of those work (although they are being picked up because I see the value in the back trace).

I've also tried putting variations of the following into the simple.rb file:

with_driver 'fog:AWS:test'
with_driver 'fog:AWS:profile test'

and so on. Doesn't work.

I also tried this:

with_driver 'fog:AWS:test'
machine 'mario' do
  tag 'itsa_me'
  converge true
end

Didn't work. I tried this:

machine 'mario' do
  tag 'itsa_me'
  driver 'fog:AWS:test'
  converge true
end

and many many permutations. Also didn't work.

I then tried to put the settings into my ~/.chef/knife.rb. That also didn't work. Basically, NOTHING has worked. I keep getting the error above. Where should I put this?

To make matters more confusing, the gem seems to have been installed to my home directory under .chefdk. I don't know why as I use the gem that came with the chef-dk and that normally puts gems in /opt/chefdk/embedded (except for the chef-metal ones and it's dependancies).

Also,
Douglass-MacBook-Pro:~ doug$ /opt/chefdk/embedded/bin/gem list | grep chef-metal
chef-metal (0.14.2)
chef-metal-fog (0.9)
chef-metal-vagrant (0.6)


Thanks,
Doug.









I've also tried using 'profile test' instead of test, since that's what boto requi



--
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: " target="_blank">
Cell: +1-805-340-5627




Archive powered by MHonArc 2.6.16.

§