项目作者: AirVantage

项目描述 :
Lightweight configuration management tool based on AWS Autoscaling Group
高级语言: Go
项目地址: git://github.com/AirVantage/overlord.git
创建时间: 2015-08-03T10:09:47Z
项目社区:https://github.com/AirVantage/overlord

开源协议:

下载


overlord

overlord is a lightweight configuration management tool focused on:

  • keeping local configuration files up-to-date reagarding AWS Autoscaling Group (ASG).
  • reloading applications to pick up new config file changes

It’s heavily inspired by confd.

Getting Started

  1. Download latest release of overlord binaries: here.
  2. Create a configuration file for your application in /etc/overlord/resources/. This toml file (it has to have the .toml extension) describes the ASG to monitor, the configuration file to keep up-to-date and how to restart the application.
  3. Create a template of your application’s configuration file in /etc/overlord/temlates/ in golang format.

Here is an example with an HAProxy configuration:

/etc/overlord/resources/haproxy.toml:

  1. [template]
  2. src = "haproxy.cfg.tmpl" #template used to generate configuration file (located in /etc/overseer/temlates/)
  3. dest = "/etc/haproxy/haproxy.cfg" #file to generate from the template
  4. hosts = ["my-asg"] #ASG to monitor
  5. reload_cmd = "touch /var/run/haproxy.pid; haproxy -D -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid)" #command to reload the configuration

/etc/overlord/temlates/haproxy.cf.tmpl:

  1. defaults
  2. mode http
  3. timeout connect 5000ms
  4. timeout client 50000ms
  5. timeout server 50000ms
  6. listen my-app
  7. bind *:80
  8. bind *:443
  9. balance roundrobin
  10. {{range $index, $ip := index . "my-asg"}}server my-backend-{{$index}} {{$ip}}
  11. {{end}}