furnish
Real-time Configuration Managment with Node.js
$ cnpm install furnish 
SYNC missed versions from official npm registry.

furnish

Furnish your machines with real-time configuration management.

Getting Started

Install Node.JS

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
source ~/.bashrc && nvm install v4.7.0

Install Furnish

npm install -g furnish

Run furnish against your scripts

furnish /path/to/my/scripts

Goals and TODOs

  • Furnish CLI should be easy to use. Pass it a directory, path to a script, or git repo to provision the plan
  • Build an all inclusive CLI with Node.js baked in (nexe?)
  • Wrap configuration methods in a class that is extended by various adapters. Default adapter could be a JSON file on the filesystem, while more advanced ones use Consul, FireBase, or MongoDB as the key/value store.
  • Adapters should support triggering events (ie, resources can subscribe to a configuration key)
  • Separate the CLI from the main Furnish library
  • Documentation. Document all the things with a doc generator.

CLI Goals

# Provision machine based on scripts in directory
furnish /path/to/directory

# Execute provisioning by calling script(s) directly 
furnish /path/to/file.js /path/to/file.coffee

Configuration Schema

{ 
  "resources" : {
    # Resource specific defaults
  },
  "environments" : {
    "development" : {
      # Environment specific overrides
    }
  },
  "machines" : {
    "hello-machine.local" : {
      # Machine specific overrides
    }
  }
}

When furnish accesses keys from the config data store resources are loaded first, followed by environment and then machine configs. In others words, resource configs are trumped by environment configs. Environment configs are trumped by machine specific configs. Example:

{ 
  "resources" : {
    "node.js" : {
      "version" : "v4.2.2"
    },
    "myApp" : {
      "version" : "latest"
    }
  },
  "environments" : {
    "development" : {
      "myApp" : {
        "version" : "1.0.0"
      }
    }
  },
  "machines" : {
    "hello-machine.local" : {},
    "hello-machine-two.local" : {
      "myApp" : {
        "version" : "1.0.1"
      }
    }
  }
}

hello-machine's configs would look like this:

{ 
  "node.js" : {
    "version" : "v4.2.2"
  },
  "myApp" : {
    "version" : "1.0.0"
  }
}

hello-machine-two's configs would look like this:

{ 
  "node.js" : {
    "version" : "v4.2.2"
  },
  "myApp" : {
    "version" : "1.0.1"
  }
}

Current Tags

  • 0.1.1                                ...           latest (3 years ago)

2 Versions

  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (9)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |