Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
#
# Checks the number of in service nodes in an AWS ELB
# ===
#
# DESCRIPTION:
# This plugin checks an AWS Elastic Load Balancer to ensure a minimum number
# or percentage of nodes are InService on the ELB
#
# PLATFORMS:
deploy node[:deploy_root] do
repo "git@github.com:xxxxxxx/#{node[:app_name]}.git"
revision rev
user "ubuntu"
group "ubuntu"
enable_submodules true
migrate false
symlink_before_migrate({ "config/dot_env" => ".env"})
environment "RAILS_ENV" => node[:rails_env]
shallow_clone true
RuntimeError: Digest::Base cannot be directly inherited in Ruby
[2014-08-12T11:39:54-07:00] DEBUG: Re-raising exception: RuntimeError - Digest::Base cannot be directly inherited in Ruby
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/digester.rb:51:in `new'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/digester.rb:51:in `generate_md5_checksum_for_file'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/digester.rb:47:in `generate_md5_checksum_for_file'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/cookbook_version.rb:76:in `checksum_cookbook_file'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/cookbook/synchronizer.rb:224:in `cached_copy_up_to_date?'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/cookbook/synchronizer.rb:211:in `sync_file'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/cookbook/synchronizer.rb:141:in `block (2 levels) in sync_cookbooks'
## Cornice migration phase one
ALTER TABLE engagements ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE engagement_interactions ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE tracking_events ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE tracking_events ADD COLUMN creative_id integer DEFAULT NULL encode RAW;
ALTER TABLE partner_revenue_events ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE advertiser_cost_events ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE session_recordings ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE engagement_quality_calculations ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE feedbacks ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
"host": "myhostname",
"port": 5671,
"vhost": "/sensu",
"user": "sensu",
"password": "password",
"ssl": {
"cert_chain_file": "/etc/sensu/ssl/cert.pem",
"private_key_file": "/etc/sensu/ssl/key.pem"
}
upstream my_domain {
server unix:///home/ubuntu/apps/my_old_domain/shared/puma/my_old_domain.sock;
}
server {
listen 80;
server_name my.old_domain.com;
return 301 http://my.new_domain.com$request_uri;
}
set_unless[:ruby_enterprise][:install_path] = "/opt/ruby-enterprise"
set_unless[:ruby_enterprise][:ruby_bin] = "/opt/ruby-enterprise/bin/ruby"
set_unless[:ruby_enterprise][:gems_dir] = "#{ruby_enterprise[:install_path]}/lib/ruby/gems/1.8"
set_unless[:ruby_enterprise][:version] = '1.8.7-2009.10'
set_unless[:ruby_enterprise][:url] = "http://rubyforge.org/frs/download.php/66162/ruby-enterprise-#{ruby_enterprise[:version]}"
subversion/libsvn_subr/io.c: In function 'do_io_file_wrapper_cleanup':
subversion/libsvn_subr/io.c:2737: warning: format not a string literal and no format arguments
subversion/libsvn_client/diff.c: In function 'diff_content_changed':
subversion/libsvn_client/diff.c:563: warning: 'svn_io_run_diff' is deprecated (declared at ./subversion/include/svn_io.h:1300)
subversion/libsvn_wc/merge.c: In function 'do_text_merge_external':
subversion/libsvn_wc/merge.c:399: warning: 'svn_io_run_diff3_2' is deprecated (declared at ./subversion/include/svn_io.h:1371)
subversion/libsvn_wc/props.c: In function 'svn_wc__merge_props':
subversion/libsvn_wc/props.c:1957: warning: 'svn_wc__loggy_append' is deprecated (declared at subversion/libsvn_wc/log.h:75)
subversion/libsvn_ra/compat.c: In function 'svn_ra__get_deleted_rev_from_log':
subversion/libsvn_ra/compat.c:852: warning: 'svn_path_url_add_component' is deprecated (declared at ./subversion/include/svn_path.h:540)
svn_version = "1.6.5"
svn_dir = "/tmp/svn-#{svn_version}"
directory "#{svn_dir}" do
owner "root"
group "root"
mode "0755"
action :create
not_if "test -d #{svn_dir}"
end
# http://packages.ubuntu.com/karmic/subversion installing the karmic version :
[Thu, 14 Jan 2010 03:16:45 +0000] INFO: Starting Chef Run
[Thu, 14 Jan 2010 03:16:49 +0000] INFO: Storing updated cookbooks/subversion/recipes/1_6.rb in the cache.
[Thu, 14 Jan 2010 03:16:49 +0000] WARN: service[apache2]: falling back to process table inspection
[Thu, 14 Jan 2010 03:16:49 +0000] WARN: service[apache2]: attempting to match 'apache2' ((?-mix:apache2)) against process list
[Thu, 14 Jan 2010 03:16:51 +0000] WARN: service[apache2]: falling back to process table inspection
[Thu, 14 Jan 2010 03:16:51 +0000] WARN: service[apache2]: attempting to match 'apache2' ((?-mix:apache2)) against process list
[Thu, 14 Jan 2010 03:17:45 +0000] INFO: Ran execute[Setup passenger to use ruby enterprise] successfully
[Thu, 14 Jan 2010 03:17:52 +0000] INFO: remote_file[/usr/src/subversion-1.6.6.tar.bz2]: Creating /usr/src/subversion-1.6.6.tar.bz2
[Thu, 14 Jan 2010 03:17:59 +0000] INFO: Ran execute[unarchive] successfully
[Thu, 14 Jan 2010 03:18:15 +0000] INFO: Ran execute[configure] successfully