Metadata-Version: 2.0
Name: vpc.sh
Version: 0.1
Summary: CLI tool to run shell commands on ec2 instances.
Home-page: https://github.com/achirko/vpc.sh
Author: Oleksandr Chyrko
Author-email: aleksandr.chirko@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: System :: Clustering
Classifier: Topic :: System :: Systems Administration
Requires-Dist: Click
Requires-Dist: boto
Requires-Dist: fabric
Requires-Dist: tabulate

CLI tool to run commands on ec2 instances.
==========================================

Supported cloud platforms
-------------------------

Implemented
~~~~~~~~~~~

-  [x] AWS EC2

TODO
~~~~

-  [ ] Openstack via ec2 API endpoint

Features
--------

Implemented
~~~~~~~~~~~

-  [x] Multiple remote users (if can't authenticate - will try next
   username)
-  [x] Filter by tags
-  [x] Parallel execution

TODO
~~~~

-  [ ] Profiles (group settings and filters in named profile, and
   specify profile on ``vpc.sh run``)
-  [ ] Filter by launch date (``launched-before`` and ``launched-after``
   )
-  [ ] Filter by keypair
-  [ ] --dry-run flag

Installation
------------

Install the latest stable version:

::

    pip install vpc.sh

Usage
-----

Get help:

::

    vpc.sh --help
    vpc.sh run --help
    vpc.sh run-one --help

Create settings file:

::

    mkdir ~.vpc.sh
    cat >>~.vpc.sh/settings<<-EOF
    [default]
    remote_user = ubuntu,centos,root
    private_key = /home/ubuntu/.ssh/ec2.pem
    aws_access_key_id = access-key
    aws_secret_access_key = secret-access-key
    aws_region = eu-west-1
    EOF

Filter by tag 'owner=automation' and run command on resulted instances:

::

    vpc.sh run -f owner=automation 'df -h'

Run script:

::

    vpc.sh run -f owner=automation<<-EOF
    echo hello
    uname -a
    EOF

Run any script or binary (assuming it's compatible with target hosts):

::

    vpc.sh run -f owner=automation < some_python_script.py
    vpc.sh run -f owner=automation < /usr/local/bin/weather


