Tuesday, April 2, 2019

Set Up & Get Started with MongoDB Atlas Cluster

In this post we will go through the set up of MongoDB Atlas. MongoDB Atlas is fully managed, scalable, reliable and secure Database As A Service from MongoDB.

Below is the link to know more about Atlas.


In this post we will go through, how easy it is to set up your MongoDB Atlas Instance and start working with MongoDB Database and Collections.

MongoDB Atlas supports latest version of MongoDB 4.x (Currently) and also has back support for 3.6

MongoDB Atlas provisions MongoDB Cluster on underlying infrastructure of cloud vendors. Currently it supports three cloud vendors - AWS, AZURE & GCP. You can leverage all the features of these cloud vendors while deploying MongoDB Atlas.

Ok So lets get started.

MongoDB Atlas lets create free MongoDB Cluster for M0 shape. You can register and get started to create your free Atlas Cluster.

Need to open url https://cloud.mongodb.com

Upon Login you will see below Console where you can access cloud resources like Clusters, Stitch, Charts, Backups.

Now we will go ahead and create a free tier 3 node MongoDB Atlas Cluster.

Click on Build Cluster from above screen.

The next screen will show various options which we need to select in order to create our cluster.

First one is selecting Cloud Provider and Region.

I would suggest to use the Free Tier Available for creating cluster free of charge.

Here we selected N.Virginia from AWS. You can select any region marked as Free Tier Available from any of the three cloud provider based on your requirement, skillset and strategy.

In Next section, we need to select the Cluster Tier.

Here we will select M0 Cluster to be in Free tier. You may select any shape for your environments based on your requirements. Price points are mentioned in the section.

Friday, August 3, 2018

Set up Oracle Cloud Infrastructure DNS to use Domain Name

In this post we will configure Oracle Cloud Infrastructure DNS feature to Map a Domain name. This is a required step to Map the Load Balancer IP Address to a domain name so that users can access your Application/Web Servers inside the cluster with a domain name in the browser.

Below are the pre requisites for setting up Domain Name and Load Balancer Mapping in OCI.

  • Existing Domain Name. If you do not have, you can buy it from any vendor e.g. godaddy,bigrock.. etc. In this post I will use my domain : rohanwalia.com
  • Working Oracle Cloud Infrastructure Set Up - Two Web Instances in different Availability Domain with Load Balancer configured in Front.
  • For this Example, we have Two Web Servers (Backend Servers) - Webserver1 & Webserver2 in two Availability domain's as Backend Set. Load Balancer is configured to spread load to Webserver1 & Webserver2 on Port 80. Listener is configured to listen http traffic on Load Balancer IP address on Port 80.
*** All IP Addresses and Name Server  have been masked for security reasons.

Ok so we are good with the Set up. Let us configure OCI DNS Service to use Domain Name.

First, go to OCI DNS Service home page from OCI Account.

Monday, July 16, 2018

Docker Playground : Simplest way to Test - Deploy & Scale of Containers on Docker Swarm

Dockers & Containers have pretty much entered into every Developer or IT Ops daily life. Docker provides an easy way to create Docker Images of applications using DockerFile and then test these application images by running containers.

Testing applications using containers is quick and easy but the real challenge is when Testing - Deploy & Scale of applications on Cluster. This is the real production level scenerio is.

One way to do these kind of Testing is to set up Docker Swarm Cluster manually on IaaS. You can refer to my earlier post Multi Node Swarm Cluster on Oracle Cloud Infrastructure Classic . The posts describes how to configure Swarm Cluster on OCI-C. Same can be used for different Cloud Service Providers. The other option is to Use managed Container Cluster Services provided by Cloud Service Providers.

The problem with above two approaches is that they will charge you not much but some $$. The above methods are good option if you want persistent Cluster to be there for testing your workloads.

But if you just want to test your container services on cluster's as well as test scaling of these services, there is a simple way out.

Thanks to Docker Play Ground : Play With Docker

Thursday, March 29, 2018

Webhooks for Github & Jenkins Integration - CI/CD Pipeline

In this post we will look at how we can use Webhooks feature of GitHub to Integrate Github with Jenkins.

Webhooks is a really a cool feature which helps to Integrate GitHub with Jenkins on the Push Events in Github.

There is a feature in Jenkins to Poll SCM for every configured number of Minutes/hours for change in the code. This way Jenkins is polling on SCM. Better/Preferred way is to use Webhooks for this integration where Whenever there is a Push in Github, a Payload is sent to Jenkins with Push/Commit details and New Pipeline is Initiated.

Pre Requsites
  1. Jenkins Server Installed on any IaaS or Local VM.
  2. Github Login Credentials
  3. Code Repository in GitHub with Sample Code. I have forked a code in my repo and added JenkinsFile which you can use as it is MyGitHubRepo.  Or You can also fork from Original Repo

Architecture Diagram

Lets Get Started

Configuring Jenkins

First Step in Configuring Jenkins is to Install GitHub Integration Plugin. Log into Jenkins Server and Click Manage Jenkins. Click Manage Plugins.

Click on Available Tab and Filter with Github.

Click Download Now & Install after Restart.

Create & Configure New Pipeline

Click Create New Item and Click Pipeline. Give a name to the new pipeline & Click OK.

Thursday, March 15, 2018

Multi Node Swarm Cluster on Oracle Cloud Infrastructure Classic

In this post we will see how we can build Multi Node Docker Swarm Cluster on Oracle Cloud Infrastructure Classic.

To Start, we will create Three Nodes in the Swarm Cluster with One Nodes as Manager and other two nodes as Worker Nodes. Any Number of nodes can be added in the same fashion to scale the cluster.

Architecture Diagram

Pre Requisites 
  • Oracle Infrastructure Cloud Account :  If you do not have account, you can sign up for Free Trial account at : https://cloud.oracle.com/en_US/tryit
  • Basic Knowledge of Dockers & Containers
  • Basics of Swarm Clusters

Thursday, October 13, 2016

Create Windows Instances on Oracle Infrastructure as a Service - Step By Step

In this post we will see how we can create Windows Instances on Oracle IaaS (Infrastructure as a Service) with desired Image (Windows Version) , Compute , Memory , Disk as well as enabling Remote Desktop service. At last we will enable RDP Connections to the instance and will try to connect.

Lets Get started.

Login to the cloud portal using Identity domain, Username & Password Information. Go to Compute service console. Click Instances and click create instance.

Click on MarketPlace to search for Windows Image.

Monday, June 13, 2016

Create Oracle Cloud Database Connection in Jdeveloper 12.2.1

While doing development on J2EE and ADF very often it is needed to create Oracle Database Connection from Jdeveloper. Jdeveloper provides a wonderful easy window to create and manage multiple Database Connections.

Since the environments have started to move to Cloud much often it is required to create Database Connection for the Oracle Database which is hosted on Oracle Database Cloud Service (DBCS).

There was no way to create SSH Tunnel in Jdeveloper and one has to tunnel the traffic using Putty or SSH command and then use the localhost in jdeveloper database connection window to create successful connection to Database on Cloud.

Jdeveloper 12.2.1 solved this problem by providing a very nice SSH Tunnel window in Database Connections Set up. This SSH Tunnel Configuration can be used to do configure the tunnel and use SSH Public key and user to create the connection.

Below is the process for creating a successful Database Cloud Instance connection from Jdeveloper 12.2.1

On clicking + sign for adding new connection, below window pops up.