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
# etcd -peer-addr 127.0.0.1:7001 -addr 127.0.0.1:4001 \ | |
-data-dir /opt/etcd -name machine1 |
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
$ wget -O 0.3.0_linux_amd64.zip https://dl.bintray.com/mitchellh/consul/0.3.0_linux_amd64.zip | |
$ unzip ./0.3.0_linux_amd64.zip | |
# cp ./consul /usr/bin/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
$ wget -O 0.6.2_linux_amd64.zip https://dl.bintray.com/mitchellh/serf/0.6.2_linux_amd64.zip | |
$ unzip ./0.6.2_linux_amd64.zip | |
# cp ./serf /usr/bin/serf |
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
$ mkdir -p ~/go/src/github.com/armon | |
$ cd ~/go/src/github.com/armon | |
$ git clone git@github.com:armon/consul-kv.git |
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
{ | |
"dns_config": { | |
"service_ttl": { | |
"*": "5s", | |
"web": "30s" | |
} | |
"allow_stale": false , | |
"max_stale": "5s", | |
} | |
} |
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
$ dig @sakura1.pocketstudio.net -p 8600 web.service.sakura.consul | |
(略) | |
;; QUESTION SECTION: | |
;web.service.sakura.consul. IN A | |
;; ANSWER SECTION: | |
web.service.sakura.consul. 30 IN A 192.168.39.11 | |
web.service.sakura.consul. 30 IN A 192.168.39.13 |
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 | |
# | |
# munin-node Control the Munin Node Server (formerly Linpro RRD client) | |
# | |
# chkconfig: 2345 90 10 | |
# description: munin node agents | |
# processname: munin-node | |
# config: /etc/opt/munin/munin-node.conf | |
# pidfile: /var/run/munin/munin-node.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
# -*- makefile -*- | |
# | |
# This is the Makefile.config file to use for a "clean" distribution. | |
# | |
# This file specifies where Munin will look for things after you've | |
# run 'make' in the source directory. Modify it to suit your needs. | |
# DESTDIR is meant only for use when making Munin packages. Unless | |
# you're doing packaging do NOT set it. | |
# DESTDIR is empty during building, and optionally set to point to |
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/perl | |
# Serf configuration generator with Etcd | |
# | |
# MIT License | |
# 2014 Masahito Zembutsu | |
use JSON::XS; | |
use Net::HTTP; | |
use Data::Dumper; |
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/perl | |
use Encode; | |
use Spreadsheet::WriteExcel; | |
$serf = '/usr/bin/serf'; | |
my ($sec, $min, $hour, $day, $month, $year, $wday) = localtime; | |
$year += 1900; |