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.2.tar.gz
(10.8 kB
view hashes)
Built Distribution
Close
Hashes for ec2_manager-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec674651b08c647d900168dfb1374ca9ea0b7487bb647b7f3b63ea14d256c0c4 |
|
MD5 | 87fa2d24cd017a16cf13f235023e4d4f |
|
BLAKE2b-256 | 774d7ce5b95767ef21e9e72e7508878e8b951882cc378803495e38cf0e5aea9d |