/udacity-devops-capstone

Udacity Capstone Project for devops which include CI/CD along with running application on kubernetes

Primary LanguageJavaScript

TalhaTZA

Project: Capstone (Udacity Cloud DevOps Nanodegree)

In this project we will apply the skills and knowledge which were developed throughout the Cloud DevOps Nanodegree program. These include:

  • Working in AWS
  • Using Jenkins to implement Continuous Integration and Continuous Deployment
  • Building pipelines
  • Working with Ansible and CloudFormation to deploy clusters
  • Building Kubernetes clusters
  • Building Docker containers in pipelines

We will develop a CI/CD pipeline for micro services applications with rolling deployment. We will take a nodeJS app and dockerize it. Finally we will deploy this in a kubernetes cluster with 3 worker nodes and 1 node balancing instance in AWS. We will use jenkins for the CI/CD. We will also develop your Continuous Integration steps like linting and errors in containers. Finally as post deployment steps, we will perform additional testing by Jenkins whether the app is up and running, check whether it got successfully rolled out and also clean up the docker environment.

Project Overview:

The link of the final application on aws link

Project Home Route

Project Default Route

The application we have used here was developed in the first phase of scholarship, link can be found here .The application is a simple node JS express api which sends response as strings.
An article was also written on medium on how to host express api on heroku with link

Also added circle ci for linting docker files and circle ci build passing badge at the top.

Complete Steps to be followed

  1. Setting up the Jenkins instance - I have used aws ec2 ubuntu machine as the Jenkins instance. I also have added additional plugins in it like blue ocean, aws pipeline etc.

Jenkins Setup

  1. Set up the EKS cluster - The command can be found in the kubernetes folder with cluster_config.yaml

EKS start

EKS end

AWS EKS

  1. Now in order to deploy our app in this cluster, we created a Jenkinsfile which installs hadolint if unavailable, lints the dockerFile , builds and pushes the image on docker hub and executes command for kubernetes using kubectl

hadolint pass

docker push

  1. After Successful deployment our app is up and running at the DNS of the load balancer at port 80.

jenkins deploy success

jenkins deploy check

Helps And References: