Skip to content

💼 Sample application for demonstrating container platforms and related technology

License

Notifications You must be signed in to change notification settings

aws-containers/retail-store-sample-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
AWS containers

Stars License

AWS Containers Retail Sample

This is a sample application designed to illustrate various concepts related to containers on AWS. It presents a sample retail store application including a product catalog, shopping cart and checkout.

It provides:

  • A demo store-front application with themes, pages to show container and application topology information, generative AI chat bot and utility functions for experimentation and demos.
  • An optional distributed component architecture using various languages and frameworks
  • A variety of different persistence backends for the various components like MariaDB (or MySQL), DynamoDB and Redis
  • The ability to run in different container orchestration technologies like Docker Compose, Kubernetes etc.
  • Pre-built container images for both x86-64 and ARM64 CPU architectures
  • All components instrumented for Prometheus metrics and OpenTelemetry OTLP tracing
  • Support for Istio on Kubernetes
  • Load generator which exercises all of the infrastructure

See the features documentation for more information.

This project is intended for educational purposes only and not for production use

Screenshot

Application Architecture

The application has been deliberately over-engineered to generate multiple de-coupled components. These components generally have different infrastructure dependencies, and may support multiple "backends" (example: Carts service supports MongoDB or DynamoDB).

Architecture

Component Language Container Image Helm Chart Description
UI Java Link Link Store user interface
Catalog Go Link Link Product catalog API
Cart Java Link Link User shopping carts API
Orders Java Link Link User orders API
Checkout Node Link Link API to orchestrate the checkout process

Quickstart

The following sections provide quickstart instructions for various platforms.

Docker

This deployment method will run the application as a single container on your local machine using docker.

Pre-requisites:

  • Docker installed locally

Run the container:

docker run -it --rm -p 8888:8080 public.ecr.aws/aws-containers/retail-store-sample-ui:1.0.0

Open the frontend in a browser window:

http://localhost:8888

To stop the container in docker use Ctrl+C.

Docker Compose

This deployment method will run the application on your local machine using docker-compose.

Pre-requisites:

  • Docker installed locally

Download the latest Docker Compose file and use docker compose to run the application containers:

curl https://github.com/aws-containers/retail-store-sample-app/releases/latest/download/docker-compose.yaml
DB_PASSWORD='<some password>' docker compose --file docker-compose.yaml up

Open the frontend in a browser window:

http://localhost:8888

To stop the containers in docker compose use Ctrl+C. To delete all the containers and related resources run:

docker compose -f docker-compose.yaml down

Kubernetes

This deployment method will run the application in an existing Kubernetes cluster.

Pre-requisites:

  • Kubernetes cluster
  • kubectl installed locally

Use kubectl to run the application:

kubectl apply -f https://github.com/aws-containers/retail-store-sample-app/releases/latest/download/kubernetes.yaml
kubectl wait --for=condition=available deployments --all

Get the URL for the frontend load balancer like so:

kubectl get svc ui

To remove the application use kubectl again:

kubectl delete -f https://github.com/aws-containers/retail-store-sample-app/releases/latest/download/kubernetes.yaml

Terraform

The following options are available to deploy the application using Terraform:

Name Description
Amazon EKS Deploys the application to Amazon EKS using other AWS services for dependencies, such as RDS, DynamoDB etc.
Amazon EKS (Minimal) Deploys the application to Amazon EKS using in-cluster dependencies instead of RDS, DynamoDB etc.
Amazon ECS Deploys the application to Amazon ECS using other AWS services for dependencies, such as RDS, DynamoDB etc.
AWS App Runner Deploys the application to AWS App Runner using other AWS services for dependencies, such as RDS, DynamoDB etc.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the MIT-0 License.

This package depends on and may incorporate or retrieve a number of third-party software packages (such as open source packages) at install-time or build-time or run-time ("External Dependencies"). The External Dependencies are subject to license terms that you must accept in order to use this package. If you do not accept all of the applicable license terms, you should not use this package. We recommend that you consult your company’s open source approval policy before proceeding.

Provided below is a list of External Dependencies and the applicable license identification as indicated by the documentation associated with the External Dependencies as of Amazon's most recent review.

THIS INFORMATION IS PROVIDED FOR CONVENIENCE ONLY. AMAZON DOES NOT PROMISE THAT THE LIST OR THE APPLICABLE TERMS AND CONDITIONS ARE COMPLETE, ACCURATE, OR UP-TO-DATE, AND AMAZON WILL HAVE NO LIABILITY FOR ANY INACCURACIES. YOU SHOULD CONSULT THE DOWNLOAD SITES FOR THE EXTERNAL DEPENDENCIES FOR THE MOST COMPLETE AND UP-TO-DATE LICENSING INFORMATION.

YOUR USE OF THE EXTERNAL DEPENDENCIES IS AT YOUR SOLE RISK. IN NO EVENT WILL AMAZON BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL, INCIDENTAL, OR PUNITIVE DAMAGES (INCLUDING FOR ANY LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, OR COMPUTER FAILURE OR MALFUNCTION) ARISING FROM OR RELATING TO THE EXTERNAL DEPENDENCIES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, EVEN IF AMAZON HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS AND DISCLAIMERS APPLY EXCEPT TO THE EXTENT PROHIBITED BY APPLICABLE LAW.

MariaDB Community License - LICENSE MySQL Community Edition - LICENSE