[SERVER-5859] mongo on EC2 Created: 17/May/12  Updated: 16/Nov/21  Resolved: 18/Apr/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Minor - P4
Reporter: Raviv Pavel Assignee: Ernie Hershey
Resolution: Done Votes: 0
Labels: Amazon, EC2, mongos, nh-240
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Amazon EC2


Participants:

 Description   

When running a webapp on Amazon's Elastic Beanstalk, I'd like each web instance to run a mongos router.
Creating an image that contains mongos is a bit problematic since we'll have to create new ones when amazon releases new images, to keep up to date.
Are there other methods?

Thanks,
Raviv.



 Comments   
Comment by Ernie Hershey [ 18/Apr/13 ]

Here's some further information on how to do this.

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-packages

Right now mongos is in the mongodb-10gen apt/deb package or the mongo-10gen-server yum/rpm package.

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/

I would also recommend posting about this to the mongodb-user mailing list which may get a wider audience for discussion and guidance than in JIRA.

https://groups.google.com/forum/?fromgroups#!forum/mongodb-user

Comment by Raviv Pavel [ 05/Jun/12 ]

Sounds great! Can you point me to further reading about it?

Comment by Brian Beggs [ 05/Jun/12 ]

A bootstrap script that would install something like this is a pretty standard. We do something similar using chef with ec2 and the process of getting the mongodb binaries installed and adding the startup script takes less than 10 seconds and while we are early in the project it hasn't failed a single time in the 4 months we've been doing so.

Comment by Eliot Horowitz (Inactive) [ 31/May/12 ]

I'd go with my original recommendation of a bootstrap that downloads and installs.

Comment by Michael A. Fiedler [ 31/May/12 ]

It seems like trying to do this is not a great approach, since AWS releases new images of Beanstalk frequently, so any new instances would have to be launched, set up with this injected into them, rebundle, and then relaunch.

All in all, a lot of steps to do every month.

Comment by Andy Schwerin [ 18/May/12 ]

It's just an extra party involved in your startup path. Another thing that could fail.

Comment by Eliot Horowitz (Inactive) [ 18/May/12 ]

downloads.mongodb.org is currently s3 anyway.
so from amazon would be very fast

Comment by Andy Schwerin [ 18/May/12 ]

Downloads from where? One would hate to have to be able to talk to downloads.mongodb.org in order to bring up your instances. I suppose you could stash the version you used in S3, and fetch it from there.

Comment by Eliot Horowitz (Inactive) [ 18/May/12 ]

Can you have a startup script that downloads and installs?

Generated at Thu Feb 08 03:10:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.