Skip to content

DataDog/tsre-microservices

 
 

Repository files navigation

Swagstore

TSKO 2024 - DPN - Fun time with Swagstore

Welcome to TSKO 2024 - Datadog Partner Network Challenge !! Your goal will be to capture all the flags related to a micro-service architected application called Swagstore using Datadog.

The app consists of an 12-tier microservices application. The application is a web-based e-commerce app where users can browse items, add them to the cart, and purchase them. It is a fictitious e-commerce swag store, don't expect to receive swags 😀

Screenshots

Home Page Checkout Screen
Screenshot of store homepage Screenshot of checkout screen

Architecture

The application is running on a single node kubernetes cluster using minikube

Architecture of microservices

Service Language Description
frontend Go Exposes an HTTP server to serve the website. Does not require signup/login and generates session IDs for all users automatically.
cartservice C# Stores the items in the user's shopping cart in Redis and retrieves it.
productcatalogservice Go Provides the list of products from a JSON file and ability to search products and get individual products.
currencyservice Node.js Converts one money amount to another currency. Uses real values fetched from European Central Bank. It's the highest QPS service.
paymentservice Java Charges the given credit card info (mock) with the given amount and returns a transaction ID.
paymentdbservice MariaDB Store all charges and payment information according to a transaction ID.
shippingservice Go Gives shipping cost estimates based on the shopping cart. Ships items to the given address (mock)
emailservice Python Sends users an order confirmation email (mock).
checkoutservice Go Retrieves user cart, prepares order and orchestrates the payment, shipping and the email notification.
recommendationservice Python Recommends other products based on what's given in the cart.
adservice Java Provides text ads based on given context words.
loadgenerator Python/Locust Continuously sends requests imitating realistic user shopping flows to the frontend.

How to ?

The datadog cluster agent configuration is in ctf/datadog-values.yaml. All configuration yaml file for each services are in kubernetes-manifests directory.

The only script you should need is update.sh to reload all configurations.

Useful command

Get all pods running

kubectl get pods

Get all services running

kubectl get svc

Check the status of datadog-agent (Technically you can run any agent command from there including agent configcheck for example)

kubectl exec $AGENT_POD -- agent status

If the control plane goes down you can restart it with

minikube start

Points scoring

Points

  • OnBoarding - 15 points
  • C-Level Request - 80 points
  • Support Tickets - 140 points
  • Total - 235 points

Misc

Swagstore is a heavily modified version from the original Online Boutique. In fact, items on the Swagstore are actually Datadog swags.

About

TSRE - Swagstore Shop application with 12 microservices

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 26.5%
  • Go 24.5%
  • Shell 11.1%
  • Java 9.7%
  • Dockerfile 8.1%
  • HTML 8.0%
  • Other 12.1%