ami-replacer

command module
v0.0.0-...-145e272 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 7 Imported by: 0

README

A simple Go command line tool that cleans up obsolete amis and snapshots, and replace ecs cluster instances with newest AMI.

Installation

make install

Usage

Subccomands

  • rmi delete images before specified generations.
  • rms remove snapshots that is not reffered by any AMIs or volumes.
  • rpl replace ecs cluster instances with newest AMI.

Options

  • rmi

    • image,i prefix of AMI.
    • owner,o account ID of ami owner.
    • dry-run,d dry run flag.
    • gen,g max generations to retain.
    • verbose,v enable debug output.
  • rms

    • owner,o account ID of ami owner.
    • dry-run,d dry run flag.
    • verbose,v enable debug output.
  • rpl

    • asgname asg name.
    • clustername ecs cluster name.
    • image,i prefix of AMI.
    • owner,o account ID of ami owner.
    • dry-run,d dry run flag.
    • verbose,v enable debug output.

Example

Delete amis older than specified generations.

ami-replacer rmi --image <image name> --owner <owner> --gen=<generation> --dry-run

Delete unused snapshots.

ami-replacer rms --owner <owner> --dry-run

Replace ECS cluster Instances with newest AMI.

ami-replacer replace --image <image name>  --owner <owner> --asgname <asg name> --clustername <cluster name> -v --dry-run

Change Logs

0.1

  • First beta release

Contribution

Feel free to help out by sending pull requests or by creating new issues.

Author

Tetsuhito Yasuno(tyasuno)

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL