Atalanta / cucumber-chef

Framework for test-driven infrastructure development
http://cucumber-chef.org
Apache License 2.0
265 stars 55 forks source link

Authentication fail #99

Closed pikesley closed 11 years ago

pikesley commented 11 years ago

Hey hey

So every day, this gets closer and closer to working. I'm able to build a test lab and create a sample feature following these steps: https://gist.github.com/pikesley/4723924

However when I try to actually run the thing:

[sam@dirac:~/ODI/cuke-chef] bundle exec !!
bundle exec cucumber
  * cucumber-chef v2.1.0.rc.8
@odi
Feature: Perform test driven infrastructure with Cucumber-Chef
  In order to learn how to develop test driven infrastructure
  As an infrastructure developer
  I want to better understand how to use Cucumber-Chef

  Background:                                                                # features/odi/odi.feature:7
    * I have a server called "odi"                                           # cucumber-chef-0f94e45a0de5/lib/cucumber/chef/steps/provision_steps.rb:22
    * "odi" is running "ubuntu" "precise"                                    # cucumber-chef-0f94e45a0de5/lib/cucumber/chef/steps/provision_steps.rb:26
    * "odi" has been provisioned                                             # cucumber-chef-0f94e45a0de5/lib/cucumber/chef/steps/provision_steps.rb:46
    * the following cookbooks have been uploaded:                            # cucumber-chef-0f94e45a0de5/lib/cucumber/chef/steps/chef_steps.rb:57
      | cookbook    | cookbook_path |
      | chef-client | ./cookbooks   |
    * the "chef-client::service" recipe has been added to the "odi" run list # cucumber-chef-0f94e45a0de5/lib/cucumber/chef/steps/provision_steps.rb:54
    * the chef-client has been run on "odi"                                  # cucumber-chef-0f94e45a0de5/lib/cucumber/chef/steps/provision_steps.rb:62
    * I ssh to "odi" with the following credentials:                         # cucumber-chef-0f94e45a0de5/lib/cucumber/chef/steps/ssh_steps.rb:28
      | username | keyfile                        |
      | root     | ./.cucumber-chef/id_rsa-ubuntu |

  Scenario: Can connect to the provisioned server via SSH authentication     # features/odi/odi.feature:20
    When I run "hostname"                                                    # cucumber-chef-0f94e45a0de5/lib/cucumber/chef/steps/ssh_steps.rb:62
      root (Net::SSH::AuthenticationFailed)
      /Users/sam/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/timeout.rb:68:in `timeout'
      features/odi/odi.feature:21:in `When I run "hostname"'

followed by lots more red, all seemingly related to ssh authentication failures. Am I doing something dumb (again)?

Thanks

S

YungSang commented 11 years ago

I use ./.cucumber-chef/vagrant/id_rsa-vagrant instead of ./.cucumber-chef/id_rsa-ubuntu for keyfile.

zpatten commented 11 years ago

Check this out: https://github.com/Atalanta/cucumber-chef/issues/95

Namely the last little bit there on authentication.

pikesley commented 11 years ago

Dude, you are a legend. When I work out how to send hugs over IP, you will be first :)

Also, hope that Gist proves useful for somebody (I've been kicking it into shape for a couple of weeks)

pikesley commented 11 years ago

Gist now updated to do a full from-scratch end-to-end setup and test run. Anybody else care to try it?

zpatten commented 11 years ago

Triaging the net-ssh issues with @anujbiyani ; I'll be happy to give it a spin once we get 2.1.0.rc.9 pushed.

zpatten commented 11 years ago

Closing this out; pretty sure everything was resolved here; reopen if not!