I hereby claim:
- I am rhoml on github.
- I am rhoml (https://keybase.io/rhoml) on keybase.
- I have a public key whose fingerprint is 4289 50B6 1986 2303 5CE5 65EF 4D86 1C8B B81D C778
To claim this, I am signing this object:
# Documentation for HAProxy | |
# http://code.google.com/p/haproxy-docs/w/list | |
# http://haproxy.1wt.eu/download/1.2/doc/architecture.txt | |
# NOTES: | |
# open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems) | |
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice |
publicdns() { | |
EC2_DESCRIBE_INSTANCES=`which ec2-describe-instances | awk '{print $3}'` | |
EC2_DESCRIBE_GROUP=`which ec2-describe-group | awk '{print $3}'` | |
SECURITY_GROUP="$1" | |
AWS_CERT=~/.ec2/cert.pem | |
AWS_PK=~/.ec2/pk.pem | |
echo "This are the Available servers on ${SECURITY_GROUP} security group." | |
${EC2_DESCRIBE_INSTANCES} -C ${AWS_CERT} -K ${AWS_PK} | grep INSTANCE | grep `${EC2_DESCRIBE_GROUP} -C ${AWS_CERT} -K ${AWS_PK} ${SECURITY_GROUP} | head -1 | awk '{print $2}'` | awk '{print $4 }' | |
} |
#!/bin/bash | |
# | |
# USAGE: launch_ami | |
AMI_ID=ami-xxxx | |
KEY_ID=xxxxxx | |
INSTANCE_TYPE="t1.micro" | |
EC2_RUN_INSTANCES=`which ec2-run-instances` | |
EC2_DESCRIBE_INSTANCES=`which ec2-describe-instances` | |
SEC_ID="xxx-xxx" |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Simple reconfigure script to modify multiple nutcracker(twemproxy) servers in case of Redis | |
# Failover. | |
export PATH=/sbin:/usr/local/bin:$PATH | |
NAME=sentinel | |
LOGFILE=/opt/sentinel/logs/reconfigure.log | |
ERRORLOGFILE=/opt/sentinel/logs/reconfigure.error.log | |
NUTCRACKER_CONF=/opt/nutcracker/etc/nutcracker.yml |
#!/bin/bash | |
export PATH=/sbin:/usr/local/bin:$PATH | |
NAME=sentinel | |
LOGFILE=/opt/sentinel/logs/reconfigure.log | |
ERRORLOGFILE=/opt/sentinel/logs/reconfigure.error.log | |
NUTCRACKER_CONF=/opt/nutcracker/etc/nutcracker.yml | |
NUTCRACKERFAILOVER_CONF=/opt/nutcracker/etc/nutcrackerfailover.yml | |
NUTCRACKER_PORTs='22121,22123' | |
MASTER_NAME=$1 |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
#!/bin/bash | |
# <master-name> <role> <state> <from-ip> <from-port> <to-ip> <to-port> | |
export PATH=/sbin:/usr/local/bin:$PATH | |
NUTCRACKER_CONF='/opt/nutcracker/conf/nutcracker.yml' | |
NUTCRACKER_PORT=22121 | |
MASTER_NAME=$1 | |
ROLE=$2 | |
STATE=$3 | |
FROM_IP=$4 | |
FROM_PORT=$5 |
# | |
# This config file is a combination of ideas from: | |
# http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy | |
# http://www.igvita.com/2008/05/13/load-balancing-qos-with-haproxy/ | |
# http://wiki.railsmachine.com/HAProxy | |
# http://elwoodicious.com/2008/07/15/nginx-haproxy-thin-fastcgi-php5-load-balanced-rails-with-php-support/ | |
# http://upstream-berlin.com/2008/01/09/using-haproxy-with-multiple-backends-aka-content-switching/ | |
# http://wiki.railsmachine.com/HAProxy | |
# http://gist.github.com/raw/25482/d39fb332edf977602c183194a1cf5e9a0b5264f9 | |
# |