Last active
December 22, 2015 00:19
-
-
Save kvz/6388622 to your computer and use it in GitHub Desktop.
Please god no chef
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
# Executing ruby in a template in ruby | |
version=$(curl -s 'http://localhost:9200' | ruby -rubygems -e 'require "json"; print JSON.parse(STDIN.read)["version"]["number"]') | |
echo -e "\033[1;37;46melasticsearch $version running with PID $pid\033[0m" |
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
# If you can't report anything more useful than "Exception handlers complete", | |
# just show me the stacktrace already | |
[2013-08-30T12:55:41+02:00] ERROR: Running exception handlers | |
[2013-08-30T12:55:41+02:00] ERROR: Exception handlers complete | |
[2013-08-30T12:55:41+02:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out | |
[2013-08-30T12:55:41+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) |
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
# For just 42 cookbooks | |
ls -al cookbooks/ |wc -l | |
42 | |
# I'm adding 915 source files thanks to many layers of abstraction | |
find cookbooks/ |grep -v '\.git' |wc -l | |
915 | |
# To most companies, what is it really worth that you can deploy to redhat vs ubuntu. | |
# For this you're dragging much weight & abstraction around, more risks of bugs. | |
# And it's not like you could actually seemlesly deploy to redhat without some serious changes to your code/stack anyway |
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
# Sensible stack traces so you can easily tell why your deploy broke | |
vagrant@dev:~$ sudo cat /var/chef/cache/chef-stacktrace.out | |
Generated at Thu Aug 29 15:31:16 +0200 2013 | |
Chef::Exceptions::MultipleFailures: Chef::Exceptions::MultipleFailures | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout.rb:248:in `invalid!' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout.rb:234:in `error!' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/mixin/shell_out.rb:36:in `shell_out!' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/provider/service/init.rb:71:in `restart_service' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/provider/service.rb:115:in `action_restart' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/mixin/why_run.rb:52:in `call' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/mixin/why_run.rb:52:in `add_action' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/provider.rb:149:in `converge_by' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/provider/service.rb:114:in `action_restart' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/provider.rb:114:in `send' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/provider.rb:114:in `run_action' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/resource.rb:625:in `run_action' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/runner.rb:49:in `run_action' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/runner.rb:57:in `run_action' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/runner.rb:55:in `each' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/runner.rb:55:in `run_action' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/runner.rb:81:in `converge' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/runner.rb:81:in `each' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/runner.rb:81:in `converge' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/resource_collection.rb:98:in `execute_each_resource' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/resource_collection.rb:96:in `execute_each_resource' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/runner.rb:80:in `converge' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/client.rb:429:in `converge' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/client.rb:494:in `do_run' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/client.rb:199:in `run' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/client.rb:193:in `fork' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/client.rb:193:in `run' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/application.rb:183:in `run_chef_client' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/application/solo.rb:239:in `run_application' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/application/solo.rb:231:in `loop' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/application/solo.rb:231:in `run_application' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/../lib/chef/application.rb:66:in `run' | |
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-11.6.0/bin/chef-solo:25 | |
/opt/vagrant_ruby/bin/chef-solo:19:in `load' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment