Skip to main content

CLI tool to run shell commands on ec2 instances.

Project description

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

Project details


Release history Release notifications | RSS feed

This version

0.1

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.sh-0.1-py2-none-any.whl (6.1 kB view details)

Uploaded Python 2

File details

Details for the file vpc.sh-0.1-py2-none-any.whl.

File metadata

  • Download URL: vpc.sh-0.1-py2-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vpc.sh-0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 d1ef3c94c4b6828ac3334888bf137d5d7ca4386e13076a0ed8b49ee574def831
MD5 75f695e434c4ce4f5541e7950ce9e3f8
BLAKE2b-256 2efe4820d1d39c324a7ec8212f2d963afb505792731517ad009716924e479f49

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