Skip to content

A demonstration project showcasing a 'typical' microservice on AWS cloud platform

Notifications You must be signed in to change notification settings

colinbut/microservice-aws-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 

Repository files navigation

Microservice AWS Demo

This project showcases a platform for the "Build, Test, Deploy, Run" microservices on AWS cloud.

This is an on-going personal project of mine and is still in WIP.

Keynote:

  • AWS infrastructure/resources are provisioned using Terraform/Cloudformation
  • Packer to build immutable servers
  • Jenkins an Automation Server to automate the full 'DevOps' lifecyle by using CI/CD pipelines
  • Containerized microservices (Docker) are published to AWS ECR once built
  • Non-Containerized microservices (e.g. raw java jar executables) are published to a repository manager (Artifactory/Nexus)
  • Ansible automates the deployment of microservices to AWS cloud
  • PAAS solution example in AWS Elastic Beanstalk
  • Demonstrates creating AWS infrastructure on EC2, ECS, EKS etc... and running microservices on them

microservice-aws-demo

Table of Contents

Summary

This projects demonstrates the ability of taking a microservice (regardless of its development language platform*) and deploying it onto various different AWS compute services; namely:

  • EC2
  • Elastic Beanstalk
  • ECS
  • EKS

Deployment Platforms

Deployment Mechanism AWS Service
Bare Metal/Virtual Machines EC2
PAAS (Platform as a Service) Elastic Beanstalk
Self-Hosted Containers on Servers EC2
Containers on Servers ECS (on EC2 instances)
AWS Managed Containers Orchestration ECS Fargate
Containers Orchestration (Kubernetes) EKS

Bare Metal/Virtual Machines

microservice-ec2-non-containerized

PAAS (Platform as a Service)

microservice-aws-eb

Self-Hosted Containers on Servers (EC2 Instances)

microservice-aws-ec2-docker

This side-project above demonstrates that the microservies (in Java/NodeJS) gets built into a Docker container from a Docker image. The Docker image is then published onto a Docker Registry (here we use AWS's ECR - Elastic Container Registry).

EC2 instances are provisioned by either Terraform or AWS Cloudformation just like the Bare Metal/Virtual Machines side project above. Additionally, the EC2 instances are configured to install Docker after provisioning.

For deployment of the microservices, use Ansible to pull the Docker image from ECR and run them on the EC2 instances.

ECS (on EC2 instances)

[TBD]

ECS Fargate

[TBD]

EKS

terraform-eks

Supplementaries

Microservice AMI

Development Language Platform

Currently, only 2 programming language supported in this demonstration:

  • Java
  • NodeJS

Here are the skeleton project of a microservice in the above platforms which can be used as a template:

See:

CI/CD

Continuous Integration/Continuous Delivery.

To achieve CI/CD objectives for this example microservice-aws-demo project we use the Jenkins CI build server & its CD pipelines features to build the various microservices-aws-demo components.

Jenkins Setup

Follow this GitHub project of mine to see how I setup & configure Jenkins for this particular project.

Jenkins Build Container