This file contains 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
{ "client": | |
"keepalive": { | |
"handlers": [ "default" ] | |
} | |
} |
This file contains 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
compute.log:2013-08-21 17:14:32.202 85382 INFO nova.virt.libvirt.driver [-] [instance: bbee0369-9be1-4ca3-9fd4-43759d47ae22] Instance running successfully. | |
compute.log:2013-08-21 17:14:32.305 85382 INFO nova.compute.manager [-] [instance: bbee0369-9be1-4ca3-9fd4-43759d47ae22] During sync_power_state the instance has a pending task. Skip. | |
compute.log:2013-08-21 17:17:34.099 85382 INFO nova.compute.manager [-] Lifecycle event 1 on VM bbee0369-9be1-4ca3-9fd4-43759d47ae22 | |
compute.log:2013-08-21 17:17:35.206 85382 WARNING nova.compute.manager [-] [instance: bbee0369-9be1-4ca3-9fd4-43759d47ae22] Instance shutdown by itself. Calling the stop API. | |
compute.log:2013-08-21 17:17:35.542 85382 INFO nova.virt.libvirt.driver [-] [instance: bbee0369-9be1-4ca3-9fd4-43759d47ae22] Instance destroyed successfully. |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am grepory on github. | |
* I am grepory (https://keybase.io/grepory) on keybase. | |
* I have a public key whose fingerprint is 18E5 DF6A 251A BB85 2482 7990 F272 9497 27A5 2E46 | |
To claim this, I am signing this object: |
This file contains 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
{ | |
"api": { | |
"dc1": { | |
"host": "server.dc1" | |
}, | |
"dc2": { | |
"host": "server.dc2" | |
} | |
} | |
} |
This file contains 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 | |
# | |
# Sensu Handler: mailer | |
# | |
# This handler formats alerts as mails and sends them off to a recipient, | |
# either defined in the check (optional) or default to a prefined value. | |
# | |
# Required: mailer.json that should have at least, mail_to and mail_from | |
# | |
# Optional: checks can contain, mail_to, mail_from, and mail_subject that |
This file contains 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
__split () { | |
local arr=$1 | |
local new_ifs=$2 | |
if [ -z $arr ]; then | |
echo "__split must be called with at least one argument" && exit 1 | |
fi | |
if [ ! -z $new_ifs ]; then | |
IFS="$new_ifs" read -ra $arr |
This file contains 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
We're talking about service orchestration, and that is a thing that is | |
near and dear to my heart. I'd like to introduce you to the semaphore primitive | |
that I want to add to Chef, some chef pseudocode for you and an explanation of | |
how I envision it operating: | |
current_services = node.current_services | |
services = get_services(node.fqdn) | |
services.each do |svc| | |
service_data = get_service_data(svc, node.environment) | |
semaphore_acquire "deploy/#{svc}/#{node.environment}" do |
This file contains 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
** Reason for termination == | |
** {{case_clause, | |
{{{value, | |
{15825, | |
{publish,<0.1876.1333>, | |
{message_properties,undefined,false}, | |
{basic_message, | |
{resource,<<"/outbound-dev-rabbitmq">>,exchange, | |
<<"outbound.generation.exchange">>}, | |
[<<"outbound.generation.4bcc31a4-557b-46dd-86a5-efbaecc77f7b.EMAIL">>], |
This file contains 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
deploy 'myservice' do | |
only_if { get_lock('myservice_counter_lock').got_lock? } | |
notify 'ruby_block[increment_myserver_counter]' | |
end | |
ruby_block 'increment_myservice_counter' do | |
action :nothing # this is so that it is only run on notify | |
block do | |
get_counter('myservice_counter').increment | |
end |
This file contains 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 | |
require 'yaml' | |
results_file = ARGV[-1] | |
results = YAML.load_file(results_file) | |
blocksize = results.first.last['blocksize'] | |
bytes_written = results.first.last['bytes_written'] | |
avg_bytes_per_sec = results.map { |r| Float(r.last['bytes_per_sec']) }.reduce(:+) / results.length |
OlderNewer