Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 3.54 KB

README.md

File metadata and controls

40 lines (34 loc) · 3.54 KB

CircleCI

CI / CD pipeline to deploy simple Flask microservice app to AWS EKS cluster using CircleCI

Scope

Python Flask based microservices application dockerised and published to centralised image repository (Docker Hub), deployed to an AWS EKS cluster via CircleCI pipeline using EKS rolling deployment.

Requirements

Install

  • Download or clone this project
  • Push this project to your GitHub repository
  • Create a CricleCI account and set up the project (using the pipeline already defined in the config.yml file).
  • Add the AWS credentials as environment variables. Configure AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_DEFAULT_REGION as CircleCI project or context environment variables as shown in the links provided for project or context.

Usage

  • Run the Pipeline by pushing a new commit to the Git Hub repository or trigger the pipeline manually in the project’s GUI in CircleCI
  • To access the application APIs, copy the Load Balancer URL to your browser

Pipeline steps

  • build-and-test: create a Python virtual environment then run hadolint (lint for Dockerfile) and pylint (lint for Python code).
  • static-application-security-testing: run pip-audit (vulnerability scanning the application dependencies) and bandit (vulnerability scanning the application code).
  • docker publish: dockerise the application and publish it to DockerHub.
  • deploy-infrastructure: deploy AWS infrastructure via AWS CloudFormation (EKS cluster included).
  • deploy-workload: deploy the application Docker image to the EKS cluster.
  • smoke-test: get the service endpoint URL and run a smoke test on its health check API.

Documentation