Create layers of ENV variables saved to etcd and deploy docker containers using them
$ npm install denver -g
denver will save ENV variables for a stack under a key in etcd.
it will merge stacks in order so one stack can inherit from another.
it will spit out stacks environment in a few useful formats.
create a new denver object using the options:
You can always use the envrionment variables to set these values:
var denver = ;var den =;
set a value for a stack
get a value from a stack
list all of the stacks
remove a stack from the db
get an object with the values for the environment that is created from merging the stacks array.
You can also just get a single stack env:
emitted when a value is set
emitted when a value is deleted
List the stack names we have environments for
$ denver ls
Remove a stack from the database
$ denver rm myapp
Print the value of a single environment variable
$ denver get myapp ADMIN_EMAIL
Write the value of a single environment variable
$ denver set myapp ADMIN_EMAIL email@example.com
Remove a value from an environment
$ denver del myapp ADMIN_EMAIL
Print the whole environment for a stack
$ denver env myapp
You can 'merge' several stacks with the env command - this lets you have 'global' envs or whatever:
$ denver env defaultenv myapp
When you merge - the last stack will take precendence - so myapp -> ADMIN_EMAIL would overwrite defaultenv -> ADMIN_EMAIL.
You can merge as many stacks as you want.
You can also print the environment in a docker friendly format:
$ denver docker defaultenv myapp
This would output:
-e ADMIN_EMAILfirstname.lastname@example.org -e HOSTNAME=bobthebuilder.com
Read env vars one per line from stdin
file - myenv.txt:
$ cat myenv.txt | denver inject myapp$ denver docker myapp
This would print:
-e HELLO=world -e ADMIN_EMAILemail@example.com