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 -x | |
# version | |
version="0.11.8" | |
# backup | |
cd /var/www/ghost | |
sudo tar cpf /tmp/ghost_snapshot_$(date +%Y%m%d%H%M).tar . | |
# download latest ghost |
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/bash | |
# | |
# chkconfig: - 58 74 | |
# description: masterha_manager is master monitoring and running failover automatically in case of master down | |
# processname: masterha_manager | |
# pidfile: /var/lib/mysql/master1.pid | |
# config: /etc/masterha_default.cnf | |
# source profile | |
. /etc/profile |
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/ruby | |
require 'uri' | |
require 'open-uri' | |
require 'net/http' | |
open('http://data.iana.org/TLD/tlds-alpha-by-domain.txt') {|f| | |
f.each_line {|line| | |
next line if %r(^#) =~ line | |
url = "http://kunishima.#{line}" |
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 perl | |
# Copyright (C) 2011 DeNA Co.,Ltd. | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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
server=/consul/127.0.0.1#8600 |
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
check process consul | |
with pidfile "/var/run/consul.pid" | |
start program "/etc/init.d/consul start" | |
stop program "/etc/init.d/consul stop" |
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 | |
sudo yum install -y wget unzip | |
# add consul binary | |
wget --no-check-certificate -O /tmp/consul.zip https://releases.hashicorp.com/consul/0.6.0/consul_0.6.0_linux_amd64.zip | |
sudo unzip /tmp/consul.zip -d /usr/local/sbin | |
sudo rm -f /tmp/consul.zip | |
sudo chmod 755 /usr/local/sbin/consul |
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 | |
# install depend packages | |
sudo yum install -y epel-release wget | |
sudo yum install -y perl-DBD-MySQL | |
sudo yum install --enablerepo=epel -y perl-Config-Tiny perl-Log-Dispatch perl-Parallel-ForkManager | |
# install mha-node | |
wget --no-check-certificate -O /tmp/mha4mysql-node-0.56-0.el5.noarch.rpm https://72003f4c60f5cc941cd1c7d448fc3c99e0aebaa8.googledrive.com/host/0B1lu97m8-haWeHdGWXp0YVVUSlk/mha4mysql-node-0.56-0.el5.noarch.rpm | |
sudo rpm -ivh /tmp/mha4mysql-node-0.56-0.el5.noarch.rpm |
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
{ | |
"variables": { | |
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", | |
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}" | |
}, | |
"builders": [ | |
{ | |
"type": "amazon-ebs", | |
"access_key": "{{user `aws_access_key`}}", |
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
{ | |
"builders": [ | |
{ | |
"type": "virtualbox-ovf", | |
"source_path": "my_box.ova", | |
"ssh_username": "vagrant", | |
"ssh_password": "vagrant", | |
"shutdown_command": "echo 'vagrant' | sudo -S /sbin/shutdown -h now" | |
} | |
], |