Coder Social home page Coder Social logo

pecs's Introduction

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>

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|unset]  View or modify service environments

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 config -c dev         restart all development containers
  pecs config -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 unset <key>      Unset environment variable for a service

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

Development

Setup

git clone [email protected]:HustleInc/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

pecs's People

Contributors

tylerbrock avatar noahsilas avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.