Socket
Socket
Sign inDemoInstall

furnish

Package Overview
Dependencies
184
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    furnish

Real-time Configuration Managment with Node.js


Version published
Weekly downloads
3
Maintainers
1
Install size
8.86 MB
Created
Weekly downloads
 

Readme

Source

furnish

Furnish your machines with real-time configuration management.

  • Documentation
  • Source
  • Examples

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"
  }
}

Keywords

FAQs

Last updated on 20 Dec 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc