bellatrix Package
bellatrix Package
bewitch_ami Module
This script runs an ec2 instance and then applies a configuration to it
-
class bellatrix.bewitch_ami.Bewitch(key, sec, app_name, pk, reports)[source]
-
define_constants()[source]
define class constants to access ami configs
-
executeCommands(user, dns, key, commands, config)[source]
-
getConfigs()[source]
get configurations from ‘configs’ directory
-
printErrors(errors)[source]
-
run(config)[source]
execute a configuration
-
saveReport(results, config)[source]
-
bellatrix.bewitch_ami.run(configuration=None)[source]
burn_instance Module
get a new ami given a running instance
-
class bellatrix.burn_instance.Run(key, sec, app_name)[source]
-
amiIsReady(ami_name)[source]
-
burnInstance(instance, config_name)[source]
-
bellatrix.burn_instance.run(instance, config_name, wait)[source]
connect Module
Upload files to S3
-
class bellatrix.connect.Run(key, sec)[source]
-
uploadToS3(source, bucket, acl='public-read', key_prefix='')[source]
-
bellatrix.connect.run(source, bucket, acl, key_prefix)[source]
copy2s3 Module
Upload files to S3
-
class bellatrix.copy2s3.Run(key, sec)[source]
-
uploadToS3(source, bucket, acl='public-read', key_prefix='')[source]
-
bellatrix.copy2s3.run(source, bucket, acl, key_prefix)[source]
provision Module
Given a running machine with ssh, apply a configuration
-
class bellatrix.provision.Provision(key, sec, app_name, pk, reports)[source]
Bases: bellatrix.bewitch_ami.Bewitch
-
getVal(cfg, module_name, key, local_value)[source]
-
provision(configuration, user, hostname, pk)[source]
execute a configuration
-
bellatrix.provision.run(configuration, user, hostname, pk)[source]
set_permissions Module
Set launch pemissions for an AMI
-
class bellatrix.set_permissions.Run(key, sec)[source]
-
define_constants()[source]
define class constants to access ami configs
-
getAccountPermissions(perm_file)[source]
“Return list of accounts where new ami’s will get execute permissions
-
setPermissions(amis, permissions)[source]
-
bellatrix.set_permissions.run(ami, permissions_file)[source]
set_security Module
Modify security groups
-
class bellatrix.set_security.Run(key, sec)[source]
-
setSecurityGroupAuth(name, ports, cidrs)[source]
-
bellatrix.set_security.run(security_group_name, ports_file, cidrs_file)[source]
start_instance Module
this needs a good refactor
-
class bellatrix.start_instance.Run(key, sec)[source]
-
startInstance(ami, instance_type, key_name, security_groups, new_size)[source]
-
bellatrix.start_instance.run(ami, instance_type, key_name, security_groups, new_size)[source]
stop Module
stop or terminate instances
-
class bellatrix.stop.Finisher(key, sec, message)[source]
-
finish_instance(instance, finish_it)[source]
-
bellatrix.stop.stop(instance)[source]
-
bellatrix.stop.terminate(instance)[source]