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
diff --git a/lib/chef-deploy/cached_deploy.rb b/lib/chef-deploy/cached_deploy.rb | |
index f9ea7b4..9226497 100644 | |
--- a/lib/chef-deploy/cached_deploy.rb | |
+++ b/lib/chef-deploy/cached_deploy.rb | |
@@ -11,6 +11,7 @@ class CachedDeploy | |
if @configuration[:revision] == '' | |
@configuration[:revision] = source.query_revision(@configuration[:branch]) {|cmd| ru | |
end | |
+ return if check_current_revision_and_noop_if_same(@configuration[:revision]) | |
Chef::Log.info "deploying branch: #{@configuration[:branch]} rev: #{@configuration[:rev |
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
# JSON | |
{ | |
"applications": [ | |
{ | |
"foobar": { | |
"migration_command": "rake db:migrate", | |
"branch": "HEAD", | |
"deploy_action": "deploy", | |
"framework_env": "production", |
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
function start_agent { | |
echo "Initializing new SSH agent..." | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} | |
echo succeeded | |
chmod 600 ${SSH_ENV} | |
. ${SSH_ENV} > /dev/null | |
/usr/bin/ssh-add; | |
} |
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
#!/usr/bin/env ruby | |
# solo.rb | |
def usage(message) | |
$stderr.puts message | |
$stderr.puts | |
$stderr.puts "#{File.basename($0)} envname [migrate]" | |
exit 1 | |
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
class Chef | |
class Resource | |
class ManagedTemplate < Template | |
def initialize(name, collection=nil, node=nil) | |
super(name, collection, node) | |
not_if { ::File.exists?(name.sub(/(.*)(\/)/, '\1/noclobber.')) } | |
end | |
end | |
end | |
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
diff --git a/app/controllers/reporting.rb b/app/controllers/reporting.rb | |
index 3a6768f..662bdd9 100644 | |
--- a/app/controllers/reporting.rb | |
+++ b/app/controllers/reporting.rb | |
@@ -24,34 +24,6 @@ class Reporting < Application | |
if instance.status == :running | |
Merb.logger.error! "instance(#{instance.amazon_id}) ALERT!\n SEVERITY: #{params[:data]['Severity']}\n PLUGIN:#{params[:data]['Plugin']} TYPE:#{params[:data]['Type']}\n MESSAGE:#{params[:data]['alert_message']}" | |
Alert.create_from_json(instance, params['data']) | |
- environment = Environment.get instance.environment.id | |
- if environment.alerting_enabled |
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
# /etc/ey-alerts.json | |
{"skip":[ | |
"mysqld" | |
], | |
"check":[ | |
"ttsrv" | |
]} |
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
== re-grid | |
the RabbitMq Elastic Grid | |
<head node> | |
<head agent> | |
<rabbitmq broker> | |
<worker node> | |
<worker agent> | |
<worker agent> |
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
upstream unicorn { | |
server unix:/data/app/current/tmp/sockets/unicorn.sock fail_timeout=0; | |
} |
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
~/rubinius > bin/rbx | |
irb(main):001:0> require 'rubygems' | |
=> true | |
irb(main):002:0> require 'redis' | |
=> true | |
irb(main):003:0> r = Redis.new | |
=> #<Redis:0x724 @opts={:db=>0, :port=>"6379", :host=>"localhost"} @db=0 @server=<Redis::Server: localhost:6379 (NOT CONNECTED)>> | |
irb(main):004:0> r['foo'] = 'bar' | |
=> "bar" | |
irb(main):005:0> r['foo'] |