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
%w{libmysqlclient16 mysql-common}.each do |pkg| | |
script "uninstall_default_mysql" do | |
only_if "dpkg -s #{pkg}" | |
interpreter "bash" | |
user "root" | |
cwd "/tmp" | |
code <<-EOH | |
apt-get remove -y pkg | |
apt-get -y autoremove | |
EOH |
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
# cat create_mysql_symlinks.sh | |
PORT=$1 | |
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_bin_relay_log | |
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_commands | |
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_connections | |
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_files_tables | |
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_innodb_bpool | |
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_innodb_bpool_act | |
ln -s /usr/share/munin/plugins/mysql_ mysql_${PORT}_innodb_checkpoint_age |
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
[client] | |
port = 3306 | |
socket = /var/lib/mysql/m0/mysqld.sock | |
# Here is entries for some specific programs | |
# The following values assume you have at least 32M ram | |
# This was formally known as [safe_mysqld]. Both versions are currently parsed. | |
[mysqld_safe] | |
socket = /var/lib/mysql/m0/mysqld.sock |
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 python | |
import os | |
from libcloud.types import Provider | |
from libcloud.providers import get_driver | |
from libcloud.base import NodeImage, NodeSize | |
EC2_ACCESS_ID = 'xxxxxxxxxxxxxxxxxxxxx' | |
EC2_SECRET_KEY = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' | |
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 python | |
from libcloud.types import Provider | |
from libcloud.providers import get_driver | |
EC2_ACCESS_ID = 'xxxxxxx' | |
EC2_SECRET_KEY = 'yyyyyyyyyyyyyyyyyyyyyyyyyy' | |
EC2Driver = get_driver(Provider.EC2) | |
conn = EC2Driver(EC2_ACCESS_ID, EC2_SECRET_KEY) |
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
import logging | |
import os | |
import tornado.escape | |
import tornado.httpclient | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.options | |
import tornado.web |
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' | |
require 'chef' | |
require 'chef/client' | |
require 'chef/run_context' | |
Chef::Config[:solo] = true | |
Chef::Config[:log_level] = :info | |
Chef::Log.level(:info) |
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
import os, sys, time | |
from socket import gethostname | |
from optparse import OptionParser | |
from grizzled.os import daemonize | |
PYTHON_BINARY = "python" | |
PATH_TO_PYTHON_BINARY = "/usr/bin/%s" % PYTHON_BINARY | |
PATH_TO_PYTHON_BINARY = "/opt/tornado/myvenv/bin/python" | |
ROTATELOGS_CMD = "/usr/sbin/rotatelogs" | |
LOGDIR = "/opt/tornado/logs" |
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
{ | |
"JobFlows": [ | |
{ | |
"LogUri": "s3n:\/\/somebucket.yourcompany.com\/logs\/", | |
"Name": "test1", | |
"BootstrapActions": [], | |
"SupportedProducts": [], | |
"ExecutionStatusDetail": { | |
"EndDateTime": null, | |
"CreationDateTime": 1320167627.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
#!/bin/bash | |
TIMESTAMP=`date "+%Y%m%d%H%M"` | |
EMR_DIR=/opt/emr | |
LOG_FILE=$EMR_DIR/run_emr_cluster.log.$TIMESTAMP | |
START=`date "+%Y-%m-%d %H:%M"` | |
echo $START > $LOG_FILE |