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

pecs

v1.7.0

Published

Flex your ECS muscles

Downloads

14

Readme

PECS: Flex your ECS muscles

PECS allows you to easily deploy your docker projects to AWS's ECS platform.

Rationale

Q: Why would we build another ECS deploy tool when many already exist?

A: PECS supports deploying an image to multiple services at once.

ECS users often have multiple services that share some code and use the same image but be run with different commands or entrypoints.

For example, a single image could be used for an api service and a worker service.

  • When you update that image, it would be nice to update multiple services along with it.
  • Likewise, when you roll back a release, it's nice to be able to roll back all related services at once.

Diagram of staging cluster that has many services all backed by the same image:

          -> api (backend:123)
         /
staging -> worker (backend:123)
         \
          -> web (backend:123)

Dependencies

Currently requires that AWS is configured via the environment:

  • AWS_ACCESS_KEY_ID must be set
  • AWS_SECRET_ACCESS_KEY must be set

Requires Node 4+

Installation

npm install -g pecs

Usage

pecs <command> [arguments] [options]

Commands:
  pecs clusters                     Get list of clusters
  pecs services                     Get list of services in a cluster
  pecs updateAgents                 Update all ECS agents in a cluster
  pecs release                      Update service(s) with new image
  pecs rollback                     Roll back service(s)
  pecs bump                         Rolling restart a service across a cluster
  pecs config [get|set|mset|unset]  View or modify service environments

In many cases the options --cluster (-c) and --services (-s) are required.

Release

pecs release

Update service(s) with new image

Examples:
  pecs release -c dev -s api            update dev api service
  pecs release -c dev -s api worker     update dev api + worker services
  pecs release -c dev -s api -t v1.2.3  update dev api to v1.2.3

Rollback

pecs rollback

Roll back service(s)

Examples:
  pecs rollback -c dev -s api           roll back api to previous task def
  pecs rollback -c dev -s api worker    roll back api + worker
  pecs rollback -c dev -s api --rev -2  roll back api 2 release ago

Bump

pecs bump

Rolling restart a service across a cluster

Examples:
  pecs bump -c dev         restart all development containers
  pecs bump -c dev -s api  restart development api containers

Config

pecs config [get|set|unset]

View or modify service environments

Commands:
  pecs config get <key>                         Get environment variable for a service
  pecs config set <key> <val>                   Set environment variable for a service
  pecs config mset <key1>=<val1> <key2>=<val2>  Set multiple environment variables for a service
  pecs config unset <key>                       Unset environment variable for a service

Examples:
  pecs config -c dev                    get all dev cluster env vars

  pecs config get DEBUG -c dev -s api   get development api env var DEBUG 

Development

Setup

git clone [email protected]:Hustle/pecs.git

Run in Node 8+

node src/pecs.js

Active Dev (Transpiled)

npm link

Run the dev mode to constantly transpile the source

npm run dev

Run pecs

pecs