XenonStack

A Stack Innovator

Post Top Ad

Showing posts with label cloud and devops. Show all posts
Showing posts with label cloud and devops. Show all posts

Monday, 6 February 2017

2/06/2017 11:16:00 am

Building Serverless Microservices With JAVA


Serverless Architecture


The phrase “serverless” doesn’t mean servers are no longer required. It solely proposes that developers no longer have to think that much about them.

Going serverless lets developers shift their focus from the server level to the task level which is writing codes.


serverless microservices with java


 

What it means to have servers?


First, let’s talk about what it means to have servers (virtual servers) providing the computing power required by your application. Owning servers comes with responsibilities -
  • Managing how the primitives (functions in the case of applications, or objects when it comes to storage) map to server primitives (CPU, memory, disk etc.).
  • Own provisioning (and therefore paying) for the capacity to handle your application’s projected traffic, independent of whether there’s actual traffic or not.
  • Own managing reliability and availability constructs like redundancy, failover, retries etc.

Advantages of going Serverless


Why should one move to serverless architecture can be adequately described through its benefits.

  • PaaS and Serverless - A user of traditional PaaS have to specify the amount of resources—such as dynos for Heroku or gears for OpenShift—for the application. The Serverless platform will take care of finding a server where the code is to run and to scale up when necessary.
  • Lower operational and development costs - The containers used to run these functions are decommissioned as soon as the execution ends. And the execution is metered in units of 100 ms, You don't pay anything when your code isn't running.
  • Fits with microservices, which can be implemented as functions.

Serverless architectures refer to applications that significantly depend on third-party services (knows as Backend as a Service or "BaaS") or on custom code that's run in ephemeral containers (Function as a Service or "FaaS").

But there are cons related to moving your application to FaaS which is discussed in our next post: Building Serverless Microservices with Python

Simplest way of thinking about FaaS is that it changes thinking from "build a framework to sit on a server to react to multiple events to "build/use micro-functionality to react to a single event."

How to migrate to a Microservices Architecture?


In a simple definition, Microservices are independently scalable, independently deployable systems that communicate over some protocols HTTP (XML, JSON), Thrift, Protocol Buffers etc.

Microservices are Single Responsibility Principle at code base level.

Below are some of the factors that can be followed to build Microservices:
  • One code per app/service: There is always a one-to-one correlation between the codebase and the service.
  • Explicitly declare and isolate dependencies: This can be done by using packaging systems.
  • Use environment variables to store configurations.
  • Strictly separate build, release and run stages.
  • Treat logs as event streams. Route log event stream to analysis system such as Splunk for log analysis.
  • Keep development, staging, and production as similar as possible.


Microservices Architecture: Benefits


Microservices Architectures have lots of very real and significant benefits:
  • Systems built in this way are inherently loosely coupled
  • The services themselves are very simple, focusing on doing one thing well
  • Multiple developers and teams can deliver independently under this model
  • They are a great enabler for continuous delivery, allowing frequent releases whilst keeping the rest of the system available and stable
In this post, we will implement a Nexastack function which integrates with a database(MongoDB used here).

We are going to implement this new function in Java using Spring Framework. So, Let’s get started -

Employee Service


We are going to build an Employee Service consisting of a function to show Employees information from the database.

For Demo purpose we are here implementing one function “GetEmployee”.
serverless microservices with java

1. Setting up MongoDB Instance 


  • Install MongoDB and configure it to get started.
  • Create Database EmployeeDB
  • Create table Employee
  • Insert some records into the table for demo.
  • Write a file “config.properties” to setup configuration on the serverless architecture


serverless microservices with java


 Continue Reading the full article at: XenonStack.com/Blog

Friday, 27 January 2017

1/27/2017 01:17:00 pm

How To Adopt DevOps in your Organization




While Scaling up the Business and working with remote teams with different Skillset and culture, I realize the need of processes and automation to improve the productivity and collaboration.

At growth Stage, with 3+ Years experience of delivering more than 55 projects in various domains for Startups and Enterprises including:

  • Mobility
  • BigData
  • Internet of Things
  • Private Cloud and Hybrid Cloud

Problems Faced By Developers & Operations Team


  • Ownership Issues during deployment
  • Fewer and Slow Releases
  • Flat Access Control and Security
  • Revision Control
  • Scaling up resources for application Stack
  • Manual processes involved in Delivery pipeline
  • Isolated Declaration of Dependencies
  • Single Configuration for Multiple Deployments
  • Manual Testing results into Slower release
  • Shared backing Services

Lean Start To Adopt DevOps


We Started transformation towards DevOps Strategy by adopting processes like Integration of DevOps Tools, Processes and Data into our work Culture.

Parallely, We Started adopting different Infrastructure architectures, Building Private Cloud,  Docker, Apache Mesos and Kubernetes.

Steps We taken to adopt DevOps

  • Enforcing Rules with the help of right tools - Agile board integration with SCM, Build Tool and Deployment Tool
  • Collaboration Tools - Rocket Chat Integration with Taiga, GitLab, Jenkins
  • Continuous Integration and Delivery
  • Explicit Dependency Management
  • Automated Testing
  • Hands on Training

We started by creating two separate teams from existing pool of developers to adopt DevOps culture for new Projects in BigData and Mobile Applications.

After Initial hurdles in adaptation to Collaboration Tools and new delivery pipeline,  results came out were extraordinary.

Results After Initial Phase


  • Improved Performance & productivity
  • Less Manual work
  • Better Collaboration and Communication
  • Developers getting more Empowered and Involved in Delivery
  • Proper Dependency and Configuration Management

Challenges In First Phase


  • Cultural Shift in the way Things were being developed
  • Changing Mindset for Adaptation
  • Support for Legacy Environments
  • Integrating Security and Compliance on new Setup
  • No support for Overlay Networks

Overall Results


Deployed Solution in Healthcare Startup


Then we implemented this approach in our HealthCare Startup RayCare where we were having multiple work flows and Big Data loads.

The Technology Stack for the startup was latest and cutting edge and tall enough to leverage Microservices.

  • Stood up Development, Staging and Production Environment with almost Zero Parity.
  • Jenkins Jobs for Android, iOS, Angular and Backend.
  • Highly Available and Distributed Cassandra Cluster.
  • Ansible Playbooks for turning up and down environment with one command.
  • Using Docker for Development and Staging Environment.

Deployed Solution in Analytics Startup


Introducing DevOps practices in an Analytics Startup with well experienced Database Administrators was altogether a great experience.

The aim was to fasten data loading, database provisioning and isolating environments for a team working on 3 distinct location.

The main highlights of the implementation are:

  • Bridging gap between 3 different development location by using relevant tools to improve collaboration.
  • Writing scripts to automate the process of Data Operations as much as possible.
  • Application Delivery Pipeline of an app with multiple versions running for different clients at same time.

Deployed and collaborated with Oracle Partner for Service Now Integration & DevOps


The aim was to integrate complex Oracle Enterprise Manager (OEM) with Service Now, a popular IT Services Management solution for easing provisioning of Oracle based resources through Service Now. The solution provided capable of:

  • Automating Oracle DB Binaries Provisioning.
  • Running Chef Recipes from Oracle Enterprise Manager.
  • A Restful Service to trigger DB Provisioning Recipe.
  • Item listing in Service Now to trigger Restful Service on successful transaction of item.
  • Admin approval process for infrastructure process.

Deployed Solution in WebRTC based Calling Platform –Web & Mobile App


The company is fully dedicated to free calling App for mobile iOS and Android platform like iOS, Android to phone number with facility to call all around the globe.

The technologies used are VMware, Couchbase, PostgreSQL, CentOS 7, Zabbix and many more

Hardware: From OVH dedicated server

Virtualization: Using Vmware bare metal

All services: on VMware Virtual Machines

The system had more than 10 NodeJS Apps, Highly Available and Distributed CouchDB Cluster which was changed to MongoDB in later stages.

We made the application delivery pipeline fully automated using Ansible and Jenkins. The infrastrucutre was also made mutable using Ansible to scale up and down according to load.

Deployed Solution For Microsoft Technology Stack in HealthCare Wellness


Migrating applications powered by .NET Ecosystem to DevOps powered application lifecycle pipeline is a challenging job. The application was deployed on private cloud powered by Openstack with the following features:

  • Openstack Images for .NET Ecosystem.
  • Jenkins Jobs for Continuous Integration
  • Integration of Openstack with Object Storage powered by Ceph.
  • Visual Studio Integration with popular DevOps Tools.

Summary


During Transformation Towards Agile & DevOps  we realised that DevOps needs a platform where we can define workflow with different Integrations -