Question

How to setup MongoDB replica set with Business Intelligence (BI) connector on AWS Cloud environment. I...

How to setup MongoDB replica set with Business Intelligence (BI) connector on AWS Cloud environment. I already have MongoDB replica set on AWS Cloud environment. I am trying to generate reports out of the MongoDB data from AWS.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MongoDB Replica Set -> First of all we should known about MongoDB Replica Set

We can achieve high availability and failover with the help of Replica Sets in MongoDB. In this configuration application/client can read and write data from/to primary node. The changes in primary node are replicated to secondary node using oplog (operations log). The secondary node can be used for read only operations depending on the use case. The main advantage of replica set is that it offers automatic failover mechanism in case primary node goes down.

MongoDB BI Connector

Version: 2019.2 Applies to: Tableau Desktop, Tableau Prep

This article describes how to connect Tableau to MongoDB Business Intelligence (BI) data and set up the data source.

Before you begin

Before you begin, gather this connection information:

  • Name of the server that hosts the database you want to connect to

  • User name and password, if MongoDB authentication is enabled

  • Database name associated with the user's credentials, if MongoDB authentication is enabled

  • Are we connecting to an SSL server?

  • (Optional) Initial SQL statement to run every time Tableau connects

You must install and run the MongoDB Connector for BI, version 2.1 or later, before you can connect Tableau to your MongoDB BI data.

Driver required

Make the connection and set up the data source

Replica Set Components:

1. Primary Members: By default, all read, write transactions are made on the primary node
2. Secondary Members: Any changes made on primary nodes are replicated to secondary nodes using oplogs.
3. Arbitar Members: An arbitar is an optional member of the replica set that does not take part in replication. It only takes part in the selection process of new primary.
4. Selection Process: In case a primary node goes down, the automatic selection process takes place between remaining secondary nodes. And if number of secondary nodes are even, arbitar member acts as a tie-broker to ensure decision is reached.

reachaad To emsune de esian cliat lApplicaton Peards Peels Peaoi apel unte Sendarg Peplica t Remany Pe plicaset 5 endany Pepl

1. Setup Replica Sets on Single EC2 Instance

For setting up test environment in few clicks, I am using AWS EC2 (Amazon Linux) for demonstration purpose. You can download Mongo package from MongoDB official website. Once you have MongoDB downloaded, you need to create a data folder for each mongo instances. I’m on a Amazon Linux (t2.micro) and created mongo-data0, mongo-data1 and mongo-data2.

2. Access Replica Sets
If you want you can add each node to have a separate name, to do so you can add the following entry to /etc/hosts:
127.0.0.1 mongo1 mongo2 mongo3
Once done you are ready to connect to Mongo DB Replica Set. You can start accessing replica set by using the command below in your terminal

1

2

3

4

mongo --port 20017

> rs.initiate()

> rs.add("shard1.neerajg.in:27010")

> rs.add("shard1.neerajg.in:27011")

3. Add data to primary node:

At this point we can add objects to the database and they’ll be replicated to the other instances – and you can read from the primary or the slaves.

1

2

db.people.save( { name : "Neeraj", age: 26, emailid: "[email protected]" } )

db.people.find()

4. Check the log files:

Accessing the log files:

a. Primary Replica Logs (27009):

5. Test failover capabilities:

Now to test failover capabities, do the following:

a. You can either terminate terminal running primary mongodb node or extract process id using the below mentioned command and kill process.

1

2

3

ps -ef | grep mongo

kill PID

Generate reports out of the MongoDB data from AWS.

This Quick Start sets up a flexible, scalable AWS environment for MongoDB, and launches MongoDB into a configuration of your choice.

MongoDB is an open source, NoSQL database that provides support for JSON-styled, document-oriented storage systems. Its flexible data model enables you to store data of any structure, and it provides full index support, sharding, and replication.

Use this Quick Start to set up a customizable MongoDB cluster on AWS. You can customize the number of replica sets (1-3), join the replica sets to a sharded cluster, and configure the instance types and Amazon EBS storage attached to the MongoDB nodes.

The Quick Start is for IT infrastructure architects, administrators, and DevOps professionals who want to administer their own MongoDB environment. If you want to set up a fully managed database service instead, you can use MongoDB Atlas. MongoDB Atlas creates a new virtual private cloud (VPC) for your managed databases and automates potentially time-consuming administration tasks such as managing, monitoring, and backing up your MongoDB deployments.

Use this Quick Start to automatically set up the following MongoDB environment on AWS:

  • A virtual private cloud (VPC) configured with public and private subnets across three Availability Zones. This provides the network infrastructure for your MongoDB deployment.*
  • In the public subnets, NAT gateways to allow outbound internet connectivity for resources (MongoDB instances) in the private subnets.*
  • In the public subnets, bastion hosts in an Auto Scaling group with Elastic IP addresses to allow inbound Secure Shell (SSH) access. One bastion host is deployed by default, but this number is configurable.*
  • An AWS Identity and Access Management (IAM) instance role with fine-grained permissions for access to AWS services necessary for the deployment process.
  • Security groups to enable communication within the VPC and to restrict access to only necessary protocols and ports.
  • In the private subnets, a customizable MongoDB cluster with the option of running standalone or in replica sets, along with customizable Amazon EBS storage. The Quick Start launches each member of the replica set in a different Availability Zone. However, if you choose an AWS Region that doesn’t provide three or more Availability Zones, the Quick Start reuses one of the zones to create the third subnet.
Add a comment
Know the answer?
Add Answer to:
How to setup MongoDB replica set with Business Intelligence (BI) connector on AWS Cloud environment. I...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Disclosure: I know nothing about Reports or BI. My education was as a DB Admin, and...

    Disclosure: I know nothing about Reports or BI. My education was as a DB Admin, and I am a Web Developer by trade, and I am out of my depths, aside from doing this from scratch in code. So. There is a request in my organization to track and report on e-mails we send to customers. Getting them into a database and Generating an application shouldn't be a problem, but I would like to consider pre-made options for reporting just...

  • Read this article. Then write a 250 word response on two of the programs you like...

    Read this article. Then write a 250 word response on two of the programs you like the most. Open source business intelligence software 1. BIRT BIRT is an open source BI program that CloudTweaks says is often viewed as the industry standard. BIRT boasts “over 12 million downloads and over 2.5 million developers across 157 countries.” Its users include heavyweights such as Cisco, S1, and IBM (which is also a BIRT sponsor). They also have maturity going for them, as...

  • please answer this after reading the article What is the actual problem? What are the known...

    please answer this after reading the article What is the actual problem? What are the known facts? What decision is to be made? How the problem ought to be solved? What are the alternatives? What are your recommendations? New AI tools make BI smarter — and more useful Data science democratized: What used to take data scientists months to prepare may soon be put together in a few days by data-astute business users. By Maria Korolov, Contributing Writer, CIO |...

  • Case Study 1: Apple Merging Technology, Business, and Entertainment Why are data, information, business intelligence, and...

    Case Study 1: Apple Merging Technology, Business, and Entertainment Why are data, information, business intelligence, and knowledge important to Apple? Give an example of each type in relation to the iPad. (1 Mark) Explain how Apple achieved business success through the use of information, information technology, and people. (1 Mark) Evaluate how Apple can gain business intelligence through the implementation of a customer relationship management system. (1 Mark) Case Study 1: Apple Merging Technology, Business, and Entertainment This might sound...

  • HELLO, I need a new unique answer for these Questions, (USE KEYBOARD TO ANSWER NO HANDWRITING...

    HELLO, I need a new unique answer for these Questions, (USE KEYBOARD TO ANSWER NO HANDWRITING PLEASE) ( ANSWER ALL QUESTIONS PLEASE) Subject : Management Information System MIS 201 Case Study: American Water Keeps Data Flowing American Water, founded in 1886, is the largest public water utility in the United States. Headquartered in Voorhees, N.J., the company employs more than 7,000 dedicated professionals who provide drinking water, wastewater and other related services to approximately 16 million people in 35 states,...

  • INSTRUCTIONS: After reading the attached article, How To Reskill Your Workforce For AI (Artificial Intelligence).pdf your...

    INSTRUCTIONS: After reading the attached article, How To Reskill Your Workforce For AI (Artificial Intelligence).pdf your job is to provide a very brief summary, analysis, and evaluation. We can define these important concepts as follows: Summary- A formal, logical, consistent way of highlighting the main points. Purpose: In school - to quickly and accurately describe something you have read In professional life - to provide a faster-to-read version of the material to other readers In personal life - to reflect...

  • One of the most critical activities that I was involved in my Current IT job was...

    One of the most critical activities that I was involved in my Current IT job was migration of a total data platform of the organization to a New Platform. The client organization we were working for was an insurance giant and the task was to migrate the system that was already in place to a totally new platform. We were aware of the criticality of the issue and the biggest challenge was that the complete responsibility was given to me...

  • Case Study 1: American Water Keeps Data Flowing American Water, founded in 1886, is the largest...

    Case Study 1: American Water Keeps Data Flowing American Water, founded in 1886, is the largest public water utility in the United States. Headquartered in Voorhees, N.J., the company employs more than 7,000 dedicated professionals who provide drinking water, wastewater and other related services to approximately 16 million people in 35 states, as well as Ontario and Manitoba, Canada. Most of American Water's services support locally managed utility subsidiaries that are regulated by the U.S. state in which each operates...

  • I have the files set up in the write place. I am just confused on how...

    I have the files set up in the write place. I am just confused on how to use some of the desire methods to execute this code. // Copy text file and insert line numbers Create a NetBeans project named AddLineNumbers following the instructions provided in the Starting a NetBeans Project instructions in the Programming Exercises/Projects Menu on Blackboard. After you have created your NetBeans project AddLineNumbers and before you attempt to execute your application download and/or copy the text...

  • How do I nicely explain to my daughter while I am not trying to live through...

    How do I nicely explain to my daughter while I am not trying to live through her as I adopted her and her 2 brothers wanted to be a part of their lives? She ran off with an older guy, and found out he is married and has been married before. Now, she has found out as she is pregnant he wants to travel to see his older daughter while she is 7 months pregnant cannot go to the daughter....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT