Final Project from the Cloud DevOps Engineer Nanodegree Program - Udacity
In this project you will apply the skills and knowledge which were developed throughout the Cloud DevOps Nanodegree program. These include:
Working in AWS
As a capstone project, the directions are rather more open-ended than they were in the previous projects in the program. You will also be able to make some of your own choices in this capstone, for the type of deployment you implement, which services you will use, and the nature of the application you develop.
You will develop a CI/CD pipeline for micro services applications with either blue/green deployment or rolling deployment. You will also develop your Continuous Integration steps as you see fit, but must at least include typographical checking (aka “linting”). To make your project stand out, you may also choose to implement other checks such as security scanning, performance testing, integration testing, etc.!
Once you have completed your Continuous Integration you will set up Continuous Deployment, which will include:
Step 1: Propose and Scope the Project
Step 2: Use Jenkins, and implement blue/green or rolling deployment.
Step 3: Pick AWS Kubernetes as a Service, or build your own Kubernetes cluster.
Step 4: Build your pipeline
Step 5: Test your pipeline
- Perform builds on your 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.
You can find a detailed project rubric, here.
Application:
app
application folderrequirements.txt
dependencies of appCI/CD:
Jenkinsfile
file with Pipeline configurationkubernetes/deployment.yml
file used for deploy to cluster k8skubernetes/aws-auth-cm.yaml
used to allow auth into k8s in aws eks
Infrastructure
infra/stacks
folder with stacks templates in CloudFormationinfra/parameters
folder with parameter use in stacks templatesOutputs:
outputs
folder with screenshotsoutputs/capstone1.png
show the stacks successfully deployed with CloudFormationoutputs/capstone2.png
show the fail linter hadolintoutputs/capstone3.png
show the fail linter pylint(Errors)outputs/capstone4.png
show the fail linter pylint(Warnings)outputs/capstone5.png
show successfully linter pass with 10/10outputs/capstone6.png
show successfully build docker imagesoutputs/capstone7-1.png
show successfully push docker hub(Part1)outputs/capstone7-2.png
show successfully push docker hub(Part2)outputs/capstone8.png
show successfully push to EKS clusteroutputs/capstone9.png
show successfully the page with ELB running without problemsoutputs/capstone10.png
show successfully new deploy to show the Rolling Deployment method - Creathing/Starting new podsoutputs/capstone11.png
show the new pods created and running successfullyoutputs/capstone12.png
show two versions of application, modify using Rolling DeploymentDocker:
Dockerfile
use this file to deploy an image for the app to be runned on a containerUtils/Tools:
Makefile
useful commands to make setup, install, test, lint, run_docker, run_kubernetes, upload_docker, allrun_docker.sh
script to build and start container locallyrun_kubernetes.sh
script to run on Kubernetes locallycreate-stack.sh
script to create stack with CloudFormationupdate-stack.sh
script to update stack with CloudFormationdelete-stack.sh
script to delete stack with CloudFormationmake install
to install the necessary dependenciesYou can run in different ways this app,these are Standalone, Docker, Kubernetes(locally) or in AWS
make run_standalone
You will now access the app on localhost port 8000. http://localhost:8000
utils/run_docker.sh
The script will:
You can now access the app on localhost port 8000. http://localhost:8000
utils/run_kubernetes.sh
The script will:
minikube
)You can now access the app on localhost port 8000. http://localhost:8000
You can delete when you’ve finished the pod with the command kubectl delete pod prediction
and if you use minikube
to test locally you should clean up your resources and delete the kubernetes cluster with a call to minikube delete
to delete it or minikube stop
for pause it.
You need create the whole infrastructure to deploy the app
utils/create-stack.sh network-stack infra/stacks/network.yml infra/parameters/network.json
utils/create-stack.sh iam-stack-jenkins infra/stacks/iam.yml infra/parameters/iam.json
utils/create-stack.sh server-stack infra/stacks/server.yml infra/parameters/server.json
utils/create-stack.sh eks-stack infra/stacks/eks.yml infra/parameters/eks.json
utils/create-stack.sh eks-nodes-stack infra/stacks/eks-nodes.yml infra/parameters/eks-nodes.json
Now you can access to Jenkins to deploy using the pipeline.
You can access the demo using this link