Skip to content

Latest commit

 

History

History
68 lines (52 loc) · 3.85 KB

README.md

File metadata and controls

68 lines (52 loc) · 3.85 KB

Capstone Project - Udacity DevOps Nanodegree

Steps in Completing Your Project

Step 1: Propose and Scope the Project

  • For the Docker application you can either use an application which you come up with, or use an open-source application pulled from the Internet, or if you have no idea, you can use an Nginx “Hello World, my name is (student name)” application.

Configured a Java application under the src folder.

  • Pick a deployment type - either rolling deployment or blue/green deployment.

Blue/green has been chosen as a deployment strategy.

The Jenkins pipeline will perform the following operations:

  • Compile the application.
  • Execute tests.
  • Perform linting via the checkstyle plugin.
  • Build a docker image.
  • Push the docker image to the docker registry.
  • Deploy the container to kubernetes on blue and/or green service.
  • Plan what your pipeline will look like.

Step 2: Use Jenkins, and implement blue/green or rolling deployment.

Instructions here

  • Create your Jenkins master box with either Jenkins and install the plugins you will need.
  • Set up your environment to which you will deploy code.

Step 3: Pick AWS Kubernetes as a Service, or build your own Kubernetes cluster.

  • Use Ansible or CloudFormation to build your “infrastructure”; i.e., the Kubernetes Cluster.
  • It should create the EC2 instances (if you are building your own), set the correct networking settings, and deploy software to these instances.
  • As a final step, the Kubernetes cluster will need to be initialized. The Kubernetes cluster initialization can either be done by hand, or with Ansible/Cloudformation at the student’s discretion.

Using EKS instead of cloudFormation or Ansible, which will create 2 separate cloudFormation stacks to configure the cluster itself, and the EC2 Instances for the node group.

EKS Cluster

eks cluster

CloudFormation Stacks

cloudformation stacks

Step 4: Build your pipeline

  • Construct your pipeline in your GitHub repository. Repository Available here
  • Set up all the steps that your pipeline will include. See the Jenkinsfile
  • Configure a deployment pipeline. See the Jenkinsfile
  • Include your Dockerfile/source code in the Git repository. Dockerfile
  • Include with your Linting step both a failed Linting screenshot, and a successful Linting screenshot to show the Linter working properly.

I preferred to print test error instead of linting errors, as with Java you get a detailed report on the jenkins job page pipeline failed pipeline failed

Step 5: Test your pipeline

  • Perform builds on your pipeline.

build pipeline

  • Verify that your pipeline works as you designed it.
  • Take a screenshot of the Jenkins pipeline showing deployment, and a screenshot of your AWS EC2 page showing the newly created (for blue/green) or modified (for rolling) instances. Make sure you name your instances differently between blue and green deployments.

EC2 Instances

EC2 Instances

Blue deployment

jenkins-pipeline-deployment blue deployment

Green deployment

jenkins-pipeline-deployment green deployment