Capstone project for the 'Cloud DevOps Engineer' nanodegree program from Udacity
By Rob Foster
Updated 08/08/2020
This is my capstone project for the Cloud DevOps Engineer nanodegree program from Udacity.
It does the following:
These are the basic steps for building the environment:
./create.sh capstone-infra capstone-infra.yml capstone-infra.json
./create.sh capstone-k8s-cluster capstone-k8s-cluster.yml capstone-k8s-cluster.json
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubeadm token create --print-join-command
./create.sh capstone-jenkins capstone-jenkins.yml capstone-jenkins.json
ansible-playbook -i inv -u centos --private-key ~/yourkey.pem jenkins.yml
The configuration is now complete. Every time you push code to git you can go into jenkins and click Build Now to trigger a new build and deploy to kubernetes. You can deploy to either staging or production, depending on which branch you commit to in GitHub.
cloudformation/create.sh - create new AWS stack.
cloudformation/update.sh - update existing AWS stack.
cloudformation/delete.sh - delete AWS stack.
cloudformation/capstone-infra.yml - cloudformation script to deploy network infrastructure in AWS.
cloudformation/capstone-k8s-cluster.yml - cloudformation script to deploy kubernetes cluster in AWS.
cloudformation/capstone-jenkins.yml - cloudformation script to deploy a jenkins server in AWS.
ansible/jenkins/* - ansible playbook to further configure the jenkins server. Must be executed manually once the node is running.
Dockerfile - creates docker image running apache for hosting website.
Jenkinsfile - creates jenkins pipeline for deploying to staging and production.
capstone-kube.yml - creates kubernetes deployment and service.
public-html/* - HTML files for website.