deployment of microservice architecture for implementing a ......kubernetes 8/17 nodes next step is...

17
Deployment of Microservice architecture for Implementing a redirection gateway in cloud using docker and Kubernetes Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed Department of computer science and Engineering Frankfurt University of Applied Sciences 1/17 Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed February 13, 2021

Upload: others

Post on 13-Mar-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Deployment of Microservice architecture for Implementing a redirection gateway in cloud using docker and Kubernetes

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Department of computer science and EngineeringFrankfurt University of Applied Sciences

1/17 Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed February 13, 2021

Page 2: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Agenda

Introduction

Microservice Technology and Architecture

Development of microservices using docker and Kubernetes

Deployment of microservices using Google cloud

CI/CD pipeline with Jenkins

Demo

Results, Conclusion & Further research

References

2/17 Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Page 3: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Introduction

Our project uses microservices in a container within the Docker and deploy it in

Kubernetes and google cloud.

Specific Objectives:

1. To analyze the microservices technology;2.To design and deploy a Microservice Architecture using Docker andKubernetes3. Integrating CI/CD Pipeline with Docker and Kubernetes.4. Test and validate the deployment

3/17 Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Page 4: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Microservice Technology

4/17

It is mainly used to solve the problems that comes from Monolithic structures(means tightly coupled)

We are mainly focused on redirection gateway microservice which forwards the requests to individual services

Example: shopping app

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Page 5: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

5/17

The gateway is a REST API and it auto scales based on user specifications

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Architecture

Page 6: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Development of Microservices with Docker

and Kubernetes

6/17

1. We developed services using spring boot

2. We have my-sql database along with the services. We connect the services with my-sql using a network bridge.

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Page 7: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

7/17

We used docker hub to create our images. It contains images of 2 microservices along with one my-sql service and all are containerized.

Created a network for MySQL and configured database credential for making it compatible with our services.

Before uploading to docker hub we will add a tag and then push it to the docker hub repository.

The images on docker hub can be exposed to our local machine and are available for pull step.

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Page 8: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Kubernetes

8/17

Nodes

Next step is to use any platform that provides automated deployment and scaling these dockercontainers

Configured the environment for Kubernetes deployment

Kubernetes contains clusters with multiple nodes. Each node should be l inked with one container from docker hub.

We need a persistent volume like a storage that is provisioned by the admin. we setup MySQL for persisting volume and secret

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Page 9: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Architecture

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed9/17

Page 10: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

10/17

Pers istent Volume

We used minikube to run these deployment commands in Kubernetes

Written yaml fi le for deploying everything on Kubernetes cluster

Autoscaling of pods is possible by increasing the number of replicas for services

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Cluster

Page 11: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Deployment of microservices using google

cloud

11/17

We implemented this deployment step using google cloud. Firstly, setup Environment for google cloud.

Create cluster using SDK

Push docker images in google cloud registry from docker hub.

Then deploying the docker images in Kubernetes engine

Exposing the images and accessing it virtually

Demonstration of our steps

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Page 12: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Cluster IP Load balancer

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Cluster IP Vs Load balancer

12/17

Page 13: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed

Ingress Node Port

13/17

Page 14: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

CI/CD pipeline with Jenkins

Purpose of CI/CD

Environment setup

Create and run pipeline script

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed14/17

Page 15: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Demo

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed15/17

Page 16: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

Results, Conclusion & Further research

Results:Successfully deployed our servicesThe Integration of the CI/CD Pipeline with docker and Kubernetes done

Conclusion:Objectives were achieved

Further research:Security considerationTraffic Analysis(Throughput analysis)Dynamics of data managed by third party

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed16/17

Page 17: Deployment of Microservice architecture for Implementing a ......Kubernetes 8/17 Nodes Next step is to use any platform that provides automated deployment and scaling these docker

ReferencesDeploy spring boot + mysql application to docker. Available at https://www.javainuse.com/devOps/docker/docker-mysql (21.01.2021)

Ruth G. Lennon Brandon Thurgood. Cloud computing with kubernetes cluster elastic scaling. Proceedings of the 3rd International Conference on Future Networks and Distributed Systems, 2019.

“Evaluating the Monolithic and the Microservice Architecture Pattern to Deploy Web Applications in the Cloud” by Mario Villamizar, Oscar Garcés, Harold Castro, Mauricio Verano, Lorena Salamanca, Rubby Casallas.

“DEPLOYING A DOCKERIZED APPLICATION WITH KUBERNETES ON GOOGLE CLOUD PLATFORM” by Robert Botez1 , Calin-Marian Iurian1 , Iustin-Alexandru Ivanciu1 and Virgil Dobrota1

Vaibhav Bejgam, Sriniketan Mysari. Continuous integration and continuous deployment pipeline automation using jenkins ansible. 2020.

Appendix:Full code is available at:https://github.com/abdullahalnoman8/cloud_deployment

Tomusange Brian, Sarath chandra Mallineni, Abdullah Al Noman, Asad Ahmed17/17