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

ringleader

v0.1.12

Published

Create and manage clusters of instances on AWS

Downloads

6

Readme

ringleader

Ringleader is a simple and powerful program for wrangling clusters of EC2 spot instances, monitoring their health, and auto-scaling.

Ringleader can run as a module or commandline client. As a module, each Ringleader instance is an event emitter that manages and reports on the status of a cluster on EC2, providing an interface for programmatic modification. As a commandline client, Ringleader spawns an HTTP server which can be used to monitor and manage a cluster.

Ringleader aims to keep cluster management simple with a few assumptions and generalizations:

  • A cluster is a pool of EC2 spot instances sharing the same region, AMI (machine image), and instance type
  • Cluster instances can be deemed healthy if AWS says they are running and if they respond as expected to an HTTP request healthcheck

Given this, some stuff that Ringleader does not do on its own includes:

  • Handle clusters of mixed resource types (different images, different sizes, etc.)
  • Handle any kind of intercommunication between servers
  • Manage load balancing between cluster servers
  • Make health decisions based on internal server metrics (unless provided through a simple HTTP endpoint)
  • Manage clusters spanning multiple AWS regions

Getting Started

Install the module with: npm install ringleader (or npm install -g ringleader - if using from commandline)

var Ringleader = new require('ringleader')(options);
#print usage
ringleader --port=[port to run server on]

Credentials

Ringleader requires access to the AWS API, which can be provided through:

  • commandline variables of AMAZON_KEY and AMAZON_SECRET
  • a file named config.json in the project's root path which includes an object like:
    {
      "aws": {
        "accessKeyId": "amazon key"
      , "secretAccessKey": "amazon secret"
      , "region": "amazon region"
      }
    , "cluster": {
        "ami": "ami to use for cluster instances"
      , "max_price": 0.25 //maximum price for spot instance requests
      , "label": "label for cluster"
      , "instance_size": "size for cluster instances"
      }
    , "healthcheck": { //specs for healthcheck to perform on instances
        "auth": { //optional, if you have http auth on instances
          "user": "http auth username"
        , "pass": "http auth password"
        }
        , "url_path": "url path to hit with healthchecks"
        , "regex": //stringified version of regex (optional)
        , "port": 443 //port to request from
        , "strictSSL": false //allow self-signed ssl certificates
        , "protocol": "https" //protocol to use for healthchecks
      }
    }