Online Boutique is a cloud-first microservices demo application. Online Boutique consists of an 11-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.
Google uses this application to demonstrate the use of technologies like Kubernetes, GKE, Istio, Stackdriver, and gRPC. This application works on any Kubernetes cluster, like Google Kubernetes Engine (GKE). It’s easy to deploy with little to no configuration.
Credits: Link to GitHub repository
Home Page | Checkout Screen |
---|---|
Online Boutique is composed of 11 microservices written in different languages that talk to each other over gRPC.
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 | Node.js | Charges the given credit card info (mock) with the given amount and returns 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. |
- Create Account on any Managed Kubernetes Cluster Provider (e.g. Linode, DigitalOcean, AWS, Azure, GKE, etc..). We will be using Linode as our managed kubernetes cluster provider.
- Install kubectl in your local machine
- Install helm in your local machine
- Install helmfile in your local machine
Deploying the micro-services using kubernetes manifests file into Linode Kubernetes Cluster
Steps:
-
Create a Linode Kubernetes Cluster. Wait for the cluster nodes to get ready and start running (this may take few minutes).
-
Download the *-kubeconfig.yaml file as using this file we will be connecting to the Linod Kubernetes cluster.
-
Open a terminal shell and save your kubeconfig file’s path to the
$KUBECONFIG
environment variable. In the example command, the kubeconfig file is located in theDownloads
folder, but you should alter this line with this folder’s location on your computerexport KUBECONFIG=~/Downloads/kubeconfig.yaml
-
Check if connection to the Linode Kubernetes Cluster is done or not by using:
kubectl get node
-
Create a namespace to deploy all of our resouces.
kubectl create ns online-boutique
-
Deploy the Kubernetes Manifest file using the below command
kubectl apply -f online-shop-microservices/kubernetes-manifests.yaml -n online-boutique
-
To check all deployed resources use:
kubectl get all -n online-boutique
-
To access the front-end microservice, first get the port number in which the front-end service is exposed to using:
kubectl get service -n online-boutique
The service can now be accessed using the any of the Node IP inside the cluster with the frontend service port number
Home Page | Checkout Screen |
---|---|
Deploying the micro-services using Helm Charts and Helmfile into Linode Kubernetes Cluster
Steps:
-
Steps 1-5 will be same as above.
-
Create Helm Charts and Helmfile.
-
Deploy the Helm Charts using Helmfile:
helmfile sync -f online-shop-microservices/helmfile.yaml
The log from helmfile sync command will be huge but it is good to go through it to understand what all services got deployed
The service can now be accessed using the any of the Node IP inside the cluster with the frontend service port number
Home Page | Checkout Screen |
---|---|