filmov
tv
MongoDB - Replica Set With Authorization - TR

Показать описание
script;
mkdir -p ~/Desktop/mongo-replica/.data1 ~/Desktop/mongo-replica/.data2 ~/Desktop/mongo-replica/.data3
mongod --auth --keyFile ~/Desktop/mongo-replica/mongokey --port 27017 --bind_ip_all --dbpath ~/Desktop/mongo-replica/.data1 --replSet infra & PID1="$!"
mongod --auth --keyFile ~/Desktop/mongo-replica/mongokey --port 27018 --bind_ip_all --dbpath ~/Desktop/mongo-replica/.data2 --replSet infra & PID2="$!"
mongod --auth --keyFile ~/Desktop/mongo-replica/mongokey --port 27019 --bind_ip_all --dbpath ~/Desktop/mongo-replica/.data3 --replSet infra & PID3="$!"
echo "Waiting for the nodes to become ready."
sleep 10 && mongo --port 27017 -u "root" -p "123456" --eval '
{
_id: "infra",
members: [
{ _id: 0, host : "localhost:27017" },
{ _id: 1, host : "localhost:27018" },
{
_id: 2,
host : "localhost:27019",
priority : 0,
slaveDelay: 5,
tags: { slaveDelay: "true" }
}
]
}
)
'
trap "kill $PID1 $PID2 $PID3" exit INT TERM
wait
mkdir -p ~/Desktop/mongo-replica/.data1 ~/Desktop/mongo-replica/.data2 ~/Desktop/mongo-replica/.data3
mongod --auth --keyFile ~/Desktop/mongo-replica/mongokey --port 27017 --bind_ip_all --dbpath ~/Desktop/mongo-replica/.data1 --replSet infra & PID1="$!"
mongod --auth --keyFile ~/Desktop/mongo-replica/mongokey --port 27018 --bind_ip_all --dbpath ~/Desktop/mongo-replica/.data2 --replSet infra & PID2="$!"
mongod --auth --keyFile ~/Desktop/mongo-replica/mongokey --port 27019 --bind_ip_all --dbpath ~/Desktop/mongo-replica/.data3 --replSet infra & PID3="$!"
echo "Waiting for the nodes to become ready."
sleep 10 && mongo --port 27017 -u "root" -p "123456" --eval '
{
_id: "infra",
members: [
{ _id: 0, host : "localhost:27017" },
{ _id: 1, host : "localhost:27018" },
{
_id: 2,
host : "localhost:27019",
priority : 0,
slaveDelay: 5,
tags: { slaveDelay: "true" }
}
]
}
)
'
trap "kill $PID1 $PID2 $PID3" exit INT TERM
wait
Configure Replicasets in MongoDB | Replica sets | MongoDB Tutorial | DevOps
MongoDB Tutorial for Absolute Beginners : 35 What is MongoDB Replica Set?
Setup MongoDB for Production deployment - Replica Sets cluster
Understanding MongoDB Replication: A Step-by-Step Replica Set Creation.
Mongodb replica sets and failover in 5 minutes
MongoDB Multi-Region Replication: Architecture & Considerations
Setting up an optimized MongoDB replica set on AWS EC2
How to Set Up a Replica Set in MongoDB
[ MongoDB 6 ] How to Deploy a MongoDB ReplicaSet
Setting up a MongoDB Replica Set with Docker - Heart of Software
MongoDB - Replica Set With Authorization - TR
Unveiling the Evolution: MongoDB Replicaset and Its Best Practices - Mydbops Mywebinar Edition - 09
How to deploy a mongodb replica set using Docker
Setup replica set mongodb in 3 mins
Three node replica set (MongoDB)
Configure MongoDB Replica Set on Ubuntu 24.04 LTS
Configure Replica Sets in MongoDB in Hindi | Replica sets | MongoDB Tutorial | DevOps
Replicate MongoDB Database Like a Pro: Complete Step-by-Step Tutorial
Setting MongoDB Replica Set
Adjust Priority for Replica Set Member in MongoDB
Migrate from #MongoDB Replica-Set to a Sharded Cluster - Antonios Giannopoulos & Jason Terpko -
MongoDB Backups using Replica Sets
Spring Boot with MongoDB replica set local set up
Deploying a MongoDB Replica Set across multiple Kubernetes Clusters
Комментарии