Skip to content

Latest commit

 

History

History
90 lines (66 loc) · 4.84 KB

README.md

File metadata and controls

90 lines (66 loc) · 4.84 KB

Udacity AWS DevOps Engineer Capstone Project

Guillermo Ampie

Project Overview

This capstone project showcases the use of several CI/CD tools and cloud services covered in the program Udacity - AWS Cloud DevOps Engineer.

Introduction

This project "operationalize" a sample python/flask demo app "hello", using CircleCI and a Kubernetes(K8S) cluster deployed in AWS EKS(Amazon Elastic Kubernetes Services):

  • In a CircleCI pipeline, we lint the project's code, build a Docker image and deploy it to a public Docker Registry: Docker Hub
  • Then in an AWS EKS cluster, we run the application
  • Later, we promote to production a new app version using a rolling update strategy

All the project's tasks are included in a Makefile, which uses several shell scripts stored in the bin directory.

Project Tasks

Using a CI/CD approach, we build a Docker image and then run it in a Kubernetes cluster.

The project includes the following main tasks:

  • Initialize the Python virtual environment: make setup
  • Install all necessary dependencies: make install
  • Test the project's code using linting: make lint
    • Lints shell scripts, Dockerfile and python code
  • Create a Dockerfile to "containerize" the hello application: Dockerfile
  • Deploy to a public Docker Registry: Docker Hub the containerized application
  • Deploy a Kubernetes cluster: make eks-create-cluster
  • Deploy the application: make k8s-deployment
  • Update the app in the cluster, using a rolling-update strategy: make rolling-update
  • Delete the cluster: make eks-delete-cluster

The CirclCI pipeline(config.yml) will execute the following steps automatically:

  • make setup
  • make install
  • make lint
  • Build and publish the container image

To verify that the app is working, write your deployment's IP into your browser using port 80, like http://localhost:80 or http://LOAD_BALANCER_IP:80 (according to your environment).

Alternatively, you can use curl: curl localhost:80 or curl LOAD_BALANCER_IP:80

CI/CD Tools and Cloud Services

CicleCI Variables

The project uses circleci/docker orb, so to be able to build and publish your images, you need to set up the following environment variables in your CircleCI project with your DockerHub account's values:

  • DOCKER_LOGIN
  • DOCKER_PASSWORD

Main Files

  • Makefile: the main file to execute all the project steps, i.e., the project's command center!
  • config.yml: to test and integrate the app under CircleCI
  • hello.app: the sample python/flask app
  • Dockerfile: the Docker image's specification file
  • hello_cluster.yml: EKS cluster definition file

The following shell scripts are invoked from the Makefile