No project description provided
Project description
EC2 Manager
A python wrapper around a terraformed ec2 deployment. It awaits instances till their done initializing and allows the user more control over updating or not updating particular instances.
Dependencies
- Terraform The python package deploys a terraform module.
- AWS CLI Boto3 commands check the instance status and send it ssm commands.
- GitHub Optional methods that clone a repo on your ec2.
- Docker Optional methods that run compose up and down on your instance.
- Python
Installation
You can install this package with pip by running the command below.
pip install ec2-manager
Usage
Here is a basic example of
config.yaml
# globals
type: some-group-name
aws_region: us-east-1
vpc_name: "Default VPC"
public_subnet_cidr: "172.31.64.0/20"
# instance configurations
instances:
instance-1:
update: True
custom_manager.py
import ec2_manager
class CustomManager(ec2_manager.EC2Manager):
def update(self):
"""
Update the bots according to the config.
"""
self.create_instances()
self.update_repos()
self.stop()
self.start()
if __name__ == '__main__':
custom_manager = ec2_manager.CustomManager()
custom_manager.update()
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
ec2-manager-0.0.3.tar.gz
(12.0 kB
view hashes)
Built Distribution
Close
Hashes for ec2_manager-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13f88d4a192e8ddf30089dea9fa0c16c6f3a5fccfa9d8f0424f6a644dba0ed2b |
|
MD5 | ec2ce56fa221bfe4c8c06411f68b885a |
|
BLAKE2b-256 | 0edf3e8f6ad119b54f15124d883fc309a4c6090e07c669f2c46617da5a7570f3 |