https://github.com/edsoncelio/severinoctl
A tool to automate some of my tasks in ECS/ECR.
https://github.com/edsoncelio/severinoctl
Last synced: about 1 year ago
JSON representation
A tool to automate some of my tasks in ECS/ECR.
- Host: GitHub
- URL: https://github.com/edsoncelio/severinoctl
- Owner: edsoncelio
- Created: 2021-07-24T13:42:11.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-05T03:47:59.000Z (almost 5 years ago)
- Last Synced: 2025-03-24T12:21:30.632Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
- [x] Check if a tag exists in a ECR repository
- [x] List task definition ARN revisions to a family
- [x] 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: and repository: my-ecr-registry
```
Otherwise:
```
❌ Tag '1.0' not found, 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::task-definition/sample-app:1
TaskDefinition ARN to revision 1: arn:aws:ecs:us-east-1::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::task-definition/sample-app:19' created!
```
## TODO
- [ ] Add tests
- [ ] Use aws sdk instead of aws cli
- [x] Configure goreleaser
- [ ] Add option to create a ECS task definition revision (and show a diff) - partial done