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
cpanm (App::cpanminus) 1.5018 on perl 5.010001 built for x86_64-linux-thread-multi | |
Work directory is /root/.cpanm/work/1348110064.19597 | |
You have make /usr/bin/make | |
You have LWP 6.04 | |
You have /bin/tar: tar (GNU tar) 1.23 | |
Copyright (C) 2010 Free Software Foundation, Inc. | |
使用許諾 GPLv3+: GNU GPL version 3 またはそれ以降 <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. |
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
#!/bin/sh | |
echo "test" |
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
#!/bin/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
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
#!/bin/sh | |
# | |
# sentinel - this script starts and stops the sentinel daemon | |
# | |
# chkconfig: - 86 14 | |
# description: Redis Sentinel is monitor and aut-failover for redis. | |
# processname: redis-sentinel | |
# config: /etc/redis/sentinel.conf | |
# config: /etc/sysconfig/redis-sentinel | |
# pidfile: /var/run/redis-sentinel.pid |
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
#!/bin/sh | |
IPADDR=`LANG=C ifconfig eth0 | sed -n '/.*inet addr:\([0-9.]*\).*/{s//\1/;p}'` | |
LOCK_FILE="/tmp/redis-failover.lock" | |
if [ "$#" = "7" ]; then | |
if [ ! -f ${LOCK_FILE} ]; then | |
touch ${LOCK_FILE} | |
if [ "$3" = "end" -a $6 = ${IPADDR} ]; then | |
/usr/bin/python /usr/local/sbin/redis-vpc-route-change.py |
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 python | |
# -*- coding: utf-8 -*- | |
import sys | |
import redis | |
import logging | |
import socket | |
import traceback | |
LOGFILE = "/var/log/redis-ha.log" |
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
#!/bin/sh | |
# redis-to-master.sh | |
PROG_NAME=$0 | |
HOSTNAME=`hostname -s` | |
logger -t ${PROG_NAME} "Start changing ${HOSTNAME} to redis master..." | |
logger -t ${PROG_NAME} "Change this host to master." | |
# up to master |
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
#!/bin/sh | |
# redis-to-slave.sh | |
PROG_NAME=$0 | |
HOSTNAME=`hostname -s` | |
REDIS_PORT=6379 | |
logger -t ${PROG_NAME} "Start changing ${HOSTNAME} to redis slave..." | |
if [ "$#" != "1" ]; then |
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 python | |
# -*- coding: utf-8 -*- | |
import sys | |
import boto.ec2 | |
from boto.ec2.connection import EC2Connection | |
from boto.vpc import VPCConnection | |
import logging | |
LOGFILE="/var/log/redis-ha.log" | |
# AWS CONFIGURATION |
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
daemonize yes | |
pidfile /var/run/redis.pid | |
port 6379 | |
timeout 0 | |
loglevel notice | |
logfile /var/log/redis.log | |
databases 16 | |
################################ SNAPSHOTTING ################################# | |
save 900 1 |
OlderNewer