Last active
August 29, 2015 14:06
-
-
Save hh/65a61633bae5823fd376 to your computer and use it in GitHub Desktop.
Trouble getting chef-metal to auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec chef-client -z ./examples/simple.rb | |
DL is deprecated, please use Fiddle | |
Starting Chef Client, version 11.16.0 | |
resolving cookbooks for run list: [] | |
Synchronizing Cookbooks: | |
Compiling Cookbooks... | |
[2014-09-09T14:13:52-05:00] WARN: Node mba.grandenetworks.net has an empty run list. | |
Converging 1 resources | |
Recipe: @recipe_files::/home/hh/discovery/preview/examples/simple.rb | |
* machine[mario] action converge | |
================================================================================ | |
Error executing action `converge` on resource 'machine[mario]' | |
================================================================================ | |
Fog::Errors::LoadError | |
---------------------- | |
Missing Credentials | |
To run as 'default', add the following to your resource config file: /home/hh/.fog | |
An alternate file may be used by placing its path in the FOG_RC environment variable | |
####################################################### | |
# Fog Credentials File | |
# | |
# Key-value pairs should look like: | |
# :aws_access_key_id: 022QF06E7MXBSAMPLE | |
:default: | |
:aws_access_key_id: | |
:aws_secret_access_key: | |
:bluebox_api_key: | |
:bluebox_customer_id: | |
:brightbox_client_id: | |
:brightbox_secret: | |
:clodo_api_key: | |
:clodo_username: | |
:go_grid_api_key: | |
:go_grid_shared_secret: | |
:google_client_email: | |
:google_key_location: | |
:google_project: | |
:google_storage_access_key_id: | |
:google_storage_secret_access_key: | |
:hp_access_key: | |
:hp_secret_key: | |
:hp_tenant_id: | |
:hp_avl_zone: | |
:linode_api_key: | |
:local_root: | |
:bare_metal_cloud_password: | |
:bare_metal_cloud_username: | |
:public_key_path: | |
:private_key_path: | |
:openstack_api_key: | |
:openstack_username: | |
:openstack_auth_url: | |
:openstack_tenant: | |
:openstack_region: | |
:ovirt_username: | |
:ovirt_password: | |
:ovirt_url: | |
:libvirt_uri: | |
:rackspace_api_key: | |
:rackspace_username: | |
:rackspace_servicenet: | |
:rackspace_cdn_ssl: | |
:rage4_email: | |
:rage4_password: | |
:riakcs_access_key_id: | |
:riakcs_secret_access_key: | |
:stormondemand_username: | |
:stormondemand_password: | |
:terremark_username: | |
:terremark_password: | |
:voxel_api_key: | |
:voxel_api_secret: | |
:zerigo_email: | |
:zerigo_token: | |
:dnsimple_email: | |
:dnsimple_password: | |
:dnsmadeeasy_api_key: | |
:dnsmadeeasy_secret_key: | |
:dreamhost_api_key: | |
:cloudstack_host: | |
:cloudstack_api_key: | |
:cloudstack_secret_access_key: | |
:vsphere_server: | |
:vsphere_username: | |
:vsphere_password: | |
:libvirt_username: | |
:libvirt_password: | |
:libvirt_uri: | |
:libvirt_ip_command: | |
:ibm_username: | |
:ibm_password: | |
:vcloud_director_host: | |
:vcloud_director_username: | |
:vcloud_director_password: | |
# | |
# End of Fog Credentials File | |
####################################################### | |
Resource Declaration: | |
--------------------- | |
# In /home/hh/discovery/preview/examples/simple.rb | |
3: machine 'mario' do | |
4: tag 'itsa_me' | |
5: converge true | |
6: end | |
Compiled Resource: | |
------------------ | |
# Declared in /home/hh/discovery/preview/examples/simple.rb:3:in `from_file' | |
machine("mario") do | |
action :converge | |
retries 0 | |
retry_delay 2 | |
guard_interpreter :default | |
chef_server {:chef_server_url=>"http://localhost:8889", :options=>{:client_name=>"mba.grandenetworks.net", :signing_key_filename=>nil}} | |
driver "fog:DigitalOcean:DOR_6izlkOfSzjKO3epy6A" | |
cookbook_name "@recipe_files" | |
recipe_name "/home/hh/discovery/preview/examples/simple.rb" | |
attribute_modifiers [["tags", #<Proc:0x000000054607f8@/home/hh/discovery/preview/vendor/bundle/ruby/2.1.0/gems/cheffish-0.8.2/lib/cheffish.rb:149>]] | |
converge true | |
end | |
Running handlers: | |
[2014-09-09T14:13:55-05:00] ERROR: Running exception handlers | |
Running handlers complete | |
[2014-09-09T14:13:55-05:00] ERROR: Exception handlers complete | |
[2014-09-09T14:13:55-05:00] FATAL: Stacktrace dumped to /home/hh/.chef/local-mode-cache/cache/chef-stacktrace.out | |
Chef Client failed. 0 resources updated in 4.759504274 seconds | |
[2014-09-09T14:13:55-05:00] ERROR: machine[mario] (@recipe_files::/home/hh/discovery/preview/examples/simple.rb line 3) had an error: Fog::Errors::LoadError: Missing Credentials | |
To run as 'default', add the following to your resource config file: /home/hh/.fog | |
An alternate file may be used by placing its path in the FOG_RC environment variable | |
####################################################### | |
# Fog Credentials File | |
# | |
# Key-value pairs should look like: | |
# :aws_access_key_id: 022QF06E7MXBSAMPLE | |
:default: | |
:aws_access_key_id: | |
:aws_secret_access_key: | |
:bluebox_api_key: | |
:bluebox_customer_id: | |
:brightbox_client_id: | |
:brightbox_secret: | |
:clodo_api_key: | |
:clodo_username: | |
:go_grid_api_key: | |
:go_grid_shared_secret: | |
:google_client_email: | |
:google_key_location: | |
:google_project: | |
:google_storage_access_key_id: | |
:google_storage_secret_access_key: | |
:hp_access_key: | |
:hp_secret_key: | |
:hp_tenant_id: | |
:hp_avl_zone: | |
:linode_api_key: | |
:local_root: | |
:bare_metal_cloud_password: | |
:bare_metal_cloud_username: | |
:public_key_path: | |
:private_key_path: | |
:openstack_api_key: | |
:openstack_username: | |
:openstack_auth_url: | |
:openstack_tenant: | |
:openstack_region: | |
:ovirt_username: | |
:ovirt_password: | |
:ovirt_url: | |
:libvirt_uri: | |
:rackspace_api_key: | |
:rackspace_username: | |
:rackspace_servicenet: | |
:rackspace_cdn_ssl: | |
:rage4_email: | |
:rage4_password: | |
:riakcs_access_key_id: | |
:riakcs_secret_access_key: | |
:stormondemand_username: | |
:stormondemand_password: | |
:terremark_username: | |
:terremark_password: | |
:voxel_api_key: | |
:voxel_api_secret: | |
:zerigo_email: | |
:zerigo_token: | |
:dnsimple_email: | |
:dnsimple_password: | |
:dnsmadeeasy_api_key: | |
:dnsmadeeasy_secret_key: | |
:dreamhost_api_key: | |
:cloudstack_host: | |
:cloudstack_api_key: | |
:cloudstack_secret_access_key: | |
:vsphere_server: | |
:vsphere_username: | |
:vsphere_password: | |
:libvirt_username: | |
:libvirt_password: | |
:libvirt_uri: | |
:libvirt_ip_command: | |
:ibm_username: | |
:ibm_password: | |
:vcloud_director_host: | |
:vcloud_director_username: | |
:vcloud_director_password: | |
# | |
# End of Fog Credentials File | |
####################################################### | |
[2014-09-09T14:13:55-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) | |
[hh@mba preview]$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
current_dir = File.dirname(__FILE__) | |
#https://github.com/rmoriz/knife-digital_ocean#configuration | |
knife[:digital_ocean_client_id] = ENV['DIGITAL_OCEAN_CLIENT_ID'] | |
knife[:digital_ocean_api_key] = ENV['DIGITAL_OCEAN_API_KEY'] | |
chef_repo_path "#{current_dir}/.." | |
cookbook_path ["#{current_dir}/../cookbooks"] | |
role_path "#{current_dir}/../roles" | |
data_bag_path "#{current_dir}/../data_bags" | |
validation_key "#{current_dir}/invalidation.pem" # not real, just for localmode | |
# chef-metal-fog | |
driver "fog:DigitalOcean:#{ENV['DIGITAL_OCEAN_CLIENT_ID']}" | |
driver_options compute_options: { | |
digitalocean_api_key: ENV['DIGITAL_OCEAN_API_KEY'] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I also tried # machine_options bootstrap_options:{key_name: 'hh'}