Serverless Technology Spectrum

In this article, I am going to introduce you to Serverless technology in various flavors along with a usecase and its benefits.
What is Serverless? First of all, Serverless does not mean 'No Servers!!' (It is a misnomer). There are various definitions for Serverless, we will try to look at what Serverless means in various contexts.
Let me illustrate through an analogy. Analogy: Let us consider a scenario where, there are a number of doctors (dentists, chiropractors etc) who want to serve their patient, but they do not want to invest in real estate for the clinics, equipment and also do not want the burden of managing/repairing their equipment. To cater to their needs, an investor comes forward and builds a huge building and also procures all the necessary tools and instruments needed by various doctors. When a patient arrives, the doctor will be provided any vacant room and the room will be quickly setup with all the instruments. Once the consultation completes, the room is a…

Terraform Part 2

In the previous post 'Intro to Terraform', I provided an introduction to Terraform. In this post, I will be digging a little bit deeper into how Terraform could be used in real world usecases.

How to use organize Terraform files?We can organize Terraform files so that, each component which we would provision would go into its own .tf file. That way, we can have a modularized approach.
provider.tfThis file would have the provider configuration details, so that any change to provider related config could be done in one place.

vars.tfThis file would have the variables used by every different file. We can variabilize different parts of our infrastructure configuration, like for eg, the CIDR ranges which will be used in VPC and subnet. This way, we can parameterize our provisioning code.
One tf file per Component:We can have one .tf file per component, for instance, a file, a file etc. This way we can isolate changes.
Data Selector:Another important feature which we can…

Bayes Theorem

In this article, let us try to understand Bayes Theorem.
This article has been inspired by the two videos provided in References section. The illustrations used here are my own.

Bayes theorem helps us draw inferences from data. It also challenges our beliefs which could be often biased.
Let us say that we came across a group of athletes from many countries with the athletes from top 2 or 3 popular sports from those countries. 
We will consider a group of athletes who play either soccer or basketball.

The height of one of the athletes is more than 7 feet. What do you think this athlete plays? 
Soccer or Basketball.

Our intuition definitely says that he must be playing basketball.
Now, let us do the math.

The most popular sport played across the globe is soccer (No offense to Basketball!). Let us say we have total of 100 athletes and 90% of them play soccer and 10% play basketball.
That means 90 athletes play soccer.

Now let us see how many of soccer players are more than 7 feet tall. We might hav…

Quick Introduction to Terraform

IntroductionThere are many tools and frameworks available for provisioning infrastructure on the cloud. One of the most popular cloud agnostic tool is Terraform. It is a vital piece of Infrastructure as a Code Service and could be used to tear up or tear down infrastructure. We will learn about some basic nuances of Terraform in this post. 
Installing Terraform:Terraform could be installed by finding the appropriate package and following instructions. (Refer  In this post, I will be using Terraform on CentOS.
Getting Started:Let us try to get our hands dirty. Create a directory, 'scripts' and cd into that.
Run 'terraform --version' to confirm if terraform is successfully installed.
Let us create our first terraform file. Terraform files have an extension of .tf.  So, create a file ''. Let us create a variable called 'name' and try to print it out.

Note the syntax, the variables should be refer…

AWS - Basic Security Considerations

Often the default Security rules in AWS allow highest level of access and this is undesirable in production system. Principle of Least access is the recommended security approach for any secure system.  This article explains how we can apply some specific Security rules to various resources in AWS.
Access to EC2 instancesDo not provide SSH access to EC2 instances in public subnet, which are exposed to outside world. Rather, create a separate EC2 instance which will act like a Bastion server. Let us call the security group associated with this Bastion server as ‘BastionSG’. 
The ‘BastionSG’ should have a security group which will allow a specific IP or a range of IP in corporate network via SSH for allowing inbound access. Expose SSH from all EC2 instances only from the Bastion server by providing the ‘BastionSG’ as the source Security Group.
Access to VPC By default, a VPC will have a NACL(Network Access control) which allows traffic to all. We can create a custom NACL which will restri…

Pivotal Cloud Foundry (PCF) Integration with Elastic Cloud Storage (ECS)

Recently, I was involved in integrating Pivotal Cloud Foundry with Elastic Cloud Storage (ECS), an object storage solution from EMC.

In this post, I'm going to document the hiccups we faced during this integration and how did we resolve this, so that it is easier for other folks who would like to carry out this integration.

References:We followed the blog post, and the service broker code from git hub,

1. application.yml file Configuration:First task would be to update the application.yml file in the broker code to have the correct configuration.

Note the spring profiles created in yml file. The active spring profile is defined in the build.gradle file to be 'development'. So based on that, we need to update the correct section in the yml file.

Under the broker section:
a) Provide a valid ECS namespace name (The namespace name is case sensitive). Under this names…

Microservices based Cloud Native Application - Part III

Preview:This is the third post in the series of Microservices based application development.
The entire series could be found here:
Microservices based Cloud Native Application - Part I

Microservices based Cloud Native Application - Part II

Microservices based Cloud Native Application - Part III

Continuing from previous posts, in this post, I'm going to write about a few challenges which I faced while implementing the Microservices and how did I address them. This might hopefully help other folks who might run into similar issues.

Challenges faced while implementing Microservices:Issue 1:
While using Zuul API, I was getting the following exception, when the angular JS application, invoked the Zuul service. Forwarding error
at at…