Skip to main content

CLI tool to run shell commands on ec2 instances.

Project description

# CLI tool to run commands on ec2 instances.

## Supported cloud platforms

  • [x] AWS EC2

  • [ ] Openstack via ec2 API endpoint

## Features

  • [x] Multiple remote users (if can’t authenticate - will try next username)

  • [x] Filter by tags

  • [x] Parallel execution

  • [ ] Profiles (group settings and filters in named profile, and specify profile on vpc.py 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.py `

## Usage

Get help:

` vpc.py --help vpc.py run --help vpc.py run-one --help `

Create settings file:

` mkdir ~/.vpc.py cat >>~/.vpc.py/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.py run -f owner=automation 'df -h' `

Run script:

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

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vpc.py-0.2.1-py2-none-any.whl (3.7 kB view details)

Uploaded Python 2

File details

Details for the file vpc.py-0.2.1-py2-none-any.whl.

File metadata

File hashes

Hashes for vpc.py-0.2.1-py2-none-any.whl
Algorithm Hash digest
SHA256 54912b579b1d1b83d1aead6bded8696a03125c7d02244139f55d100809397848
MD5 5a7027601066a6286389f095f3526240
BLAKE2b-256 28213437ffdc01244741bf905e1fdc2971ba46979617b1b8e41fa71cf972a293

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page