Real-world project from Java Web Developer Nanodegree at Udacity.
The application allows users to perform basic operations for online shopping, including creating new accounts, adding items to the cart, submitting orders and viewing their order history.
The project requires to add authorization with implementing proper security and hashing, analyze the metrics, and automate the configuration and deployment of these systems and the application.
cicd.mov
splunk.mov
- Add authorization using
Spring Security
withusername/password
andJSON Web Tokens (JWT)
combinations. - Write tests with
JUnit
andMockito
, and meet at least 80% code coverage level. - Identify the correct metrics for logging with
SLF4J
andLog4J
, in order to monitor the system. - Index and analyze the metrics with
Splunk
. - Use
Jenkins
to integrate with the version control and build aCI/CD
pipeline to deploy the application to theTomcat
server in aDocker
container residing on theAWS EC2 instance
.
There are 4 types of deployments implemented:
-
diff-ec2-freestyle:
Jenkins Freestyle Project
that deploys the application to theTomcat
in a new container residing on a differentEC2 instance
from the one whereJenkins
is running. -
diff-ec2-maven: Similar to
diff-ec2-freestyle
, but it's built with theMaven Integration Plugin
. -
same-ec2-freestyle:
Jenkins Freestyle Project
that deploys the application to theTomcat
in a new container residing on the sameEC2 instance
as the one whereJenkins
is running. -
same-ec2-maven: Similar to
same-ec2-freestyle
, but it's built with theMaven Integration Plugin
.
The project identifys the correct metrics to log, to monitor the system and index metrics to Splunk
.
The code traces the following metrics to log:
CreateUser
request successesCreateUser
request failuresUsernameNotFoundException
when login- Order requests successes
- Order requests failures
There are two dashboards created for success rate per day, per hour and per minute of any one create user and submit order.
There is one alert set up to monitor logins with invalid username. Everytime the alert is triggerd, an email will be sent to the given email address.