This is the final project for the Udacity Cloud DevOps Engineer Nanodegree.
In this project I applied the skills and knowledge that I gained throught the nanodegree program.
This includes:
- Also using Svelte to build up a simple static web app
- Using CircleCI for CI/CD pipeline
- Using CloudFormation for automatic deployment of infrastructure
- Working in AWS
- Using Docker for building containerized apps
- Using NGINX for serving the website
- Using Ansible for automatic configuration of infrastructure
- Using Minikube for building local Kubernetes clusters
- Using CloudFront to access the website content
Did you ever get bored? Kept wondering around and surfing the internet for something interesting? Kept searching for something with type & accessibility?
This simple project makes use of Bored API and built a static web app around it which helps you to find a random task to do/learn whenever you are bored!
So you Don't Get Bored With Me (DGBWM)
- Developer updates the website code using Svelte
- Developer pushes code to GitHub
- CircleCI workflow starts:
- Lint
- Build
- Create Docker image and push to Docker Hub
- Use CloudFormation to create AWS infrastructure
- Use Ansible to configure infrastructure
- Use Ansible to start Kubernetes cluster
- Use AWS CloudFront to access the website
├── ansible # Ansible
│ ├── ansible.cfg # global ansible configuration
│ ├── inventory.txt # inventory for hosts to run on
│ ├── roles # Roles for ansible playbooks
│ │ ├── install-tools # role to install needed tools
│ │ └── k8s-cluster # role to enable/start minikube cluster
│ └── setup-server.yaml # main ansible playbook
├── architecture # Architecture Diagrams
│ ├── cloud.svg
│ ├── cluster.svg
│ └── workflow.svg
├── .c9 # AWS Cloud9
│ └── resize.sh # script to resize cloud9 instance
├── .circleci # CircleCI
│ └── config.yml # config file for CI/CD pipeline
├── cloudformation # AWS CloudFormation
│ ├── cloudfront.yaml # create cloudfront stack
│ ├── network-params.json # params for network stack
│ ├── network.yaml # create network stack
│ ├── servers-params.json # params for servers stack
│ └── servers.yaml # create servers stack
├── deploy.sh # Deployment shell script
├── Dockerfile # Dockerfile for build the image
├── k8s # Kubernetes
│ ├── deploy-cluster.yaml # create deployment and needed services
│ └── ingress.yaml # create nginx ingress
├── Makefile # Makefile having targets to automate tasks
├── nginx # nginx server configuration
├── package.json
├── package-lock.json
├── README.md
├── run.sh # Script for create/update/delete CloudFormation stacks
└── src # Source code of website
In order to start working with the project you shall install the needed tools
Most of the steps are automated using the Makefile
To know all available targets use $ make list
$ make list
install-hadolint:
install-circleci:
install-k8s:
install-minikube:
install-docker:
install-ansible:
install-yq:
install-local:
build-local: install-local
run-local:
lint: install-local install-hadolint
build-image:
push-image: lint build-image
run-server: build-image
create-network:
delete-network:
create-servers:
delete-servers:
delete-stacks: delete-servers delete-network
run-cluster:
delete-cluster:
list:
Install needed tool
$ make install-* # where * to be replaced with the name of tool needed
- Build locally
$ make build-local
- Install locally (for debugging)
$ make run-local
- Visit website, go to
http://localhost:8080
- Make sure that docker is installed
docker version
- Build image locally
make build-image
- Run docker container
make run-server
- Test by visiting
http://localhost:80
- Make sure Minikube is installed
minikube version
- Run cluster locally
make run-cluster
- Get cluster IP
minikube ip
- Curl or visit browse
http://<minikube ip>:80
- After finishing, clean up everything
make delete-cluster
In order to play around the website, please visit DGBWM