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.1.tar.gz
(8.0 kB
view hashes)
Built Distribution
Close
Hashes for ec2_manager-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ceb440af173f9da53e904f9f5a1a1c8fe9a9a6c872baf5166b621839c398d26d |
|
MD5 | 04c124b7f9487228ab9f5f0bf635ed79 |
|
BLAKE2b-256 | 1e4b8a4377f672770b868d91c978a6ee6443cee416be64ae844acc836ac65c77 |