Code Monkey home page Code Monkey logo

ecs-insight's Introduction

ecs-insight

Simple bash script to provide info about an ECS cluster, services, task definitions and containers

The plan is to implement the functionality/features into the existing tool cloudman to support both EC2 and ECS.

Requirements

This tool cannot function without the aws-cli version 2 and the ecs-cli.
To install the aws-cli, checkout the AWS aws-cli install guide.
To install the ecs-cli, checkout the AWS ecs-cli install guide.

The shell's current AWS profile will be used to perform all aws and ecs-cli. If you need to change profile, checkout the AWS aws-cli configure profiles page.

How to use

List all services for a cluster

bash ecs-insight.sh {cluster-name}

Will output all service arns for the provided cluster as well as all containers inside the cluster with a --desired-status RUNNING.

List service specific info and hints in a cluster

bash ecs-insight.sh {cluster-name} {service-search-name}

Will output the service arn, task definition arn, the containers related to the service and command line hint to:

  • show the task definition
  • start a ssm session in the container (equivalent of the docker exec command)

If any failures occured that cause the task to fail, will also be displayed.

Tail logs all containers in a service

bash ecs-insight.sh {cluster-name} {service-search-name} --logs

Will output all of the items of the previous command, and adds:

  • tailing logs for all the containers defined in the task definition for the service

Tail logs of a single container in a service

bash ecs-insight.sh {cluster-name} {service-search-name} --single

Same output of the previous command, except will show logs of a single container considered as the 'main' app for the service

ecs-insight's People

Contributors

ivoronkes avatar

Stargazers

Brandon van Houten avatar

Watchers

James Cloos avatar  avatar

ecs-insight's Issues

show the 'aws ecs update-service' command

Also show the 'aws ecs update-service' command to force a service to be recreated.
This forces the service to use the latest image provided (when the :latest image tag is used in the task definition).

The command look like: aws ecs update-service --cluster develop-raven-ecs --service {service-name} --force-new-deployment

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.