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

iprofilesync

v1.0.5

Published

profiles synchronisation tools (file/chef/puppet/vmware/aws/...) -> (file/iterm2/...)

Downloads

42

Readme

iprofilesync dynamic profil exporter

Code Climate Test Coverage NPM dependencies

Prerequisites :

* node (tested with v5.1.0)
* for file usage :
      * nothing
* for chef usage :
      * correct knife configuration (tested with last knife/Chef)
      * or user name / private key and server url
* for aws usage (EC2 instances) :
      * access_key_id / secret_access_key
      * region list where you have EC2 instances
      * directory with your aws pem key or single key pem or be sure to have access with your private key
* for puppet usage : (*TODO*)
      * credentials
* for vmware usage : (*TODO*)
      * credentials

All dependencies are included in node_modules/ in a correct version and describe in package.json you can show it with npm list.

Actually we use 2 npm modules customized for assure correct behavior :

* iprofilesync-chef (0.3.0-custom) => I replace forsake usage by rsautl wrapper module customized by myself
to be synchronous (if no callback provided)
* iprofilesync-commander (2.3.0-custom) => I would like a "interactive cli" not really functionnal in commander default

Installation

npm install iprofilesync

or

git clone https://github.com/jeremydenoun/iprofilesync.git

Usage

iprofilesync is a command line tool build for sync a data repository with another tools.

We have 4 process steps :

  • import data (adapter) - available in src/adapter/*
  • launch check (checker) - available in src/checker/*
  • format for export (indexer) - available in src/indexer/*
  • write it (exporter) - available in src/exporter/*

With a simple configuration you can execute task like :

  • generate/sync a CMDB or inventory
  • check your SSH connectivity
  • Auto Tag your data
  • export your hosts into specific format (simple file, iTerm2 dynamic profile)

A cli is available for all command :

node iprofilesync.js
#>

You can get available command with help command :

node iprofilesync.js
#> help

  Usage:  [options] [command]

  Commands:

    check [options] <service> <users> <host>
       execute "service" check on remote host

    list <service>
       fetch host list from service adapter using config/profile/{service}.conf

    config <service> [pattern]
       display config (pattern key based) for services config/profile/{service}.conf

    sync [options] <service>
       launch sync based on service config/profile/{service}.conf

    help
       display help

  Options:

    -h, --help     output usage information
    -V, --version  output the version number
    -q, --quiet    silent mode

You can launch command with cli or directly with command line :

node iprofilesync.js config default
{ adapter: 'default',
  checker: 'default',
  indexer: 'default',
  exporter: 'default' }

node iprofilesync.js sync --help
  Usage: sync [options] <service>

  Options:

    -h, --help   output usage information
    -d, --debug  Debug display

  Examples:

    $ sync default

node iprofilesync sync chef
=> "~/Library/Application Support/iTerm2/DynamicProfiles/chef.plist"
export completed for chef : 42 nodes exported

Configuration

You should write your own configuration into config/profile/ directory and use it like a service into command line.

Some common demo configuration are available on config/profile/demo*.json, you can find below a complete configuration but only [MANDATORY] field are needed, the [RECOMMENDED] field are recommended (depending your usage) and the others are optionnal.

You can find more configuration here

Quick Start

chef => iterm2 usage

cd config/profile
cp demo-chef.json chef.json
#edit chef.json and fill {...} field (access, path, ..)
cd ../..
node iprofilesync.js sync -d chef # for debug version
node iprofilesync.js sync chef # for short version

Known Issues

* Checker SSH - If you specify N ssh users (checker_users) for a profile and all users have
ssh access it's the first success callback win but if another success callback with prior
username position in checker_users config they will be override but for determine if we have
finish we wait one callback for each node so we can determine finish before receive success
callback so for the moment we recommend to use checker_specific_pref for determine right user,
in next release we will wait all ssh checking callback for be sure to have consistent system

TODO

* Adapter :
  * puppet and vmware adapter
  * Adapter Suffix management
* Checker :
  * Improve SSH checking for resolve known issue
  * verify real ssh connexion (wait a shell by example or other)
  * check internal range connectivity (actually we consider success in all case)
  * add a ping only checker
* Indexer :
  * add an indexer for shell host support (bash/zsh)
* Exporter :
  * bash/zsh exporter after indexer upgrade
  * improve changeset detector
  * support multiple exporter
* General :
  * log level and notification
  * Mocha Testing on all step
  * progress bar display

Link

https://iterm2.com/dynamic-profiles.html - iTerm2 Dynamic Profil Feature https://code.google.com/p/iterm2/issues/detail?id=3094 - Original Feature Request