Git Product home page Git Product logo

ecs-ship's Introduction

๐Ÿšข๐Ÿ‡ฎ๐Ÿ‡น ecs-ship

Yet another implementation of the ecs-deploy tool. ecs-ship will allow you to deploy changes to your ECS services by patching its current configuration.

Here are the steps that ecs-ship does for you:

  1. Grab the configuration from the cluster and service you specify.
  2. Apply the patches you can specify from the command line.
  3. Create a task definition out of the patched configuration.
  4. Deploy the service with the new task definition, wait for stability and if it's not reached roll back.

Usage

NAME:
   ecs-ship - Deploy your aws ecs services.

USAGE:
   ecs-deploy [options] <cluster> <service>

VERSION:
   1.1.0

GLOBAL OPTIONS:
   --updates FILE, -u FILE          Use an input FILE to describe service updates (default: stdin)
   --timeout DURATION, -t DURATION  Wait this DURATION for the service to be correctly updated (default: 5m0s)
   --no-color, -n                   Disable colored output (default: false)
   --no-wait, -w                    Disable waiting for updates to be completed. (default: false)
   --dry, -d                        Don't deploy just show what would change in the remote service (default: false)
   --help, -h                       show help (default: false)
   --version, -v                    print the version (default: false)

For the input file you can use this yaml schema:

cpu: "95"
memory: "34"
containerDefinitions:
  someContainer:
    cpu: 95
    environment:
      NAME: value
    image: "some-image:someTag"
    memory: 34
    memoryReservation: 34

Notice that every part of the input is optional, so the idea is that you just pass in the values that you need.

Getting ecs-ship

You can grab ssh ship from DockerHub from the repository nextroll/ecs-ship or from the console by:

docker pull nextroll/ecs-ship
docker run --rm nextroll/ecs-ship ecs-ship --help

You can also grab a Linux staticly linked binary from the releases page and drop it in your environment.

Finally you can grab the source code either from the AdRoll/ecs-ship repo or from the releases page and build yourself a fresh version using go.

go build .

Examples

Here's an example for updating a container image to the latest version:

cat << EOF | ecs-ship cluster service
containerDefinitions:
  someContainer:
    image: "some-image:latestTag"
EOF

Here's an example where you just change an environment variable of a sevice:

cat << EOF | ecs-ship cluster service
containerDefinitions:
  someContainer:
    environment:
      SECRETS_BUCKET: "s3://updated-secrets-bucket"
EOF

Here's yet ahother example where you just want to lower the cpu requirements of your service to lower your costs:

cat << EOF | ecs-ship cluster service
cpu: "50"
containerDefinitions:
  someContainer:
    cpu: 50

Development

We provide some make commands for your development convenience.

make mod      # load dependencies
make lint     # check code
make test     # run unit tests
make build    # build app (see artifacts/ecs-deploy)
make mockgen  # rebuild mocked entities

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.