This file contains hidden or 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
| knife cookbook site install openssl | |
| ERROR: knife encountered an unexpected error | |
| This may be a bug in the 'cookbook site install' knife command or plugin | |
| Please collect the output of this command with the `-VV` option before filing a bug report. | |
| Exception: NoMethodError: undefined method `first' for "/home/user/chef-repo/cookbooks":String |
This file contains hidden or 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
| cat ~/.chef/knife.rb | |
| log_level :debug | |
| log_location STDOUT | |
| node_name 'makerbreaker' | |
| client_key '/home/makerbreaker/.chef/makerbreaker.pem' | |
| cookbook_path '/home/makerbreaker/chef-repo/cookbooks' | |
| validation_client_name 'chef-validator' | |
| validation_key '/etc/chef/validation.pem' | |
| chef_server_url 'http://makerservers.com:4000' |
This file contains hidden or 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
| 1. User Signs up and pays => Gets an alert to check their email in the next 5 to 10 minutes | |
| 2. VM is created | |
| a. name is a randomly generated one | |
| b. imageID is the "golden image id" | |
| c. flavor is 1 for 256/10G or 2 for 512/20G | |
| d. VM hostname and IP is saved to a table, and associated with the user_id | |
| E. Setup DNS for this server RANDOMNAME.cloudpokerdb.com | |
| 3. Job to loop status of server build | |
| 4. When job changes from build to active, bootstrap the server and change root password. | |
| a. The image will have postgres/openssl installed |
This file contains hidden or 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
| require 'resque/tasks' | |
| task "resque:setup" => :environment |
This file contains hidden or 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
| CONTROLLER | |
| def create | |
| @server = Server.new | |
| Resque.enqueue(ProvisionServer, @server.id) | |
| @server.domain_name = provisioned_server.name | |
| @server.external_ip = provisioned_server.addresses[:public] | |
| @server.internal_ip = provisioned_server.addresses[:private] | |
| @server.flavor_id = provisioned_server.flavorId | |
| respond_to do |format| |
This file contains hidden or 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
| bag = data_bag_item("users", "VARIABLE") | |
| user_account data_bag_item_users["VARIABLE"] do | |
| comment data_bag_item_users["comment"] | |
| home data_bag_item_users["home"] | |
| end | |
| { | |
| "name": "data_bag_item_users_hsolo", | |
| "json_class": "Chef::DataBagItem", |
This file contains hidden or 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
| NoMethodError: undefined method `[]' for client[chef-validator]:Chef::ApiClient | |
| from /home/afresta/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/base.rb:35:in `get' | |
| from /home/afresta/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/base.rb:46:in `get_or_new' | |
| from /home/afresta/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/connection/search.rb:35:in `block in search' | |
| from /home/afresta/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/connection/search.rb:34:in `map' | |
| from /home/afresta/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/connection/search.rb:34:in `search' | |
| from /home/afresta/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/connection/clients.rb:11:in `clients' | |
| from /home/afresta/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice.rb:20:in `method_missing' | |
| from (irb):1 | |
| from /home/afresta/.rvm/gems/ruby-1.9.3-rc1/gems/railties-3.2.3/lib/rails/commands/console.rb:47:in `start' |
This file contains hidden or 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
| NoMethodError: undefined method `[]' for client[chef-validator]:Chef::ApiClient | |
| from /home/aa/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/base.rb:35:in `get' | |
| from /home/aa/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/base.rb:46:in `get_or_new' | |
| from /home/aa/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/connection/search.rb:35:in `block in search' | |
| from /home/aa/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/connection/search.rb:34:in `map' | |
| from /home/aa/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/connection/search.rb:34:in `search' | |
| from /home/aa/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/connection/clients.rb:11:in `clients' | |
| from /home/aa/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice.rb:20:in `method_missing' | |
| from (irb):1 | |
| from /home/aa/.rvm/gems/ruby-1.9.3-rc1/gems/railties-3.2.3/lib/rails/commands/console.rb:47:in `start' |
This file contains hidden or 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
| Spice.setup do |s| | |
| s.server_url = "http://mydomain.com:4000" | |
| s.client_name = "aa" | |
| s.client_key = Spice.read_key_file("/home/aa/.chef/aa.pem") | |
| s.chef_version = "0.10.10" | |
| end |
This file contains hidden or 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
| test = Spice.new | |
| test.cookbooks | |
| => [#<Spice::Cookbook:0x0000000463edc8 @attrs={"name"=>"build-essential", "versions"=>["1.1.0"]}>, #<Spice::Cookbook:0x0000000463d680 @attrs={"name"=>"chef-client", "versions"=>["1.1.4"]}>, #<Spice::Cookbook:0x000000043c1d70 @attrs={"name"=>"openssl", "versions"=>["1.0.0"]}>, #<Spice::Cookbook:0x000000043c0448 @attrs={"name"=>"postgresql", "versions"=>["1.0.0"]}>] | |
| test.nodes | |
| TypeError: can't dump hash with default proc | |
| from /home/aa/.rvm/gems/ruby-1.9.3-rc1/gems/spice-1.0.4/lib/spice/base.rb:40:in `dump' |