Skip to content

Lightweight configuration management tool based on AWS Autoscaling Group

Notifications You must be signed in to change notification settings

AirVantage/overlord

Repository files navigation

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:

[template]
src = "haproxy.cfg.tmpl" #template used to generate configuration file (located in /etc/overseer/temlates/)
dest = "/etc/haproxy/haproxy.cfg" #file to generate from the template
hosts = ["my-asg"] #ASG to monitor
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:

defaults
    mode http
    timeout connect 5000ms
    timeout client 50000ms
    timeout server 50000ms

listen  my-app
	bind *:80
	bind *:443
	balance roundrobin
	{{range $index, $ip := index . "my-asg"}}server my-backend-{{$index}} {{$ip}}
	{{end}}