{"id":20657763,"url":"https://github.com/boltops-tools/sonic","last_synced_at":"2025-04-19T13:16:57.042Z","repository":{"id":52354360,"uuid":"94243710","full_name":"boltops-tools/sonic","owner":"boltops-tools","description":"Multi-functional tool to manage AWS infrastructure","archived":false,"fork":false,"pushed_at":"2021-04-30T15:21:32.000Z","size":1270,"stargazers_count":27,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T11:29:04.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boltops-tools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-13T18:17:30.000Z","updated_at":"2024-01-03T14:14:54.000Z","dependencies_parsed_at":"2022-09-07T19:50:34.324Z","dependency_job_id":null,"html_url":"https://github.com/boltops-tools/sonic","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltops-tools%2Fsonic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltops-tools%2Fsonic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltops-tools%2Fsonic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boltops-tools%2Fsonic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boltops-tools","download_url":"https://codeload.github.com/boltops-tools/sonic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224954289,"owners_count":17397843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T18:23:01.337Z","updated_at":"2024-11-16T18:23:02.248Z","avatar_url":"https://github.com/boltops-tools.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sonic Screwdriver\n\n[![CircleCI](https://circleci.com/gh/boltopslabs/sonic.svg?style=svg)](https://circleci.com/gh/boltopslabs/sonic)\n[![Gitter](https://badges.gitter.im/boltopslabs/sonic.svg)](https://gitter.im/boltopslabs/sonic?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![Support](https://img.shields.io/badge/get-support-blue.svg)](https://boltops.com?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=sonic)\n\n[![BoltOps Badge](https://img.boltops.com/boltops/badges/boltops-badge.png)](https://www.boltops.com)\n\nSonic is a multi-functional tool that helps you manage AWS resources. Sonic contains a group of commands that help debug EC2 instances and ECS containers quickly.\n\nSee [sonic-screwdriver.cloud](http://sonic-screwdriver.cloud) for full documentation.\n\n## Why Sonic Was Created\n\nAfter I exhaust debugging an ECS service with CloudWatch Logs, I usually take it to the next step: ssh into the instance. I jump into an instance with a running task or docker container and poke around to figure out the root issue.\n\nTo find the instance with the service's docker container I click around on the ECS console website until I locate the container instance's DNS name and then paste it into the terminal. While this process is not complicated, it is tedious.  For example, the typical process is:\n\n1. Click on the cluster\n2. Click on the service\n3. Click on the tasks tab\n4. Click on one of the tasks\n5. Click on the container instance\n6. Highlight and copy the DNS name\n7. Paste the DNS name into the terminal to build up the ssh ec2-user@[dnsname] command\n8. Ssh into the machine\n9. Find the docker container with \"docker ps\"\n10. Run docker exec -ti [container_id] bash\n11. Finally, debug the actual problem\n\nBy the time I get into the container, I need to remind my brain of what the original issue was.  This tool automates the process, so you do not waste your precious mental energy clicking on links and use it to focus on better things like fixing the **actual** issue.\n\n## Install\n\nYou can install sonic with RubyGems\n\n    gem install sonic\n\nFull installation instructions are at [Install Sonic Screwdriver](http://sonic-screwdriver.cloud/docs/install/).  There are some server side dependencies for some of the sonic commands, so it is important to read through the full installation guide.\n\n## Quick Start\n\nHere is a quick overview of sonic abilities:\n\n    # ssh into an instance\n    sonic ssh i-0f7f833131a51ce35\n    sonic ssh demo-web # ec2 tag\n    sonic ssh demo-web --cluster staging # ecs service name\n    sonic ssh demo-web --cluster staging # ecs service name\n    sonic ssh 7fbc8c75-4675-4d39-a5a4-0395ff8cd474 --cluster staging # ECS container id\n    sonic ssh 1ed12abd-645c-4a05-9acf-739b9d790170 --cluster staging # ECS task id\n\n    # docker exec to a running ECS docker container\n    sonic ecs exec demo-web\n\n    # docker run with the same environment as the ECS docker running containers\n    sonic ecs sh demo-web\n\n    # run command with instance ids\n    sonic execute --instance-ids i-111 uptime\n    sonic execute --instance-ids i-111,i-222 uptime\n\n    # run command on all instances tagged with Name demo-web and worker\n    sonic execute --tags Name=demo-web,demo-worker uptime\n\n    # run command on all instances with multiple tags\n    # Quotes are important due to semi-colon\n    sonic execute --tags \"Name=demo-web,demo-worker;Owner=test\" uptime\n\n    # list ec2 instances\n    sonic list demo-web\n\n## Contributing\n\nEveryone can contribute to making sonic-screwdriver better.  Please fork the project and open a pull request! We love your pull requests. Contributions are encouraged and welcomed!\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboltops-tools%2Fsonic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboltops-tools%2Fsonic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboltops-tools%2Fsonic/lists"}