• Stars
    star
    231
  • Rank 173,434 (Top 4 %)
  • Language
    Java
  • License
    MIT No Attribution
  • Created about 2 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sample application for demonstrating container platforms and related technology

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 distributed component architecture in various languages and frameworks
  • Utilization of a variety of different persistence backends for different components like MySQL, DynamoDB and Redis
  • The ability to run in various container orchestration technologies like Docker Compose, Kubernetes etc.
  • Pre-built containers image 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

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 Description
ui workflow Java Link Aggregates API calls to the various other services and renders the HTML UI.
catalog workflow Go Link Product catalog API
cart workflow Java Link User shopping carts API
orders workflow Java Link User orders API
checkout workflow Node Link API to orchestrate the checkout process
assets workflow Nginx Link Serves static assets like images related to the product catalog

Quickstart

The following sections provide quickstart instructions for various platforms. All of these assume that you have cloned this repository locally and are using a CLI thats current directory is the root of the code repository.

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://raw.githubusercontent.com/aws-containers/retail-store-sample-app/main/dist/kubernetes/deploy.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://raw.githubusercontent.com/aws-containers/retail-store-sample-app/main/dist/kubernetes/deploy.yaml

Docker Compose

This deployment method will run the application on your local machine using docker-compose, and will build the containers as part of the deployment.

Pre-requisites:

  • Docker installed locally

Change directory to the Docker Compose deploy directory:

cd dist/docker-compose

Use docker compose to run the application containers:

MYSQL_PASSWORD='<some password>' docker compose up -f dist/docker-compose/docker-compose.yml

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 dist/docker-compose/docker-compose.yml down

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.

MySQL Community Edition - LICENSE

More Repositories

1

amazon-ecs-exec-checker

๐Ÿš€ Pre-flight checks for ECS Exec
Shell
864
star
2

kubectl-detector-for-docker-socket

A Kubectl plugin that can detect if any of your workloads or manifest files are mounting the docker.sock volume
Go
175
star
3

hello-app-runner

Example application for AWS App Runner
HTML
108
star
4

eks-app-mesh-polyglot-demo

End to end deployment and observability of polyglot microservices in Amazon EKS using AWS App Mesh, AWS Fargate, Amazon Cloudwatch Container Insights, and AWS X-Ray
Python
66
star
5

ecs-anywhere-tutorial

Shell
62
star
6

Airflow-on-Fargate

TypeScript
59
star
7

proton-codebuild-provisioning-examples

This repository contains sample IaC templates to demonstrate how to leverage Codebuild provisioning with AWS Proton.
HCL
26
star
8

ecsdemo-platform

Python
24
star
9

ecs-workshop-blue-green-deployments

TypeScript
22
star
10

ecsdemo-nodejs

Python
21
star
11

ecs-task-protection-examples

JavaScript
17
star
12

ecsdemo-crystal

Python
16
star
13

demo-app-for-docker-compose

Python
16
star
14

hello-app-runner-nodejs

Example Next.js application for App Runner with DynamoDB using Copilot CLI
JavaScript
13
star
15

votingapp

Python
12
star
16

appmeshworkshop

CSS
10
star
17

amazon-ecr-public-creds-helper-script-for-k8s

Amazon ECR "Public" credentials helper script for Kubernetes
Shell
9
star
18

aws-lambda-for-the-containers-developer-blog

Shell
9
star
19

apprunnerworkshop

CSS
8
star
20

codepipeline-codebuild-buildpacks-example

5
star
21

ecsdemo-migration-to-ecs

Python
5
star
22

ecsworkshop-efsdemo

Python
3
star
23

hello-eks-anywhere

Example application to deploy to your first EKS Anywhere cluster
Shell
3
star
24

eks-microservice-demo

Canary Deployment using Flagger with App Mesh
JavaScript
3
star
25

stateful-counter

An example stateful application that counts
HTML
3
star
26

ecsworkshop-secrets-demo

JavaScript
2
star
27

impression-counter-api-app-runner-sample

AWS App Runner sample for an API Impression counter with VPC access using VPC Connector, can be deployed with terraform plan
HCL
2
star
28

aws-containers-a2z

Onboard on a long journey into modern application development with AWS Containers Services and more...
JavaScript
1
star
29

ecsdemo-capacityproviders

Python
1
star