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
task :default => :build_gem | |
################################################################## | |
def run_command(cmd) | |
cmdrun = IO.popen(cmd) | |
output = cmdrun.read | |
cmdrun.close | |
if $?.to_i > 0 | |
puts "count not run #{cmd}, it returned an error #{output}" | |
exit 2 |
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
version = File.read("VERSION").strip | |
Gem::Specification.new do |s| | |
s.name = 'deployable_application' | |
s.version = version | |
s.platform = Gem::Platform::RUBY | |
s.summary = "an example of a project that can be deployed" | |
s.description = "Make something that can run in production" | |
s.author = "Joe Developer" | |
s.email = "[email protected]" |
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
module MCollective | |
module Agent | |
class Wrapit < RPC::Agent | |
##################################################################################### | |
metadata :name => "My Agent", | |
:description => "Example of how to wrap a command", | |
:author => "Me <[email protected]>", | |
:license => "DWYWI", | |
:version => "0.1", | |
:url => "http://blog.mague.com", |
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 | |
require 'rubygems' if RUBY_VERSION < "1.9" | |
require 'mcollective' | |
include MCollective::RPC | |
args = {} | |
action="" | |
options = rpcoptions do |parser, options| |
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 | |
require 'getoptlong' | |
require 'yaml' | |
#need to sync stdout with collectd execs! | |
$stdout.sync = true | |
if File.readable? '/etc/mcollective/facts.yaml' | |
facts=YAML::load(File.open('/etc/mcollective/facts.yaml')) | |
else |
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
############################################################### | |
# Puppet Controlled Default Template | |
############################################################### | |
FQDNLookup false | |
LoadPlugin syslog | |
<Plugin syslog> | |
LogLevel info | |
</Plugin> | |
LoadPlugin cpu | |
LoadPlugin disk |
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
sudo apt-get install python-cairo python-memcache python-sqlite memcached python-django-tagging python-django libapache2-mod-python apache2 libapache2-mod-wsgi git-core python-pyparsing python-tz libdbd-mysql-perl libmysqlclient-dev libmysqlclient18 mysql-client-5.5 mysql-client-core-5.5 mysql-common python-mysqldb | |
mkdir -p /var/tmp/software | |
cd /var/tmp/software | |
git clone https://github.com/graphite-project/graphite-web.git | |
git clone https://github.com/graphite-project/carbon.git | |
git clone https://github.com/graphite-project/whisper.git | |
for i in whisper carbon graphite-web; do |
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
### Keybase proof | |
I hereby claim: | |
* I am maguec on github. | |
* I am maguec (https://keybase.io/maguec) on keybase. | |
* I have a public key whose fingerprint is 713C 9A7F DD19 C992 3C2A F870 78B0 7C7D 855E B038 | |
To claim this, I am signing this object: |
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
input { | |
file { | |
path => "/home/chris/Code/LS_TEST/logstash-1.4.2/b.log" | |
type => "json_haproxy" | |
sincedb_path => "/tmp/since" | |
codec => "json" | |
} | |
} | |
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 | |
require 'json' | |
require 'uri' | |
require 'yaml' | |
require 'net/http' | |
require 'getoptlong' | |
args = { | |
:yaml => false, |
OlderNewer