Connecting Grails app to MongoDB through NAT instance on AWS

Viewed 269

I'm currently trying to setup a mongo replica set in a VPC via this quick start guide https://s3.amazonaws.com/quickstart-reference/mongodb/latest/doc/MongoDB_on_the_AWS_Cloud.pdf.

I have a grails app that runs on an AWS instance which used to also host the mongo instance. Now I want to seperate the web app from mongo. I already followed the guide above and have my replica set setup with a NAT instance that I can access via ssh. Now I'm wondering how to configure grails so that it connects to this mongo instance rather than the one on its own instance.

I used to just set the db host and everything in the DataSource.groovy file and everything was fine, but I can't seem to find how to set it up to go through the NAT to the primary replica node.

Do you guys have any idea what I should do next?

Cheers, Tobias

0 Answers
Related