Giter Site home page Giter Site logo

nareshagrawal / online-book-store Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 221 KB

Online Book store deployed on AWS-EC2 via CircleCI CI/CD

License: MIT License

Java 74.09% HCL 25.10% Shell 0.64% CSS 0.17%
aws-ec2 lambda circle-ci terraform autoscaling ami cd-pipeline aws

online-book-store's Introduction

Cloud-Computing

Objective

Deploying a web application on AWS-EC2

Tools and Technologies

Category AWS Services & Technologies
Web Application Java, MySQL, Hibernate ORM,Shell Scripts, AWS-SDK
Infrastructure VPC, ELB, RDS, Lambda, DynamoDB, Route53, Terraform
Metrics & Logging Service statsD, AWS Cloud-Watch, Log4js, Cloud-Watch Alarm
Lambda & Notification Mechanism Lambda,SNS, SES
CI/CD Pipeline Circle CI, AWS Code Deploy, Packer
Security SSL/TLS , RDS Encryption

Architecture Design

Infrastructure - Terraform

  • created custom VPC with network setup using Terraform Script
  • Attached Load balancers, auto scaling groups, SES and SNS services
  • Created necessary service roles and policies for AWS resources
  • Implemented Lambda function for emailing service

AMI - Hashicorp Packer ( CI/CD Pipeline )

  • Automated AMI creation using Hashicorp packer
  • Created AMI template to share the image between multiple AWS accounts
  • Created golden images by adding provisioners to boostrap instances with - JDK, Code deploy and Cloud watch agent

AWS Code Deployment (CI/CD Pipeline )

  • Integrated Github repository with Circle-CI for continuous Integration
  • Bootstrapped circle CI container with docker image to run the test cases and generate new code artifact
  • Artifact is copied to S3 bucket and code deployement is triggered on running instances of autoscaling group
  • In-Place deployment configuration hooks are placed for routing the traffic during deployment

Logging & Alerting - Cloud Watch Services

  • Embedded statD to collect various metrics such as counter for APIs hits and API response time etc
  • Logged the info, errors and warnings using log4js and further mounted them in AWS cloud-watch for analysis
  • Implemented CPU Utilization based alarms for changing number of instances in auto scaling group

Faas (Serverless Computing) - Lambda

  • Implemented pub/sub mechanism with SNS and Lambda function
  • when user requesting for password reset, message is published on SNS Topic
  • Once message is published to SNS Topic, subscribed lambda function is trigged
  • Lambda delivers password reset link email to requesting user and saves the entry in Dynamo DB with TTL of 15 minutes

Webapp -Online Book Store

API Impementation with Spring Boot and Hibernate ORM Programming language : Java

External Libraries used:

  1. UUID - for generating tokens
  2. Bcrypt - for hashing out the passwords
  3. basic-auth - Authentication module
  4. Hibernate - ORM for Java
  5. mysql - dialect for hibernate
  6. mockito - for integration testing in java

Build & Deployment

  • The application runs on AWS Cloud EC2 instance and is deployed via CircleCI pipe-line
  • As soon as there is a merge take place to the webapp repository, the build gets triggered and deployment takes place in AWS account

Load Testing

  • Load testing is done by JMeter, download JMeter from offical website and run the jmx script
  • Script is available in webapp folder

online-book-store's People

Contributors

nareshagrawal avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.