Giter Site home page Giter Site logo

robin's Introduction

Robin

Build Status Dependencies

Batman's very capable side kick - deletes old ECR images.

Why Robin?

Images stored in ECR incur monthly data storage charges, this means paying to store old images that are no longer in use. Also, AWS ECR has a default limit of 1000 images. Therefore, it is desirable to ensure the ECR repositories are kept clean of unused images.

What we delete currently:

  • Images older than 30 days that do not have tags that contain 'master'

Usage

  1. Authenticate and get AWS credentials via your preferred CLI, you may need to export the environment variables directly

  2. Update the environment variables in serverless.yml to match your setup

  3. Update the repoNames array in handler.js to reflect the repositories you want to clean

  4. Lint the function

$ npm run lint
  1. Test the function
$ npm test
  1. Deploy the function
$ npm run deploy
  1. Tail cloudwatch logs
$ npm run tail-logs

TODO

  • Only keep the last 10 master images (justification: we should be using the last images only, last 10 gives us something to rollback to if needed.)
  • Add some more documentation to this readme
  • Delete all untagged images
  • Make repo names configurable via env vars
  • Make tagging convention configurable

robin's People

Contributors

ramesius avatar

Watchers

Will Falconer 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.