Config 2 EC2 that have mongoDb to work together - mongodb

I create 2 micro ec2 with mongoDB install on each one of them,
The same zone and i want to configure that one will be mater and the rest is slave,
How to configure mongodb.conf ?
Thanks .

Check out the documentation:
Amazon EC2 Quickstart
Amazon EC2 with MongoDB

Related

Deploy my mongodb instance on oracle cloud

I have my mongodb instance running on MongoAtlas,
I have to host my database to oracle cloud,
Is there a way i can host my mongoDb on Oracle cloud.
i looked into bitnami , but its only giving option to host mongodb on Aws, Google, dnot see oracle there
currently OCI does not have hosted/managed MongoDB offering but you can deploy it on the pure IaaS either via containers or VMs. You can get both of those from Bitnami and deploy them on the OCI IaaS.
What is your use case for MongoDB? If you are looking into hosted/managed DBon OCI , did you check out Autonoumous DB?

Mongo Shell becomes unresponsive after connecting to AWS Document DB

I created an AWS Document DB in the same region as my EC2. When I try to connect to it using the command provided by AWS the terminal seems to get stuck.
The ec2 and Document DB are in the same region.
Document DB's security group allows 27017 access.
Both are in the same VPC.
I don't understand why it says connected but then doesn't allow me to enter commands
asds_asds
You can check your working process from here https://docs.aws.amazon.com/documentdb/latest/developerguide/connect-ec2.html to see if you missed something.

AWS RDS vs local database in EC2 instance

I want to understand AWS Relational Database Service (RDS) and discover benefits from using it.
Why RDS is better than manually installed PostgreSQL database in EC2 instance?
Is it possible to connent existing database in EC2 instance with Amazon RDS?
How it really works?
How I should automation RDS?
When I want create new database in existing EC2 instance I can use Ansible in simply way. How I should connect my application with database which uses RDS ?
Thanks in advance!
I want to understand AWS Relational Database Service (RDS) and discover benefits from using it.
As already commented, read the docs and whitepapers.
Why RDS is better than manually installed PostgreSQL database in EC2 instance?
you can be sure it is well setup, you will get point in time recovery, backups and high availability. As well you can set it up yourself, however using RDS you have it all already configured.
Ifs it possible to connent existing database in EC2 instance with Amazon RDS? How it really works?
you don't have access to any underlying configuration, so nope, you cannot really connect ec2 database w/ rds (e. g. wal for wal streaming).
you still can use database migration tools to migrate all databases and updates to or from rds
How I should automation RDS? When I want create new database in existing EC2 instance I can use Ansible in simply way.
you can use a cloudformation template or cli commands
How I should connect my application with database which uses RDS ?
when you create a rds instance, you will define an admin user and receive a connection url
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Scenarios.html#USER_VPC.Scenario1

How to use mongodb of another droplet in Digitalocean

Let's say I have two server droplets in digitalocean, but I only want to use the mongodb of the 1st server. How can I connect the 2nd server to the 1st server's mongodb?
What would be the mongourl that i should set on the 2nd server upon deployment?
Thanks in advance!
MONGO_URL=mongodb://12.34.56.78:27017/db_name
Where 12.34.56.78:27017 is the MongoDB droplet's IP and port, and db_name is a custom database name ("meteor" by default).

How to use AWS service for Mongodb and which service?

I just wanted to know, How can I use Mongodb service on AWS. I have seen there is no explicitly service to use Mongodb like for mysql it has RDS.
Any suggestions please...
MongoLab provides a MongoDB service on AWS. Or you can install MongoDB on an EC2 instance. Did you try searching for "MongoDB on AWS" at all?
DynamoDB is Amazons answer to managed NoSQL, the closest you get to MongoDB if you don't host it yourself (on an EC2 instance for example).