Created
June 9, 2015 16:11
-
-
Save ReedD/f4a0d95261ce0e15ed2b to your computer and use it in GitHub Desktop.
EC2 MongoDB instance startup command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# http://docs.mongodb.org/ecosystem/platforms/amazon-ec2/ | |
# the following command is the updated version of the command | |
# used to setup the mongo instance along with the recommended | |
# EBS volumes | |
aws --profile <AWS_PROFILE> ec2 run-instances \ | |
--image-id <CURRENT_AWS_LINUX_AMI> \ | |
--instance-type <INSTANCE_TYPE> \ | |
--security-group-ids <SECURITY_GROUP_ID> \ | |
--key-name <KEY_PAIR_NAME> \ | |
--block-device-mappings '[ | |
{ | |
"DeviceName": "/dev/xvdf", | |
"Ebs": { | |
"VolumeSize": 200, | |
"DeleteOnTermination": false, | |
"VolumeType": "io1", | |
"Iops": 1000, | |
"Encrypted": false | |
} | |
}, | |
{ | |
"DeviceName": "/dev/xvdg", | |
"Ebs": { | |
"VolumeSize": 25, | |
"DeleteOnTermination": false, | |
"VolumeType": "io1", | |
"Iops": 250, "Encrypted": false | |
} | |
}, | |
{ | |
"DeviceName": "/dev/xvdh", | |
"Ebs": { | |
"VolumeSize": 10, | |
"DeleteOnTermination": false, | |
"VolumeType": "io1", | |
"Iops": 100, | |
"Encrypted": false | |
} | |
} | |
]' \ | |
--ebs-optimized |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment