# Contexto The Contexto gem gives you information about the current state of ECS resources and more specifically the internal IP address of specific containers. ## Installation Install via the command line. ```shelll $ gem install contexto ``` ## Usage Run the binary to check on the status of a cluster or service. ### Cluster ```shell $ contexto -c sandbox ** Contexto Contextualizes ** ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Cluster sandbox ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓ ┃ Name ┃ Status ┃ Instances ┃ Services ┃ RunningTasks ┃ PendingTasks ┃ ┣━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━┫ ┃ sandbox ┃ ACTIVE ┃ 4 ┃ 3 ┃ 3 ┃ 0 ┃ ┗━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┛ ``` ### Service ```shell $ contexto -c sandbox -s backend-app ** Contexto Contextualizes ** ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Cluster sandbox ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓ ┃ Name ┃ Status ┃ Instances ┃ Services ┃ RunningTasks ┃ PendingTasks ┃ ┣━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━┫ ┃ sandbox ┃ ACTIVE ┃ 4 ┃ 3 ┃ 3 ┃ 0 ┃ ┗━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┛ Service backend-app ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓ ┃ Name ┃ Status ┃ Desired ┃ Running ┃ Pending ┃ ┣━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━┫ ┃ backend-app ┃ ACTIVE ┃ 1 ┃ 1 ┃ 0 ┃ ┗━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┛ Containers ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓ ┃ Container ┃ Status ┃ IP ┃ ┣━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━┫ ┃ sidekiq ┃ RUNNING ┃ 10.2.1.218 ┃ ┣━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━╊━━━━━━━━━━━━━━┫ ┃ app ┃ RUNNING ┃ 10.2.1.218 ┃ ┗━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┛ ``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/jamtur01/contexto. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).