Tiny multi-server automation tool.
Project description
Tiny multi-server automation tool.
Run command on multiple servers. Designed to be as simple as possible and play nice with Unix tools.
Installation
pip install kitten
Prerequisites
kitten can get IP addresses from AWS resources for you. For that you’ll need to have your AWS credentials set up. You can do that using awscli:
pip install awscli
Then:
aws configure
Examples
Run command on servers
Use kitten run:
$ kitten run uptime ubuntu 18.105.107.20 34.229.135.48 18.105.107.20 run uptime 34.229.135.48 run uptime 18.105.107.20 17:11:48 up 2 days, 6:02, 0 users, load average: 0.91, 2.99, 3.49 34.229.135.48 17:11:48 up 5 days, 11:19, 0 users, load average: 6.34, 5.94, 5.72
Replace ubuntu with the user used to log in on the servers
Use -i to specify a private key
Use --threads to specify the number of concurrent connections (defaults to 10)
Get IP addresses from AWS resources
Use kitten ip with either id, asg or elb:
$ kitten ip asg my-tiny-asg 18.135.117.17 24.129.235.48
By default only private IP addresses are returned. Use --public if you prefer public IPs
You can change region using --region
If you’re in a hurry, you can just paste any text that contains instance IDs:
$ kitten ip id prod-mongo-0901bc21990109ed4-eu my-hostname-06a2fc734534ef6d9 17.136.127.18 23.119.136.38
Download files from servers
Use kitten get:
kitten ip elb my-load-balancer | xargs kitten get /tmp/system.log ubuntu
Upload file to servers
Use kitten put:
kitten ip asg big-prod-asg | xargs kitten put -i ~/.ssh/key.pem cat.jpg /tmp ubuntu
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kitten-0.6.2.tar.gz
.
File metadata
- Download URL: kitten-0.6.2.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 246ad6e14ee8889bef97aad18f95080bd34855ab2383047dcdba005de3db8f94 |
|
MD5 | b59ffea6e7391ce0006cd73345378fb4 |
|
BLAKE2b-256 | 99e15bd64be06250ce2513538c78b1396e37bbe1c9a5a56715086d2be9e8b33b |
File details
Details for the file kitten-0.6.2-py3-none-any.whl
.
File metadata
- Download URL: kitten-0.6.2-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93be5f42be1d9c41c5264f0e2d11af602b79b0bc5f910b7eda7319a0f09e347b |
|
MD5 | cd16502418005733d87bc22797aa08c9 |
|
BLAKE2b-256 | a4ad6d0fa4ec3b13d59d55274446d772a6dac980d4277592ca04067c62496370 |