Skip to content

Phase_2

Naga Anjaneyulu edited this page Apr 12, 2020 · 7 revisions

Welcome to the Noodle wiki!

System Architecture

ADS_architecture

Tasks accomplished in this milestone

  • Containerization of each service using Docker
  • Setup Kubernetes Master-Slave integration
  • CI/CD using Apache Jenkins to build, test and deploy containers on Kubernetes Master
  • Perform load balancing testing on each microservice using JMeter

Docker

The following micro-services have been dockerized::

  • Dockerized-Gateway-API
  • Dockerized-Front-End
  • Dockerized-Data-Retrieval
  • Dockerized-Session-Management
  • Dockerized-User-Management
  • Dockerized-Data-Processing
  • Dockerized-Data-Modeling

DockerHub

Docker hub credentials::

  • Username: nayeemullahbaig
  • Password: noodlemaster12
  • Repository name: noodle

Whenever there is a push in the development branch, Jenkins builds the docker images of the corresponding microservice branch and uploads it to Docker Hub.

Jenkins

Jenkins - http://149.165.168.118:8080/

  • Username: admin
  • Password: noodlemaster

Flow ::

  1. Utilizes github webhook to build docker image and upload it on DockerHub corresponding to the branch on which the change is pushed.
  2. After this job is executed, triggers Kubernetes master to deploy the new docker image.

Flow

  • Push commit to github repository
  • Trigger to jenkins job to build the jenkins file
  • Runs preliminary tests
  • If passed, publish to docker hub
  • Build Kubernetes pods from docker hub

Getting Started

The Release branch ::

The application is already deployed on Jetstream instances which can be accessed by going to ::

Kubernetes clusters

We have 1 master node and 3 worker nodes.

  • Master 149.165.168.99 user=ubuntu
  • Worker1 149.165.169.26 user=ubuntu
  • Worker2 149.165.168.142 user=ubuntu

Testing Kubernetes

  • For accessing the deployed microservice, you will require the private ssh key.
  • SSH into the master instance using the following command :
 ssh ubuntu@149.165.168.99

KubeCTL commands :

  • We can try the following commands ::

1.) See deployed pods :

kubectl get pods

This should list down all the deployed microservices and their pods with their status, no. of restarts and age.

2.) To check the running services :

kubectl get svc

3.) See logs of pods :

kubectl logs $POD_NAME

4.) Delete a pod for testing :

kubectl delete pod $POD_NAME

5.) Delete all pods for testing :

kubectl delete --all pods

This should delete the pod and then list the pods to see that the pod would have restarted with an age of < 1 minute.

Steps to test Fault Tolerance

  • using kubectl command ::
kubectl get pods
  • Here you can see all the pods that have been deployed by the Kubernetes.
kubectl delete pod $POD_NAME

  • Now select the pod to delete it.
  • You will see a new container automatically being created and a new pod will soon be running on this container.