Giter Site home page Giter Site logo

aec's People

Contributors

agravier avatar becdridan avatar cclauss avatar dependabot-preview[bot] avatar dependabot[bot] avatar hutchiko avatar huynguyent avatar marksergeant avatar mhasanbulli avatar tdszyman avatar tekumara avatar timr-s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aec's Issues

config installer

users shouldn't have to clone the repo to install the example config, there should be a CLI command that does this

it should also be possible to install a shared repo with config into ~/.aec/

positional arguments args

The positional argument args isn't used and confuses users:

Usage: ec2 describe [-h] [--name NAME] [--profile PROFILE] [args [args ...]]

    List EC2 instances in the region
    

positional arguments:
  args               -

optional arguments:
  -h, --help         show this help message and exit
  --name NAME        Filter to hosts with this Name tag (default: -)
  --profile PROFILE  Profile in the config file to use (default: 'default')
....

Flexible configuration

Configuration values can currently be specified in one of the following places:

  1. toml file root ie: for all profiles eg: additional_tags
  2. toml file under a profile eg: region
  3. on the command line eg: ami

To provide greater flexibility, allow any configuration value to be specified at any level, with lower levels taking precedence.

'aec configure example' fails

Installing:

» pipx install aec-cli                                               
  installed package aec-cli 0.9.0, Python 3.9.5
  These apps are now globally available
    - aec
done! ✨ 🌟 ✨

Running the configure example:

» aec configure example
Traceback (most recent call last):
  File "/<HOME>/.local/bin/aec", line 8, in <module>
    sys.exit(main())
  File "/<HOME>/.local/pipx/venvs/aec-cli/lib/python3.9/site-packages/aec/main.py", line 129, in main
    result = cli.dispatch(build_parser(), args)
  File "/<HOME>/.local/pipx/venvs/aec-cli/lib/python3.9/site-packages/aec/util/cli.py", line 87, in dispatch
    return call_me(**vars(pargs))
  File "/<HOME>/.local/pipx/venvs/aec-cli/lib/python3.9/site-packages/aec/util/configure.py", line 11, in example
    with resources.path("aec", "config-example") as example_path:
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 117, in __enter__
    return next(self.gen)
  File "/usr/local/Cellar/[email protected]/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/resources.py", line 175, in _path_from_reader
    opener_reader = reader.open_resource(norm_resource)
  File "<frozen importlib._bootstrap_external>", line 1060, in open_resource
IsADirectoryError: [Errno 21] Is a directory: '/<HOME>/.local/pipx/venvs/aec-cli/lib/python3.9/site-packages/aec/config-example'

cli params to configure output

Sometimes the output of ec2 describe wraps because of long instance names.

Would be nice to have a format cli option

eg: docker using gotemplate to reformat output and truncate the Name to 25 chars

docker stats --format "table {{printf \"%.25s\" .Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}"

Inadvertant termination of ALL ec2 instances in region

I am using aec via a bash script, which because of a configuration error executed aec ec2 terminate "$instanceId" with an empty $instanceId.

This had the rather unfortunate effect of terminating all of the ec2 instances visible to my role in the selected region. Looking at ec2.py it looks like the empty name argument was passed through to describe which happily returned all of the instances which where then deleted.

I think that terminate (and probably start and stop) should probably refuse to operate on more than one instance at a time, or alternatively guard against an empty name filter.

Don't use region specified in ec2.toml

ec2 describe needs the region. Having to configure this for every potential account/region combination in addition to ~/.aws/config seems redundant.

Instead just use the already configured region in ~/.aws/config or environment variables.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.