Skip to content

Instantly share code, notes, and snippets.

@inthecloud247
inthecloud247 / flume-site-agent.xml
Created July 26, 2012 05:23 — forked from elubow/flume-site-agent.xml
Flume Configuration files
<!-- a1 (agent) -->
<configuration>
<property>
<name>flume.master.servers</name>
<value>$master_IP</value>
<description>This is the address for the config servers status server (http)</description>
</property>
<property>
<name>flume.collector.event.host</name>
#!/bin/bash
# [Purpose]
# execute a command on remote servers
# note: we are basically rolling our own pssh here, without the parallelism
#Example: command.sh -tv -c "date" server1 special@server2 server3
# command.sh -tv -c "date" -i key.pem -l "user" server1 special@server2 server3
# command.sh -tv -i key.pem server2 server3 < get_date.sh
# command.sh -tbv -l cap -i ~/keys/cap.pem ${app_[@]} < build.sh
@inthecloud247
inthecloud247 / populate_dns.py
Created June 5, 2012 08:02 — forked from jawnb/populate_dns.py
Script to populate route53 DNS records from ec2 instance id and instance names.
#!/usr/bin/env python
import boto
from boto.route53.record import ResourceRecordSets
import logging
conn = boto.connect_ec2()
DNS_EXCLUSION_TAG = 'ExcludeFromDNS' # If this tag exists on an instance, no DNS values will be populated
DNS_TAGS = ['ShortName', 'Name'] # This is the list of instance tags we want to populate DNS entries from
DNS_SUFFIX = 'YOUR_SUBDOMAIN_HERE' # Suffix under which to create DNS records
ROUTE53_ZONE_ID = 'YOUR_ZONE_ID_HERE' # The zone id from route53 of the zone we will be adding these entries under
@inthecloud247
inthecloud247 / gist:2834888
Created May 30, 2012 09:13 — forked from ewheeler/gist:1262989
flask + tornado + nginx + supervisord
# create stub, then run flask app in tornado on port 5000 (perhaps with supervisord config below http://supervisord.org/index.html)
#!/usr/bin/env python
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from myflaskapp import app
http_server = HTTPServer(WSGIContainer(app))