Git Product home page Git Product logo

udacity_cloud_devops_capstone's Introduction

Udacity Cloud Devops Final Project - Capstone

This is my final submission of the Cloud Devops Engineer Project - Capstone

Project Scope

The scope of this project is to apply my collective skills and knowledge to create a CI/CD blue/green pipeline.

I've decided to follow the project suggestion of deploying an 'index.html' file using Nginx.


Step 1: Propose and Scope the Project

  • Pipeline will be: GitHub -> Jenkins -> Docker -> Kubernetes

    • Push new code to repo
    • Jenkin lints all files in the repo
    • If successful, then jenkins will build a docker image
    • Deploy the docker image to dockerhub
    • Image updates on Kubernetes cluster
  • I will use the blue/green deployment found HERE

  • Pulling a Nginx image and displaying the index.html file

Step 2: I'm using the standard Jenkins in a blue/green deployment

  • I created an EC2 instance in us-east-2 that will be my Jenkins server
  • In order for the Jenkins environment work correctly, I had to install the following packages/modules:

Jenkins Plugins Installed

- BlueOcean
- Config API for Blue Ocean
- Events API for Blue Ocean
- Git Pipeline for Blue Ocean
- GitHub Pipeline for Blue Ocean
- Blue Ocean Pipeline Editor
- Display URL for Blue Oean
- Blue Ocean Executor Info

Ubuntu packages

- tidy
- awscli 1.18.5
- docker --version = 18.09.7 
- kubectl

Step 3: Create the "Infrastruture"

  • Used CloudFormation to build my Kubernetes Cluster
  • I had to initialize my the Kubernetes cluster

Step 4: Build your pipeline

  • Constructed my pipeline to use my github repo to pull in the files
  • Configureed the deployment pipeline.
  • My Dockerfile is included in the Git repo
  • Before creating and pushing the Docker images, linting is performed on the index.html to verify the syntax is correct.
    • If successful, goes to the next step
    • If not, then the build fails

Step 5: Test your pipeline

  • Tested the pipelines
    • Test 1: Edited the index.html with bad code, then pushed it up to my repo. The build failed due to the linting failure.
    • Test 2: Edited the index.html with proper code, then pushed it up to my repo. The build completed successfully.

Problems Encountered

  • I had to run the following command to resolve the docker error listed below: "sudo chmod 666 /var/run/docker.sock"
Permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Permission Denied
  • After creating cluster in EKS, updated to 1.14 in order manage the nodes (original was 1.13)
  • I found the installed awscli on EC2 was version 1.14, which did NOT have the EKS command. My pipeline would fail on the "upload latest green deployment to AWS Loadbalancer" step due the missing EKS command. The EKS command was added in version 1.15+. This meant I had to update the AWSCLI

Project Submission Checklist:

A Zip file with the following files:

Screenshots

  • Failed Linting of HTML
  • Successful Linting of HTML
  • Jenkins pipeline showing deployment process
  • Screenshot of my AWS EC2 page showing the newly created (for blue/green)

Text Files

  • Text file with link to Github

The ZIP file was submitted on FEB-22-2020

udacity_cloud_devops_capstone's People

Contributors

fbaileyjr avatar frank-bailey avatar

Watchers

 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.