Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working Example #1

Closed
jmahowald opened this issue Dec 12, 2014 · 1 comment
Closed

Working Example #1

jmahowald opened this issue Dec 12, 2014 · 1 comment

Comments

@jmahowald
Copy link

So obviously without any documentation, you're not expecting any support questions yet :)

That being said, I was trying to make chef-metal-ssh work and was about to start renaming everything to chef-provisioning and saw that this was made. I'll try and help port the docs over if I can get it working.

Trying something like this



require 'chef/provisioning/ssh_driver'

with_driver 'ssh:/tmp/test/ssh_cluster'

machine "designer" do
  action [:ready,:converge]
  machine_options 'fqdn' => 'myexample.com',
                  'ssh_options' => {
                    'user' => 'ec2-user',
                    'keys' => "#{ENV['HOME']}/.ssh/test-key.pem"
                  }
  recipe 'distributed-repo::default'
end

And I get

/Users/josh/workspace/projects/chefgen/provisioning/chef-provisioning-ssh/lib/chef/resource/ssh_cluster.rb:18:in `load_prior_resource'
/Users/josh/workspace/projects/chefgen/distributed-repo/vendor/ruby/2.1.0/gems/chef-12.0.1/lib/chef/dsl/recipe.rb:108:in `build_resource'
/Users/josh/workspace/projects/chefgen/distributed-repo/vendor/ruby/2.1.0/gems/chef-12.0.1/lib/chef/dsl/recipe.rb:82:in `declare_resource'
/Users/josh/workspace/projects/chefgen/distributed-repo/vendor/ruby/2.1.0/gems/chef-12.0.1/lib/chef/dsl/recipe.rb:42:in `method_missing'
/Users/josh/workspace/projects/chefgen/provisioning/chef-provisioning-ssh/lib/chef/provisioning/ssh_driver/driver.rb:176:in `block in ensure_ssh_cluster'
@jmahowald
Copy link
Author

Got it going with


with_driver 'ssh:/tmp/designer_cluster'

with_machine_options :transport_options => {
    'hostname' => 'myhost.com',
                  'ssh_options' => {
                    'user' => 'ec2-user',
                    'keys' => "#{ENV['HOME']}/.ssh/test-file.pem"
                }
}
machine "designer" do
  action [:ready,:converge] 
  recipe 'distributed-repo::default'
end


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant