Skip to content

Milestone 2

Kasturi Nikharge edited this page Aug 13, 2020 · 1 revision

Milestones

  • Dockerized all Microservices
  • Establish Communication Over RabbitMQ over the Kubernetes Cluster
  • CI/CD Through Jenkins
  • Kubernetes Master-Slave integration
  • Load Testing using JMeter
  • UI Changes

Our first step was to create dockerized versions of each micro-service. After that, we integrated all microservices to be continuously deployed using Jenkins Thus, Jenkins provided continuous deployment by pushing every new git commit into docker hub ( docker registry) Continuous deployment was achieved via ssh-ing into our kubectl pod through the Jenkins pipeline. Each new build inside the docker hub deploys the image into the Kubernetes cluster.

Architecture

Architecture


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
    Our Website is Deployed at http://149.165.170.140:30030/

Getting Started

If you would like to Deploy the Open Stack API First, make sure you have cloned the project are in the Brogrammers directory. Now, we will start the project setup sequentially. If you'd like to follow the steps through Horizon, please visit this linkfor directions. Here's the list of commands to follow for command line :

  1. Create a security group that will enable inbound ping & SSH:
    openstack security group create --description "ssh & icmp enabled" your_selection
    openstack security group rule create --protocol tcp --dst-port 22:22 --remote-ip 0.0.0.0/0 your_selection
    openstack security group rule create --protocol icmp your_selection
    If you have an SSH key upload id_rsa & id_rsa.pub to nova :
    cd ~/.ssh
    openstack keypair create --public-key id_rsa.pub key_re

Create a private network
openstack network create your_selection_net

Create a subnet within the private network space
openstack subnet create --network your_selection_net_net --subnet-range 10.0.0.0/24 your_selection_net_subnet

Create a router
openstack router create your_selection_router

Connect the newly created subnet to the router
openstack router add subnet $your_selection_router your_selection_subnet

Connect the router to the gateway named "public"
openstack router set --external-gateway public your_selection_router

Verify that the router has been connected to the gateway
openstack router show your_selection_router

Create and boot an instance

Make sure your SSH key name matches. your_selection_instance is the name of the instance; make it something meaningful for you. openstack server create your_selection_master \ --flavor m1.tiny \ --image IMAGE-NAME \ --key-name key_re \ --security-group your_selection-group \ --nic net-id=your_selection_net

Create a public IP address for an instance openstack floating ip create public

Add that public IP address with that instance
openstack server add floating ip ${OS_USERNAME}-api-U-1 your.ip.number.here

SSH into the master instance

SSH into the master instance using the following command :

ssh -i brogrammers.pem [email protected]

To see your pods : kubectl get pods

To see your Deployments:
kubectl get Depoyments

To delete a deployment kubectl delete deployment <deployment-name>

You can then proceed to the Jenkins deployment.

Access Jenkins

Pre-requisite: Clone out repository to begin with: git clone https://github.com/airavata-courses/Brogrammers.git

You can access our jenkins via http://149.165.170.152:8080/

  • Username: brogrammer
  • Password: brogrammer

Test deployment on commit. Commit to any of the following branches and monitor deployment on the Jenkins dashboard.

  • Dockerized-Gateway-API
  • Dockerized-Front-End
  • Dockerized-Data-Retrieval
  • Dockerized-Session-Management
  • Dockerized-User-Management
  • Dockerized_Post_Analysis
  • Dockerized_Model_execution

Kubernetes Fault Tolerance

Faulttolerance

Clone this wiki locally