MongoDB Atlas
Configure MongoDB Atlas for Pritunl
MongoDB Atlas is a managed MongoDB database from MongoDB. This tutorial will explain configure MongoDB Atlas with VPC peering. This creates a reliable and secure MongoDB cluster with backups. The M0, M2 and M5 plans use shared RAM and have low connection limits, these plans should not be used for production systems.
MongoDB Atlas Cluster
From the MongoDB Cloud Manager click Build a New Cluster. Name the cluster and select MongoDB 3.6 with WiredTiger. Choose the same provider and region as your Pritunl cluster.
Next from the Security tab click Add New User. Set the privileges to readWrite and set the database name. Then autogenerate a secure password.
From the Peering tab click New Peering Connection. Fill in the AWS account ID and VPC information.
Once done open the AWS VPC dashboard and right click the VPC and select Edit DNS Resolution. Then select Yes and save.
Right click the VPC and select Edit DNS Hostnames. Then select Yes and save.
From the VPC dashboard click Peering Connections on the right. Then accept the pending peering connection from MongoDB.
Once done the VPC peering connection should be established.
Click Route Tables on the right and edit the routing table for the VPC. Add the Atlas CIDR block from the steps above as the Destination then select the pcx peering connection as the Target.
From the MongoDB Atlas manager select the cluster and get the MongoDB 3.4 URI. Replace the password with the generated password from earlier and copy this URI to the Pritunl settings.
Updated over 6 years ago