Skip to content

Commit

Permalink
add a Readme, and improved help message
Browse files Browse the repository at this point in the history
  • Loading branch information
natict committed Jul 21, 2015
1 parent c45523f commit e9d9d2f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
47 changes: 45 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,45 @@
# garbo
Garbo- a garbage collector for the clouds
# Garbo - Graph-based cloud resource cleanup

## Notes
* This is a *very* early version
* Only AWS discovery
* No resources cleanup, just reporting

## Quick Start
1. Copy and modify the example configuration file

```bash
cp garbo.cfg.example garbo.cfg.example
vim garbo.cfg
```
2. Create a Core Resources file, eg.

```yml
--- # My applications
Backend:
- "AWS://AutoScalingGroup/us-east-1/Backend-ASG"
QA:
- "AWS://Instance/us-east-1/i-abc12345" # Mock server
```
3. Find unused resources

```bash
python garbo.py -d -g -a /path/to/core_resources.yml
# And start a simple web server to view the resulted d3js graph (assuming Python 2.7)
python -m SimpleHTTPServer 8000
```
4. Browse to: <http://localhost:8000/d3js/index.html>

## Usage
```
usage: garbo.py [-h] [--applications APPLICATIONS] [--discovery] [--gen-d3js]

optional arguments:
-h, --help show this help message and exit
--applications APPLICATIONS, -a APPLICATIONS
YAML file containing Core Resources per application
--discovery, -d Perform a discovery (don't use stored graph).
default: False
--gen-d3js, -g Generate a json file for D3JS Directed Force Graph.
default: False
```
6 changes: 3 additions & 3 deletions garbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ def _get_parsed_arguments():
parser = argparse.ArgumentParser()

parser.add_argument('--applications', '-a', default=False,
help='a YAML file containing the name and root resources of your application')
help='YAML file containing Core Resources per application')

parser.add_argument('--discovery', '-d', action='store_true', default=False,
help='should garbo perform a discovery, or just use stored graph')
help='Perform a discovery (don\'t use stored graph). default: False')

parser.add_argument('--gen-d3js', '-g', action='store_true', default=False,
help='should garbo generate a json file for D3JS Directed Force Graph')
help='Generate a json file for D3JS Directed Force Graph. default: False')

return parser.parse_args()

Expand Down

0 comments on commit e9d9d2f

Please sign in to comment.