こわくないConsul
事前に、ワークショップ用のサンプルプロジェクトをチェックアウトし、VMの作成だけしておきましょう。 --no-provision
でお願いします!
#!/bin/bash | |
access_key_id=$1 | |
access_key_secret=$2 | |
instance_id=$3 | |
dbname=$4 | |
start_time=$5 | |
end_time=$6 | |
now=`date -u "+%Y-%m-%dT%H:%M:%SZ"` | |
signature_nonce=`openssl rand -hex 8` |
#!/bin/sh | |
# Fix NTP/Time | |
# https://github.com/boot2docker/boot2docker/issues/290 | |
boot2docker ssh -- sudo killall -9 ntpd | |
boot2docker ssh -- sudo ntpclient -s -h pool.ntp.org | |
boot2docker ssh -- sudo ntpd -p pool.ntp.org |
module("resty.consul", package.seeall) | |
_VERSION = '0.1.0' | |
function service_nodes(service) | |
local http = require "resty.http" | |
local json = require "cjson" | |
local hc = http:new() | |
local upstream = "" |
{ | |
"name": "Root", | |
"children": [ | |
{ | |
"name": "Branch 1", | |
"children": [ | |
{"name": "Leaf 3"}, | |
{"name": "Leaf 4"} | |
] | |
}, |
#!/bin/bash | |
# | |
# consul Manage the consul agent | |
# | |
# chkconfig: 2345 95 95 | |
# description: Consul is a tool for service discovery and configuration | |
# processname: consul | |
# config: /etc/consul.conf | |
# pidfile: /var/run/consul.pid |
更新: | 2013-12-27 |
---|---|
バージョン: | 1.5.1 |
作者: | @voluntas |
URL: | http://voluntas.github.io/ |
##Connection Timeout または No route to host
###ヘルスチェックステータス1/2
OSレベルでの問題が起きています。
→ インスタンスをRebootしてみましょう。
###ヘルスチェックステータスが0/2
物理ホスト障害の可能性があります。
→ インスタンスをStop/Startしてみましょう(別の物理ホストに移動させる事ができます)
※ Stoppingの状態で停止しない場合には、force stopを行います(Management Consoleから2回目のstop/ec2-stop-instances --force i-xxxxxxxx)
################################################################## | |
# /etc/elasticsearch/elasticsearch.yml | |
# | |
# Base configuration for a write heavy cluster | |
# | |
# Cluster / Node Basics | |
cluster.name: logng | |
# Node can have abritrary attributes we can use for routing |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: