Skip to content

Commit

Permalink
Merge pull request #3 from WormBase/new-ami-and-explicit-block-device…
Browse files Browse the repository at this point in the history
…-mappings

Initial implementation
  • Loading branch information
adamjohnwright authored Jun 15, 2016
2 parents 313aeb7 + 4a61b34 commit 5e48d31
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/azanium/awscloudops.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,22 @@

# Instance settings based on image of default Amazon AMI (ami-f5f41398, 2016)
EC2_INSTANCE_DEFAULTS = dict(
ami='ami-02d7136f',
ami='ami-4d925520',
instance_type='r3.4xlarge',
monitoring=True,
dry_run=False)

BLOCK_DEVICE_MAPPINGS = [{
'DeviceName': '/dev/xvda',
'Ebs': {
'VolumeSize': 60,
'DeleteOnTermination': True
},
}, {
'DeviceName': '/dev/xvdb',
'VirtualName': 'ephemeral0'
}]

EC2_INSTANCE_ROLE = 'development'

logger = log.get_logger(__name__)
Expand Down Expand Up @@ -257,6 +268,7 @@ def init(ctx,
ImageId=ami,
InstanceType=instance_type,
KeyName=key_pair.name,
BlockDeviceMappings=BLOCK_DEVICE_MAPPINGS,
MinCount=1,
MaxCount=1,
UserData=base64.b64encode(user_data.encode('utf-8')),
Expand Down

0 comments on commit 5e48d31

Please sign in to comment.