Shard Cluster Deployment & Configuration | MongoDB

MongodDB clustering is one of major requirement when it comes to the production critical environments. It can be clustered as several ways including replica cluster, shard cluster, and here we are going to cluster it with shard clustering mechanism. This cluster type has several advance capabilities.

  • Ability to split data sets across multiple data nodes.
  • Ability to easy scale up/dow horizontally when it is required.

In this scenario, we need to provision several servers together with mongoDB installed for configure the shard cluster.

I do use the following servers here for demonstrate the shard cluster installation. You can use as the same here for avoiding some of configuration mistakes. If you are not installed MongoDB use this Install MongoDB link here.

  • Mongo Query Router : mongodb-mongos
  • Configuration Server Primary : mongodb-config-01
  • Configuration Server Secondary : mongodb-config-02
  • Shard – 01 : Primary Node : mongodb-shard-server-01
  • Shard – 01 : Secondary Node : mongodb-shard-server-02
  • Shard – 02 : Primary Node : mongodb-shard-server-03
  • Shard – 02 : Secondary Node : mongodb-shard-server-04

Let’s follow the given steps to come up with a best approach of shard cluster creation.

  1. Log in to the AWS console and create an EC2 instance with MongoDB install, in order to install mongoDB use the following tutorial of Installing MongoDB on AWS Linux.
  2. Once the MongoDB installation done, clone it and relaunch EC2 machines using the cloned image five times in order to create necessary servers for the cluster environment. You can use Amazon AMI to clone the existing machines.
  3. Once you are done with all machine setups, make sure all the EC2 machines are accessible from each other in the cluster. As well as make sure to configure the hostnames in all machines as stated in above in the tutorial.
    Read More »
Advertisements

AWS CodePipeline for Continuous Delivery & Continuous Integration

AWS Codepipeline is one of the best CI/CD tool and which can be configured from developers’ code changes through production deployment. This tool visualizes and automates workflow and can be integrated with pre-configured tools to make the flow easier.

aws-code-pipeline
AWS CodePipeline

As in the above figure, AWS CodePipeline has been divided in to five categories.

Source : This is where the code repository is configured, this can be a 3rd party repository or AWS Codecommit lab. Any code change will be triggered soon after the code repository is updated.
Read More »

Automate EC2 Instance Start/Stop Using AWS Lambda.

AWS is one of the most purpler cloud service providers and most of the companies, individuals are using features are used in here. If user wants to start/stop EC2 instances after the R&D is done, why do we pay more for some 3rd party applications. Now you can use AWS Lambda instead of other 3rd party applications.

aws-lambda

AWS Lambda is free for up to some level as follows. And instance start/stop can be integrated with a Lambda function in order to accomplish the task. A lambda function is where we list the task that we want to execute during lambda function runs.
Read More »

VM Provision In Google Cloud Platform

Following is the way to create an Google Cloud account.

Load the Google cloud platform URL and signup with the appropriate details. While creating account you will be asked to enter your credit card details, don’t worry about it because they are offering $300 free 60 days for our experimentations. Just enter your credit card details, they won’t change you until you give the proper permission.

– Once your account is successfully created, you will be given the dashboard as follows. Then you can select start with Compute Engine.

  1.  let’s follow the below steps to create a Linux machine step by step.
    Open the Google Cloud Dashboard and click on Try Compute Engine, then you will be placed in to some tutorials at the first time. In tutorials click on the “select a different project” and then click on drop down and create a new project.
    Read More »