Capstone project of the Cloud DevOps Engineer Nanodegree at Udacity, showcasing the use of several CI/CD tools and cloud services covered in the program Udacity - AWS Cloud DevOps Engineer.
This project deploy a simple Node express application using CircleCI and a Kubernetes (K8S) cluster deployed in AWS EKS:
- Building CircleCI pipelines to implement Continuous Integration and Continuous Deployment
- Using AWS, Ansible and CloudFormation to deploy clusters
- Building Kubernetes clusters
- Building Docker containers in pipelines
The project build a Docker image and then run it in a Kubernetes cluster.
The project includes the following main tasks:
- Test the project's code using linting:
make lint
- Lints shell scripts, Dockerfile and Javascript code
- Create a Dockerfile to containerize the Nodejs application: Dockerfile
- Deploy to a public Docker Registry:
- The containerized application: hello-world
- Deploy a Kubernetes cluster
- config cluster using Ansible
The CircleCI pipeline(config.yml) will execute:
- Code lint
- Build and publish the Docker container image
- Deploy K8s and management stacks
- Deploy newest Docker Image
Linting is used to check if the Application and Dockerfile is syntactically correct, making sure that the code quality is high. This project uses ESLint and Hadolint.
Run a CircleCi Pipeline to test and deploy changes to the Cluster using Ansible.
Check the deployments after the EKS Cluster has been successfully configured using Ansible within the CI/CD Pipeline
using kubectl
:
Access the app using Public LB DNS: http://ab3f63419d5f94c47bc90793e46b51e5-1326747092.us-east-1.elb.amazonaws.com/
- Circle CI: CI/CD service
- Amazon AWS: Cloud services
- AWS EKS: Amazon Elastic Kubernetes Service
- AWS eksctl: CLI for Amazon EKS
- AWS CLI: CLI for AWS
- CloudFormation: AWS Infrastructure as Code tool
- kubectl: a CLI tool to control Kubernetes clusters
- Docker Hub: docker image repository service
The project uses:
-
circleci/docker orb to
build
andpublish
images.- DOCKER_LOGIN
- DOCKER_PASSWORD
-
circleci/aws-cli to deploy AWS stacks.
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION
-
a kvdb bucket
- Makefile: the main file to execute install and linting steps
- config.yml: run CI and CD
- index.js: the Nodejs application
- Dockerfile: the Docker image's specification file