User talk:Jch/consul: Difference between revisions

From Alpine Linux
Line 24: Line 24:
Then to reboot all KVM-PXE or at least adapt there config to use new repo.<br/>
Then to reboot all KVM-PXE or at least adapt there config to use new repo.<br/>
Then to start a LXC host.<br/>
Then to start a LXC host.<br/>
(then to start services and other KVM)
(then to start services and other KVM)<br/>


We will just focus on the consul installation and configuration parts.
We will just focus on the consul installation and configuration parts.


=== consul server ===
=== consul server ===
Alias '''KVM-PXE'''
It's a kind of paradox ;)<br/>
This machine is booting from PXE with dhcp...<br/>
And once up, it change itself to a static IP address (the one received by dhcp) and behave as a PXEserver but the dhcpd part inactive.<br/>
The dhcpd is activated manually (it means by a script from the "chef d'orchestre").<br/>


<pre>
<pre>
Line 35: Line 42:


==== First PXE server ====
==== First PXE server ====
It becomes consul leader by default


=== consul agent ===
=== consul agent ===

Revision as of 19:31, 18 April 2015

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.

Install

As we start from scratch and want to have an isolated network to run our tests, this topic is also an introduction to our new architecture for the cluster (the cloud).

The 5 machines defined to start our tests will be designed as a virtual cluster and bootstraped as it was a real cluster...
from a virtual laptop booting from a virtual USB stick.
This first "machine zero" to bootstrap the first PXE server, then to start 2nd and 3rd PXEservers.
Then to start a SAN.
Then to start a KVM-repo.
Then to reboot all KVM-PXE or at least adapt there config to use new repo.
Then to start a LXC host.
(then to start services and other KVM)

We will just focus on the consul installation and configuration parts.

consul server

Alias KVM-PXE

It's a kind of paradox ;)
This machine is booting from PXE with dhcp...
And once up, it change itself to a static IP address (the one received by dhcp) and behave as a PXEserver but the dhcpd part inactive.
The dhcpd is activated manually (it means by a script from the "chef d'orchestre").

apk add consul

First PXE server

It becomes consul leader by default

consul agent

apk add consul

Configuration

Configuration Server

Configuration Agent

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

Events

Define event

Watch event

Triggers