Skip to content

Latest commit

 

History

History
104 lines (68 loc) · 2.34 KB

README.md

File metadata and controls

104 lines (68 loc) · 2.34 KB

oroboros

oroboros img

"In the age-old image of the uroboros lies the thought of devouring oneself and turning oneself into a circulatory process."

"They are centers of a mighty force, figures pregnant with an awful power…”

oroboros is a configuration engine that uses itself as the templating context of its string values

Available as a library or service, you can use it to enable dynamic configuration across your systems

usage

Using the web service, all configuration is stored in a user defined file hierarchy

Configs use themselves as their own templating context, so we can do things like:

# examples/simple/config.yaml
cat: 'tom'
mouse: 'jerry'
name: '{{ cat }} & {{ mouse }}'

By placing a named config next to the default config.yaml, we can provide context specific overrides

# examples/simple/jerry.yaml
name: '{{ mouse }} & {{ cat }}'

And fetch the rendered json config over http:

curl $oroboros/q?config=jerry | python -m json.tool
{
  "cat": "tom",
  "mouse": "jerry",
  "name": "jerry & tom"
}

web ui

A simple web ui is included for exploring configuration

ui

library

You can use oroboros as a library for jvm langs, here, in clojure:

(use 'oroboros.core)

(load-config "examples/simple")
;; => {:cat "tom", :mouse "jerry", :name "tom & jerry"}

(assoc (config) :x "{{y}}" :y 23)
;; => {:x "23" :y 23}

The same api is exposed for java & friends.

running

If you have docker installed::

docker run -v $PWD/examples:/etc/oroboros/configs -p 8080:80 egghead/oroboros

Or just grab a copy of the jar and run it in your config directory.

Check out the examples for more details

development

Building oroboros requires java7+, leiningen, & bower

bower install && lein do clean, ring uberjar

Once built, there are a few different ways to run oroboros in your environment.

Using fig for development:

fig up

Using lein:

lein trampoline ring server-headless

Once you have the server started, play around with editing the configs, or create some of your own.