Skip to content

Commit

Permalink
Merge pull request #24 from brunopadz/docs/prepare-for-release
Browse files Browse the repository at this point in the history
docs: prepare for release
  • Loading branch information
brunopadz authored Nov 3, 2020
2 parents 226ab3c + 922bf2b commit 704233b
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 51 deletions.
63 changes: 12 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,22 @@
# amictl
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/brunopadz/amictl?include_prereleases&style=flat-square) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/brunopadz/amictl?style=flat-square) ![Drone (cloud)](https://img.shields.io/drone/build/brunopadz/amictl?style=flat-square) ![GitHub](https://img.shields.io/github/license/brunopadz/amictl?style=flat-square)

amictl is a super simple cli app to control your AMIs and Images

## Disclaimer

- There are a ton of features that still need to be implemented. Just check the [contributing guide](CONTRIBUTING.md) and the opened [issues](https://github.com/brunopadz/amictl/issues).

## Configuring

❗️ AWS is the only cloud provider supported to this date.

- Make sure AWS CLI is installed and properly configured. amictl uses access and secret keys to authenticate to AWS.
- You can configure it using [Environment Variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) or through [cli](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html).

More docs coming soon.

## How to use
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/brunopadz/amictl?include_prereleases&style=flat-square) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/brunopadz/amictl?style=flat-square) ![Drone (cloud)](https://img.shields.io/drone/build/brunopadz/amictl?style=flat-square) ![GitHub](https://img.shields.io/github/license/brunopadz/amictl?style=flat-square)

- Download the binary from [releases page](https://github.com/brunopadz/amictl/releases) or
- Download using go get:

`go get github.com/brunopadz/amictl`
## Info

**List all AMIs**
- [How to use](docs/how_to_use.md)
- [Download it!](https://github.com/brunopadz/amictl/releases/latest)
- Feel free to [contribute](CONTRIBUTING.md)
- AWS is the only cloud provider supported to this date

```
$ amictl aws list-all --account 123456789012 --region us-east-1
ami-00123asb820d84d9a
ami-01ee75aqwez39a298
ami-02e6a65236aa8d0e7
ami-0387a7987av1b328d
ami-039835c818ezxc21c
ami-0345df085fe686a54
ami-03fd5464hdd14b864
Total of 7 AMIs
```
## What is amictl?

**List not used AMIs**
amictl is a super simple cli app to control your AMIs and Image IDs.

```
$ amictl aws list-unused --account 123456789012 --region us-east-1
ami-00123asb820d84d9a
ami-01ee75aqwez39a298
ami-02e6a65236aa8d0e7
Total of 3 AMIs
```
## And what does it do?

**Estimate costs**
So far, it shows how many AMIs/Image IDs you're not using and how much you could be saving.

```
amictl aws list-unused --account 123456789012 --region us-east-1 --cost
AMI-ID: ami-044ec27279a83e963 Size: 20 GB Estimated cost monthly: U$ 0.46
AMI-ID: ami-09665078cc0a18084 Size: 8 GB Estimated cost monthly: U$ 0.18
AMI-ID: ami-0c14b9433a78ac8f1 Size: 8 GB Estimated cost monthly: U$ 0.18
## Disclaimer

Estimated cost monthly: U$ 0.83 for 3 Unused AMI
=======
Total of 3 not used AMIs
```
- There are a ton of features that still need to be implemented. Just check the [contributing guide](CONTRIBUTING.md) and the open [issues](https://github.com/brunopadz/amictl/issues).
52 changes: 52 additions & 0 deletions docs/how_to_use.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## First things first

AWS is the only cloud provider supported to this date. If you need support for another major cloud provider, feel free to open an issue. :)

## Credentials

Currently amictl supports the same authentication method as AWS does. It can use the default credentials configured in `~/.aws/credentials` or [environment variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) such as `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.

## How to use amictl

- Download the latest build from [releases page](https://github.com/brunopadz/amictl/releases) or download it as follows:
```
go get github.com/brunopadz/amictl
```
- All commands must have the flag `--account` (or `-a`) and `--region` (or `-r`)

To list all your AMIs:

```
amictl aws list-all --account 123456789012 --region us-east-1
ami-00123asb820d84d9a
ami-01ee75aqwez39a298
ami-02e6a65236aa8d0e7
ami-0387a7987av1b328d
ami-039835c818ezxc21c
ami-0345df085fe686a54
ami-03fd5464hdd14b864
Total of 7 AMIs
```

To show how many AMIs are not being used:

```
$ amictl aws list-unused -a 123456789012 -r us-east-1
ami-00123asb820d84d9a
ami-01ee75aqwez39a298
ami-02e6a65236aa8d0e7
Total of 3 AMIs
```

And you can just add the flag `--cost` and boom:

```
amictl aws list-unused --account 123456789012 --region us-east-1 --cost
AMI-ID: ami-044ec27279a83e963 Size: 20 GB Estimated cost monthly: U$ 0.46
AMI-ID: ami-09665078cc0a18084 Size: 8 GB Estimated cost monthly: U$ 0.18
AMI-ID: ami-0c14b9433a78ac8f1 Size: 8 GB Estimated cost monthly: U$ 0.18
Estimated cost monthly: U$ 0.83 for 3 Unused AMI
=======
Total of 3 not used AMIs
```

0 comments on commit 704233b

Please sign in to comment.