Skip to content

Instantly share code, notes, and snippets.

@MichaelSp
Created April 28, 2014 21:37
Show Gist options
  • Save MichaelSp/11384772 to your computer and use it in GitHub Desktop.
Save MichaelSp/11384772 to your computer and use it in GitHub Desktop.
Vagrant provisioning with chef
[default] Running provisioner: shell...
[default] Running: inline script
stdin: is not a tty
Reading package lists...
Building dependency tree...
Reading state information...
Skipping build-essential, it is already installed and upgrade is not set.
Skipping ruby1.9.1-dev, it is already installed and upgrade is not set.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[default] Running provisioner: shell...
[default] Running: inline script
stdin: is not a tty
[default] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
stdin: is not a tty
[2014-04-28T21:36:05+00:00] INFO: Forking chef instance to converge...
[2014-04-28T21:36:05+00:00] WARN:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle
attacks.
To fix this issue add an entry like this to your configuration file:
```
# Verify all HTTPS connections (recommended)
ssl_verify_mode :verify_peer
# OR, Verify only connections to chef-server
verify_api_cert true
```
To check your SSL configuration, or troubleshoot errors, you can use the
`knife ssl check` command like so:
```
knife ssl check -c /tmp/vagrant-chef-1/solo.rb
```
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[2014-04-28T21:36:05+00:00] INFO: *** Chef 11.12.2 ***
[2014-04-28T21:36:05+00:00] INFO: Chef-client pid: 6892
[2014-04-28T21:36:13+00:00] INFO: Setting the run_list to ["recipe[git]", "recipe[mysql::server]", "recipe[rbenv::system]", "recipe[rails_application]"] from CLI options
[2014-04-28T21:36:13+00:00] INFO: Run List is [recipe[git], recipe[mysql::server], recipe[rbenv::system], recipe[rails_application]]
[2014-04-28T21:36:13+00:00] INFO: Run List expands to [git, mysql::server, rbenv::system, rails_application]
[2014-04-28T21:36:13+00:00] INFO: Starting Chef Run for vagrant-ubuntu-trusty-64
[2014-04-28T21:36:13+00:00] INFO: Running start handlers
[2014-04-28T21:36:13+00:00] INFO: Start handlers complete.
[2014-04-28T21:36:15+00:00] INFO: WindowsPackage light-weight resource already initialized -- overriding!
[2014-04-28T21:36:15+00:00] WARN: Chef::Mixin::LanguageIncludeRecipe is deprecated, use Chef::DSL::IncludeRecipe
instead.
[2014-04-28T21:36:15+00:00] WARN: Called from:
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_nginx/providers/nginx_load_balancer.rb:21:in `class_from_file'
/var/lib/gems/1.9.1/gems/chef-11.12.2/lib/chef/mixin/from_file.rb:42:in `class_eval'
/var/lib/gems/1.9.1/gems/chef-11.12.2/lib/chef/mixin/from_file.rb:42:in `class_from_file'
================================================================================
Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_nginx/resources/nginx_load_balancer.rb
================================================================================
NameError
---------
uninitialized constant Chef::Resource::ApplicationBase
Cookbook Trace:
---------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_nginx/resources/nginx_load_balancer.rb:21:in `class_from_file'
Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_nginx/resources/nginx_load_balancer.rb:
14: # Unless required by applicable law or agreed to in writing, software
15: # distributed under the License is distributed on an "AS IS" BASIS,
16: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: # See the License for the specific language governing permissions and
18: # limitations under the License.
19: #
20:
21>> include Chef::Resource::ApplicationBase
22:
23: attribute :application_server_role, :kind_of => [String, Symbol, NilClass], :default => nil
24: attribute :template, :kind_of => [String, NilClass], :default => nil
25: attribute :server_name, :kind_of => [String, Array], :default => node['fqdn']
26: attribute :port, :kind_of => Integer, :default => 80
27: attribute :application_port, :kind_of => Integer, :default => 8000
28: attribute :application_socket, :kind_of => [Array, String, NilClass], :default => nil
29: attribute :static_files, :kind_of => Hash, :default => {}
30: attribute :ssl, :kind_of => [ TrueClass, FalseClass ], :default => false
[2014-04-28T21:36:15+00:00] ERROR: Running exception handlers
[2014-04-28T21:36:15+00:00] ERROR: Exception handlers complete
[2014-04-28T21:36:15+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-04-28T21:36:15+00:00] ERROR: uninitialized constant Chef::Resource::ApplicationBase
[2014-04-28T21:36:15+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment