Skip to content

harshaghanta/springboot-eshopOnContainers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Springboot Microservices Sample Reference Application

Sample spring boot applicaton, powered by spring boot framework, based on a simplified microservices architecture and Docker containers.

If you’re using this demo, please ★Star this repository to show your interest!

SPA Application (Angular)

Build Status (GitHub Actions)

Image Status Image Status
Basket API Basket API Build Web Client (SPA) Web SPA Build
Catalog API Catalog API Build WebHooks API Webhooks API Build
Ordering API Order API Build Webhooks Client Webhooks Client Build
Payment API Payment API Build

Getting Started

Make sure you have installed and configured docker in your environment. Your hosts file should also have the following entry.

127.0.0.1	host.docker.internal

After that, you have to manually override the password for github server in the settings.xml file with "g h p _ F u A h I T L s n B F z C r R u D 4 W u s d m N 2 u Z g K e 2 z 4 t C D" after removing the spaces between them. This token will allow to download the maven packages from github. Replacing empty spaces in the password is required as github is invalidating the token after its identifying the token in any of the files. image

Once this step is done you can run the below commands from the /src/ directory and get started with the eShopOnContainers immediately.

docker-compose build
docker-compose up

You should be able to browse different components of the application by using the below URLs :

Web SPA :  http://host.docker.internal:8080
Credentials: [email protected]/Pass@word

Note: If you are running this application in macOS then use docker.for.mac.localhost as DNS name in .env file and the above URLs instead of host.docker.internal.

Basic Scenario

The basic scenario can be run locally using docker-compose, and also deployed to a local Kubernetes cluster. Refer to these Wiki pages to Get Started:

Architecture Overview

image

Observability

If you are following docker compose setup, the setup will automically provision containers for monitoring your services. All of the observability aspects like logs, traces and metrics can be directly viewed from Grafana

Grafana

You should be able to access grafana at the following link. Default credentials are admin/admin

Application logs

After navigating to grafana, select the explore option from the left menu. From the datasources dropdown, select Loki From the label filters, select the label as application and from the value label select the microservice. select the time range, and click on Run query. image

Accessing metrics

After login to grafana, select Dashboards option from the Left menu. You should see, an existing dashboard with the name JVM (Micrometer) Click on the dashboard to open it. From the dashboard options in the top, select the application and instance to get the metrics of that service.

image

DISCLAIMER

IMPORTANT: The current state of this sample application is BETA, because we are constantly evolving towards newly released technologies. Therefore, many areas could be improved and change significantly while refactoring the current code and implementing new features. Feedback with improvements and pull requests from the community will be highly appreciated and accepted.

About

A Spring boot based implementation of the project eshopOnContainers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published