Giter VIP home page Giter VIP logo

final-capstone's Introduction

Cloud DevOps Capstone Project

Overview

This project aims to develop a CI/CD pipeline for microservices applications with blue/green deployment. The CI step includes a simple linter, and the CD steps include:

  • Pushing the built Docker container(s) to the Docker repository
  • Deploying these Docker container(s) to a small Kubernetes cluster using AWS Kubernetes cluster
  • Building these steps in Jenkins pipeline

Steps

Click to expand
  • EC2 Instance with Ubuntu 18.04
  • Install Jenkins & plugins
Jenkins plugins: 

Amazon Web Services SDK 
Ansible plugin
Ant plugin
Blue Ocean
CloudBees AWS Credentials Plugin
Docker Pipeline
GitHub Pipeline for Blue Ocean
Pipeline: AWS Steps
  • Add IAM policy for blue/green deployment

  • Add AWS credentials in Jenkins

  • Add Docker credentials in Jenkins

  • Install docker

  • Install dependencies to deploy cluster with AWS EKS

  • Create AWS keypair for cluster and create cluster using eksctl

  • Create blue & green branches, each with the following files:

    • Dockerfile
    • Jenkinsfile
    • our "app": index.html
  • Build Jenkins pipeline

Screenshots requirements

Click to expand

Legit Linter

Breaking the code in index.html break-html

BlueOcean view in Jenkins linter1

Jenkins Console Output linter2

CloudFormation Cluster

cf

ec2

Blue Deployment

jenkins-blue0

jenkins-blue

blue-site

Green Deployment

jenkins-green0

jenkins-green

green-site

Problems I ran into / Lessons Learned

Click here to expand
  • Unable to push to docker using Jenkins, even after adding docker credentials to Jenkins. Finally found a way to have Jenkins use docker credentials with withDockerRegistry([ credentialsId: "dockerhub", url: "" ]).

  • Installing kubectl on Ubuntu user instead of Jenkins user caused issues where Jenkins is unable to run kubectl commands. My workaround is using sudo su ubuntu -c to run it.

  • Switching between blue and green app doesn't show at first, but later realized it must be cached. By switching to incognito, I was able to see the switch.

final-capstone's People

Contributors

whatupfoo avatar

Stargazers

Anne Thorpe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.