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
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 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 |
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.
[TBD]
[TBD]
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:
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.
Follow this GitHub project of mine to see how I setup & configure Jenkins for this particular project.