Comments (13)
your identity file and client key should have the same value, also your aws_ssh_key_id should be the filename minus the extension of your pem:
client_key "#{ENV['HOME']}/.chef/#{user}.pem"
knife[:aws_ssh_key_id] = user
knife[:identity_file] = "#{ENV['HOME']}/.chef/#{user}.pem"
from cucumber-chef.
Thanks for replying zpatten
ok I'm a bit confused at this point, my client key is for the opscode account and the pem file downloaded there, the knife[:identity_file] and knife[:aws_ssh_key_id] file deal with the amazon account and the pem file down loaded there. Is that not right? I don't follow why they'd be the same.
from cucumber-chef.
Correction: Sorry in my hasty response I posted incorrect information; aws_ssh_key_id should be the name of the key pair you created in your AWS zone minus the '.pem'; set this in the AWS_SSH_KEY_ID environment variable.
If you named your AWS key pair 'cucumber-chef-us-east-1.pem' then for example:
Put your AWS key pair in your home '.chef' directory, for example: '~/.chef/cucumber-chef-us-east-1.pem'
Make sure you export the details and add the keypair to your ssh-agent via your '.bash_profile' for example:
export AWS_SSH_KEY_ID='cucumber-chef-us-east-1'
ssh-add ~/.chef/cucumber-chef-us-east-1.pem
Make sure you change your knife config to use the environment variable:
knife[:aws_ssh_key_id] = ENV['AWS_SSH_KEY_ID']
from cucumber-chef.
hey zpatten
No worries, and thanks.. so
this:
" aws_ssh_key_id should be the name of the key pair you created in your AWS zone minus the '.pem'"
is already the case.
this isn't:
"set this in the AWS_SSH_KEY_ID environment variable."
nor this:
"Put your AWS key pair in your home '.chef' directory, for example: '~/.chef/cucumber-chef-us-east-1.pem'"
I'll try each of these separately and see how it goes.
Thanks
from cucumber-chef.
Ok, so having set aws_ssh_key_id in bash:
env |grep AWS
AWS_SSH_KEY_ID=tdd-eg
AWS_SECRET_ACCESS_KEY=xxxx
AWS_ACCESS_KEY_ID=yyyy
Added the key to the agent:
ssh-add -l |grep tdd
2048 b3:d7:65:da:f4:b1:f3:de:00:fd:e5:1e:0f:ab:e0:d8 /Users/glenn/.chef/tdd-eg.pem (RSA)
relocated the key file to ~/.chef and picking key id up from env:
knife[:identity_file] = "/Users/glenn/.chef/tdd-eg.pem"
knife[:aws_ssh_key_id] = ENV['AWS_SSH_KEY_ID']
It still seems a smell to me that the failure occurs while trying to use a private key that is part of the cucumber-chef repo. Just for kicks i changed region to ireland as thats the one the book uses and used the ami quoted in the source code jic there is some majik baked in, but alas still hitting same issue.
keen to hear any other thoughts.
from cucumber-chef.
So the key pair is tied to the region you created it in; when you look at the instance in AWS; does it show 'tdd-eg' in the "Key Pair Name" for the instance cucumber-chef has created?
from cucumber-chef.
correct, it does. I can also login using ssh -i ~/.chef/tdd-eg.pem ubuntu@...
from cucumber-chef.
I'm at a loss; mine repo is working; but I've re-written about half of this code at this point; I'm in the process of getting everything up in my repo; if you want to give my code a try once I've got it in place (should be a day or two). I've found a pile of issues and bugs that i've fixed; so at this point my version has diverged pretty far from this.
from cucumber-chef.
Just as a stab in the dark; make sure you check the user:group and perms of all the files involved.
from cucumber-chef.
re perms, good call, but already checked.
re using divergent code; yeah no hurry, happy to wait.
from cucumber-chef.
OK - we have an RC now. Test ALL THE THINGS. You are teh winner.
from cucumber-chef.
Hey thanks for all you're help, just revisited this.. all is good now.
from cucumber-chef.
Awesome, good to hear; thanks for the feedback!
from cucumber-chef.
Related Issues (20)
- Small fail, with a workaround HOT 8
- Chef 10.x Test Lab WebUI Not Working
- Calling cucumber-chef setup invokes the ip method with the extra :ip argument. HOT 4
- Cucumber-chef setup hangs HOT 29
- Problems running cucumber after cucumber-chef setup suceeded HOT 22
- Cucumber loads all .rb files and blows up HOT 7
- The Book
- Announcing TestLab HOT 7
- Doesn't seem to actually run chef-client HOT 5
- Can cucumber-chef be used without AWS? HOT 1
- cucumber-chef setup HOT 6
- Cucumber-chef setup hangs HOT 3
- Cucumber - chef setup hang(different from the before mentioned) HOT 1
- No internet access from lxc, ping fails HOT 3
- node has no roles, run list HOT 4
- It gets the error message of "FATAL: No nodes returned from search!" when use chef deployment HOT 1
- Chef solo support
- Please update the description of your repository to use "http://www.cucumber-chef.org" as domain string.
- cucumber-chef setup asking for vagrant password HOT 1
- Link to cucumber-chef.org at top of GitHub does not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cucumber-chef.