- From: Noah Kantrowitz <
>
- To:
- Subject: [chef] Re: Re: Re: application_python!?!?!
- Date: Tue, 27 Aug 2013 10:22:19 -0700
Yes, both the database config in the django block and the nginx config accept
a manual override (#host in the database, #hosts in the nginx) which if
present will make it not fall back to search().
--Noah
On Aug 27, 2013, at 10:06 AM, Justin Alexander wrote:
>
Thankyou so much!!!!!!!!!
>
>
I was able to locate and comment out the search code. Is there a
>
configuration based way to do this that would be less hacky?
>
>
>
>
On Tue, Aug 27, 2013 at 7:42 PM, Noah Kantrowitz
>
<
>
>
wrote:
>
The example as written is not compatible with chef-solo because it uses the
>
search API. You can modify to hard-code the hostnames for the database
>
server and application servers (presumably in your case both are just
>
['localhost']).
>
>
--Noah
>
>
On Aug 27, 2013, at 8:28 AM, Justin Alexander wrote:
>
>
> I keep getting the same error, no matter what I do. I am still a
>
> Chef-Noob. Can anyone give me a clue?
>
>
>
>
>
> Inside of a Vagrant image, I am trying to make a working test of the demo
>
> at:
>
> https://github.com/opscode-cookbooks/application_python
>
>
>
>
>
> It runs until I get the error:
>
>
>
> [2013-08-27T14:41:21+00:00] INFO: Processing
>
> application_python_django[packaginator] action before_deploy
>
> (bluevine::default line 115)
>
> [2013-08-27T14:41:21+00:00] WARN: Failed to read the private key
>
> /etc/chef/client.pem: #<Errno::ENOENT: No such file or directory -
>
> /etc/chef/client.pem>
>
>
>
> ================================================================================
>
> Error executing action `before_deploy` on resource
>
> 'application_python_django[packaginator]'
>
> ================================================================================
>
>
>
> Chef::Exceptions::PrivateKeyMissing
>
> -----------------------------------
>
> I cannot read /etc/chef/client.pem, which you told me to use to sign
>
> requests!
>
>
>
> Cookbook Trace:
>
> ---------------
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/libraries/default.rb:102:in
>
> `find_matching_role'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/libraries/default.rb:120:in
>
> `find_database_server'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_python/providers/django.rb:131:in
>
> `created_settings_file'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_python/providers/django.rb:40:in
>
> `class_from_file'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:110:in
>
> `before_deploy'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:109:in
>
> `each'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:109:in
>
> `before_deploy'
>
>
>
> Resource Declaration:
>
>
>
> ---------------------
>
> # In
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb
>
>
>
> 114: Chef::Log.debug "Trying to load application resource
>
> #{resource_name} for #{name}"
>
> 115: resource = super(resource_name.to_sym, self.name, &block)
>
> 116: break
>
>
>
> Compiled Resource:
>
> ------------------
>
> # Declared in
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:115:in
>
> `method_missing'
>
>
>
> application_python_django("packaginator") do
>
> retry_delay 2
>
> type :django
>
> database {"engine"=>"postgresql_psycopg2",
>
> "password"=>"awesome_password", "username"=>"packaginator",
>
> "database"=>"packaginator"}
>
> settings_template "settings.py.erb"
>
> local_settings_file "local_settings.py"
>
> packages ["redis"]
>
> retries 0
>
> recipe_name "default"
>
> symlink_before_migrate {"local_settings.py"=>"local_settings.py"}
>
> migration_command "/srv/packaginator/shared/env/bin/python manage.py
>
> syncdb --noinput"
>
> database_master_role "packaginator_database_master"
>
> debug true
>
> action [:nothing]
>
> cookbook_name :bluevine
>
> requirements "requirements/mkii.txt"
>
> collectstatic "build_static --noinput"
>
> end
>
>
>
>
>
> ================================================================================
>
> Error executing action `create` on resource 'ruby_block[packaginator
>
> before_deploy]'
>
> ================================================================================
>
>
>
> Chef::Exceptions::PrivateKeyMissing
>
> -----------------------------------
>
> application_python_django[packaginator] (bluevine::default line 115) had
>
> an error: Chef::Exceptions::PrivateKeyMissing: I cannot read
>
> /etc/chef/client.pem, which you told me to use to sign requests!
>
>
>
> Cookbook Trace:
>
> ---------------
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/libraries/default.rb:102:in
>
> `find_matching_role'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/libraries/default.rb:120:in
>
> `find_database_server'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_python/providers/django.rb:131:in
>
> `created_settings_file'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_python/providers/django.rb:40:in
>
> `class_from_file'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:110:in
>
> `before_deploy'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:109:in
>
> `each'
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:109:in
>
> `before_deploy'
>
>
>
> Resource Declaration:
>
> ---------------------
>
> # In
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb
>
>
>
> 106:
>
> 107: ruby_block "#{new_resource.name} before_deploy" do
>
> 108: block do
>
> 109: new_resource.sub_resources.each do |resource|
>
> 110: resource.run_action :before_deploy
>
> 111: end
>
> 112: callback(:before_deploy, new_resource.before_deploy)
>
> 113: end
>
> 114: end
>
> 115: end
>
>
>
> Compiled Resource:
>
> ------------------
>
> # Declared in
>
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:107:in
>
> `before_deploy'
>
>
>
> ruby_block("packaginator before_deploy") do
>
> retry_delay 2
>
> retries 0
>
> action "create"
>
> cookbook_name :bluevine
>
> block
>
> #<Proc:0x00007f80a05da4a8@/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb:108>
>
> end
>
>
>
> [2013-08-27T14:41:21+00:00] ERROR: Running exception handlers
>
> [2013-08-27T14:41:21+00:00] ERROR: Exception handlers complete
>
> [2013-08-27T14:41:21+00:00] FATAL: Stacktrace dumped to
>
> /tmp/vagrant-chef-1/chef-stacktrace.out
>
> [2013-08-27T14:41:21+00:00] FATAL: Chef::Exceptions::PrivateKeyMissing:
>
> ruby_block[packaginator before_deploy]
>
> (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb
>
> line 107) had an error: Chef::Exceptions::PrivateKeyMissing:
>
> application_python_django[packaginator] (bluevine::default line 115) had
>
> an error: Chef::Exceptions::PrivateKeyMissing: I cannot read
>
> /etc/chef/client.pem, which you told me to use to sign requests!
>
> Chef never successfully completed! Any errors should be visible in the
>
> output above. Please fix your recipes so that they properly complete.
>
>
>
>
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
Archive powered by MHonArc 2.6.16.