node package manager

tm-consul-cluster-manager

Trinity mirror, configuration manager. watches consul KV store, and writes out the configuration files. Manages the PM2 cluster, by restarting the scripts

Tm-consul-cluster-manager

Trinity mirror cluster manager, tied to Hashicorp consul for configuration management.

processes

Watches a consul KV endpoint, For a configuration file list, defined as a JSON array. Contacts those KV endpoints and downloads and writes out the NodeJS configuration files for the scripts to consume. Upon either modification or startup, manages the PM2 process manager to start or restart the cluster.Cluster is defined from a pm2.json file.

Set the enviroment variable

CONSUL_URL=http://192.168.99.100:8500/v1/kv/configmanifest

This is the config manifest file list which is defined as such

 
[{
    "key": "development",
    "dest": "config/development.js"
}]
 

This will then load the value store in the 'key' attribute, and save it in to the specified 'dest' file

see example/master.js