Skip to content

Powertools for working with the Environment Manager API

License

Notifications You must be signed in to change notification settings

trainline/envmgr-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

envmgr-lib

Build Status

# Get all AMIs
amis = AMI.get_all()

# Create an ASG instance
asg = ASG('my-asg-name', 'PROD')

# Check the remote ASG exists
asg_exists = asg.exists()

# Get the ASG schedule
asg_schedule = asg.get_schedule()

# Set the ASG schedule
asg.set_schedule('ON')

# Get ASG status
status = asg.get_status()

# Get ASG health
health = asg.get_health()

# Get instances with AMI older than certain age
instances = Instance.get_instances_by_ami_age(30)

# Create a Service instance
service = Service('MyService', 'PROD')

# Get Service health
health = service.get_health()

# Get inactive slices:
slices = service.get_slices(False)

# Publish an open file handle as version 2.0.0 of the service
service.publish(file, '2.0.0')

# Publish an open file handle as version 2.0.0 of the service
# configured for environment MyEnv
service.publish(file, '2.0.0', 'MyEnv')

# Deploy the service
deploy_id = service.deploy()

#Get the deployment info
service.get_deployment()

# Toggle the service and get toggle status
upstream = service.toggle()
status = upstream.get_status()

About

Powertools for working with the Environment Manager API

Resources

License

Stars

Watchers

Forks

Packages

No packages published