npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flipr-etcd-seed

v1.1.1

Published

Upload flipr config from yaml files to Etcd. Also handles validation.

Downloads

12

Readme

node-flipr-etcd-seed

Stability: 1 - Experimental

NPM

Build Status

This project is part of the flipr family.

Validate and upload your flipr configuration to Etcd, to be consumed by flipr-etcd. Understands YAML and JSON files.

The main use case for flipr-etcd-seed is storing config for all your environments in yaml/json files, putting those files in a git repository, using github's text editor to edit/commit changes to those config files, and using CI + flipr-etcd-seed to validate/push the changes to your etcd cluster. Once the config is pushed to your etcd cluster, your application's config will be automatically updated by flipr.

node-flipr

Usage

flipr-etcd-seed expects yaml/json files to be stored in a specific directory structure

-root_config_dir
 -common
  some_config.yml
 -dev
  other_config.yml
 -test
  blahblah.yml
 -stage
  any_name_works.yml
 -prod
  must_end_with_dot_yaml_or_yml.yaml
 -some_other_environment
  multiple_files_work.yml
  as_long_as_keys_are_unique.yml

You can name your environments and yaml files whatever you like (alphanumeric, underscores, dashes, no whitespace). common is reserved for configuration that does not change between environments. It will be added to config for all other environments. You can override keys defined in common in other environments. If you use multiple files in a single environment, the keys must be unique.

npm install -g flipr-etcd-seed

flipr-etcd-seed --config-path /some/path/to/config --host my.etcd.url.com --directory myapp --environment dev

Running those commands will install flipr-etcd-seed globally, grab all the yaml files in /some/path/to/config/common and /some/path/to/config/dev recursively, mash them together, validate them using flipr-validation, and upload the config to Etcd under ~v2/keys/flipr/myapp/dev.

flipr-etcd-seed --config-path /some/path/to/config --host my.etcd.url.com

Running that command will grab all yaml files in /some/path/to/config/common and /some/path/to/config/default recursively, mash them together, validate them using flipr-validation, and upload them to Etcd under ~v2/keys/flipr/default/config.

If you fail validation or receive any other error, nothing will be uploaded to Etcd.

Options

Use flipr-etcd-seed --help to see:

Usage: flipr-etcd-seed [options]

  Options:

    -h, --help                output usage information
    -V, --version             output the version number
    -c, --config-path <path>  REQUIRED - Path to directory containing config files
    -d, --directory <name>    RECOMMENDED - The etcd directory to save the config under.  Usually the name of your application.  Alphanumeric, hyphen, and underscore only, no whitespace. Default is "default"
    -h, --host <name>         RECOMMENDED - The ip/domain/hostname of your etcd server.  Default is "127.0.0.1".
    -e, --environment <name>  RECOMMENDED - The environment you are targetting.  Should match a directory under your config-path. Alphanumeric, hyphen, and underscore only.  Default is "default"
    -k, --key <name>          The etcd key to save the config under.  Typically the environment you are targetting. Alphanumeric, hyphen, and underscore only, no whitespace. Default is "config"
    -p, --port <int>          The port your etcd server is listening on.  Default is 4001.
    -f, --format <type>       Config file format.  Accepts "json" or "yaml".  Defaults to "yaml".
    -C, --console             Output config to console instead of sending to host.  Defaults to off.

Other Stuff

  • You can use flipr-etcd-seed programatically. Check out the sample section.
  • We don't support SSL when communicating with Etcd just yet. We plan to in the future.