[chef] chef-metal AWS Profile


Chronological Thread 
  • From: Douglas Garstang < >
  • To:
  • Subject: [chef] chef-metal AWS Profile
  • Date: Mon, 13 Oct 2014 16:47:32 -0700

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



Archive powered by MHonArc 2.6.16.

§