groups – Instance sizes – Storage needed now and later • Configure filesystem as ext4 or XFS • Reduce I/O overhead • Raise file descriptor limits • Set read-‐ahead
vg0 /dev/md0! $ sudo lvcreate -n data vg0! $ sudo mkfs.ext4 /dev/vg0/data! Create volumes and filesystem $ sudo mkdir /data! $ sudo chown mongod:mongod /data! Create mount point and set ownership $ echo ‘/dev/vg0/data /data ext4 defaults,auto,noatime,noexec 0 0’ | sudo tee –a /etc/fstab! $ sudo mount /data! Update the filesystem table and mount
connecting to: test! >! Connect to MongoDB > rs.initiate()! {! "info2" : "no configuration explicitly specified -- making one",! "me" : "ip-10-127-127-91:27017",! "info" : "Config now saved locally. Should come online in about a minute.",! "ok" : 1! }! Initialize the replica set > rs.add(“ec2-abc.def.amazonaws.com”)! { “ok” : 1 }! Add each replica set member external DNS name
pre-‐built AMIs • Free and paid opDons • One-‐click deploy (well, maybe three) • Sofware available from a variety of vendors • Deployable onto almost any instance
to create and manage AWS resources • Create text-‐based templates which describe resources in your stack – EC2, EBS, Load Balancer, CDN • Templates are JSON – managed like code and pushed to S3
EBS volumes in a RAID10 • Replica set – Each node similar to single node – Primary configured in “parent” template – Secondary configured in “child” template – “Parent” template refers to “child” template to create 2 secondary instances
– Key Name, Instance Size, Volume Size • New security group – Port 22: open to all – Port 27017: open to instances in group • 4 EBS volumes, ajachments
hjp://www.mongodb.org/display/DOCS/Amazon+EC2 • AutomaDng Deployment on AWS with CloudFormaDon hjp://www.mongodb.org/display/DOCS/AutomaDng +Deployment+with+CloudFormaDon • MongoDB AMI via AWS Marketplace hjps://aws.amazon.com/marketplace/pp/B007IBMJPI/ • MongoDB on Amazon Web Services white paper: hjp://www.10gen.com/white-‐papers