User talk:Jch/consul: Difference between revisions
Line 61: | Line 61: | ||
echo "127.0.0.1:8600" > /etc/dnscache/servers/consul | echo "127.0.0.1:8600" > /etc/dnscache/servers/consul | ||
</pre> but one cannot specify the port in dnscache config :( | </pre> but one cannot specify the port in dnscache config :( | ||
It's not working!<br/> | |||
Will have to give a try to '''dnsmasq'''. | |||
=== DNSmasq with consul === | |||
=== Configuration Agent === | === Configuration Agent === |
Revision as of 20:17, 19 April 2015
This material is work-in-progress ... Do not follow instructions here until this notice is removed. |
Consul
Introduction
This page is currently my experimental log about consul on AL.
Downloaded package: consul-0.5.0-r0.apk from http://repos.mauras.ch/alpinelinux/x86_64/
Will prepare 5 KVM: 3 consul server (in run-from-ram mode) and 2 consul agent (a SAN (NBD) and a LXC host in data mode) on an isolated network.
We will experiment to find the right spec to allocate the consul servers for 100 to 1000 agents.
We plan to orchestrate our VM fleet based on consul events, envconsul and consul-template. All with ash scripts and smart setup.
We combine our PXE servers and the consul ones to inherit from the consul resilence (consul leader) to offer high-availability (HA) (but still in ram only) to the PXE service.
Install
We will just focus on the consul installation and configuration parts.
wget http://repos.mauras.ch/alpinelinux/x86_64/consul-0.5.0-r0.apk apk add consul-0.5.0-r0.apk --allow-untrusted --force
Configuration
Consul v0.5.0
Consul Protocol: 2 (Understands back to: 1)
By default, there are 4 files in /etc/consul
acl.json.sample encrypt.json.sample server.json tls.json.sample
Configuration Server
rc-service consul start
doesn't work even if
screen -m -d -S consul consul agent -config-dir=/etc/consul
does.
The HTTP API seems denied.
DNScache with consul
in /etc/conf.d/dnscache
IPSEND=0.0.0.0 CACHESIZE=1000000 IP=0.0.0.0 #HIDETTL= #FORWARDONLY= UPDATEHINTS=1
I would like to issue
echo "127.0.0.1:8600" > /etc/dnscache/servers/consul
but one cannot specify the port in dnscache config :(
It's not working!
Will have to give a try to dnsmasq.
DNSmasq with consul
Configuration Agent
We need to lauch the consul service after being able to read the IP address of the PXEserver involved.
This particuliar address will be used to join the consul cluster as agent.
# read IP addr of PXEserver # consul agent -join ${IP_PXEserver}
Bootstrap the consul cluster
Usage
Machines discovery
List machines = list members
list PXEservers = list servers
whois active.PXEservers = get leader
Services discoevry
Register service
List services
Cheks
Key/Value storage
k/v