GithubHelp home page GithubHelp logo

severinoctl's Introduction

severinoctl

A tool to automate some tasks in ECS/ECR.

Work in progress...

Prerequisites

  • awscli
  • working aws credentials
  • environment AWS_REGION exported

How to install

Get a binary from https://github.com/edsoncelio/severinoctl/releases

Features

  • Check if a tag exists in a ECR repository
  • List task definition ARN revisions to a family
  • Create a task definition revision to a new image version

Usage

To check if a specific image tag exists in a specific ECR repository:

severinoctl checkTag --registry my-ecr-registry --tag 1.0

If the tag exists, you will receive the following message:

✅ Tag '1.0' found! digest: <IMAGE DIGEST HERE> and repository: my-ecr-registry

Otherwise:

❌ Tag '1.0' not found, reason: <REASON> - try again!

To list all the revisions related to a specific task definition:

severinoctl listTask --name sample-app

And the output:

TaskDefinition ARN to revision 0: arn:aws:ecs:us-east-1:<AWS ACCOUNT>:task-definition/sample-app:1
TaskDefinition ARN to revision 1: arn:aws:ecs:us-east-1:<AWS ACCOUNT>:task-definition/sample-app:2
...

To create a new task definition revision to a specific image:

severinoctl updateTask --family sample-app --image myimage:v1.0.0

If the image and tag already exists in the task definition:
⚠️ The image is already registered

Otherwise:

🔍 Actual image found: myimage:v1.0.0 - New image to use: 'myimage:v2.0.0'
⌛  Creating the new revision...
🎉 Revision 'arn:aws:ecs:us-east-1:<AWS ACCOUNT>:task-definition/sample-app:19' created!

TODO

  • Add tests
  • Use aws sdk instead of aws cli
  • Configure goreleaser
  • Add option to create a ECS task definition revision (and show a diff) - partial done

severinoctl's People

Contributors

edsoncelio avatar

Watchers

James Cloos avatar  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.