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
{ | |
"bootstrap_expect": 1 , | |
"server": true, | |
"data_dir": "/var/consul", | |
"bind_addr": "127.0.0.1", | |
"client_addr": "0.0.0.0" | |
} |
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
FROM centos:5.11 | |
RUN \ | |
yum install -y curl wget unzip && \ | |
wget --no-check-certificate -O consul.zip https://releases.hashicorp.com/consul/0.6.0/consul_0.6.0_linux_amd64.zip && \ | |
unzip consul.zip && \ | |
rm -f consul.zip && \ | |
mv consul /usr/local/sbin && \ | |
chmod 755 /usr/local/sbin/consul && \ | |
curl https://gist.githubusercontent.com/Lorentzca/98c7e00b3313155a53e2/raw/consul > /etc/init.d/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
{ | |
"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" | |
} | |
], |
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
#!/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
#!/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
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
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
#!/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
#!/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}" |