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

Install MongoDB on Amazon Linux | MongoDB

MongoDB is an open-source, cross platform, highly scalable and flexible database. The main key feature is on the MongoDB which goes with NoSQL, therefore the data can be stored as documents or the collections, Those collections can be restored as JSON format as well. Therefore MongoDB is a using mostly in enterprise level environments.
Installation of MongoDB is straight forward, and this tutorial describes about the

  1. Log in to the AWS console, provision an EC2 instance with Amazon AMI.
  2. Update the yum.repo.d/mongoDB-v4.0.repo file for download the v4.0 in MongoDB.
    [mongodb-org-4.0]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/4.0/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
  3. To update update yum repo in the servers issue the following command.Read More »

GitLab Installation | CentOS 6.x

This tutorial describes the steps to be installed GitLab WebUI server on CentOS 6.x edition. Before we move forward, let’s see what is this GitLab, it’s a web based code repository for management , review and issue tracking. Developers no need to worry about whatever the development methodology, is a waterfall, Agile or any traditional methods, it always streamline the collaborate development workflow up to the CI/CD pipelines.

gitlab-landscape

This tool is basically opensource tool and anyone can setup the server easily for their testing or in-house development. As in git lab it comes with a visualize dashboard with monitoring as well, Further, developers could get stats for the projects as well.
Read More »

Semantic Versioning

When the development scope is being incremented, the complexity of development, Testing & Releases would be more complicated in Continuous Integration & Continuous Delivery pipelines. Downloading dependencies in software packages, and versioning is even more complicated of frequent releases if there is no well defined mechanism. Semantic versioning is one of the solution for reduce this complicated hassle.

Version is more important to developers to track their historical tracking, it gives a well defined versions of software releases. Therefor it adds more befits to the software development as well as CI/CD pipelines.

Benefits of Semantic Versioning

  • Historical tracking of code development.
    At any point developers can get the idea of code status from any historical point.
  • Universal builds packages are available to anytime deployment.
    Build can be triggered from any of previous tags, and it includes all the required dependency and other configurations. Therefor those tags can be easily used for build project deliverable as required from history.
  • Easily identify the code changes including API, functional and bug fixes.
  • Helps to manage releases and code development.

Semantic Versioning Format

semantic-versioning
There are three Major parts are in semantic versioning, Major, Minor & Patch.Read More »

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 »

TURN Server | Installation & Configuration On AWS

This blog post describes the way how to deploy and configure Google TURN server with all required steps. Mainly this installation and configuration has been tested on AWS(Amazon Web Services) cloud computer and confirmed. Because there are some connectivity issues while connecting to the TURN server remotely.

  1. Login to the AWS console and go to the EC2 menu and then launch new instance. In here there is called “Community AMIs”, go to that option and select the AMI called “rfc5766-turn-server”.
    Screen Shot 2015-03-24 at 10.37.52 AM
  2. There are several AMIs are listed under “rfc5766-turn-server”, take the latest version of the TURN server AMI and launch it with the relevant CPU, Memory, HDD, Network ,etc.
    Screen Shot 2015-03-24 at 10.42.17 AM
  3. Read More »