Skip to content

Bookinfo sample application

The Bookinfo sample application is a canonical demonstration application within the Istio ecosystem used to illustrate Service mesh concepts.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__platform__kube__README.md] It is designed to be compatible with any version of Istio, meaning its internal versioning is independent of the Istio release version.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]

Application Architecture

The application simulates an online bookstore and is composed of multiple microservices.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md] When deployed to Kubernetes, these services run as distinct pods, including:

  • productpage-v1: The main UI.
  • details-v1: Book details.
  • ratings-v1: Rating information.
  • reviews-v1, v2, v3: Multiple versions of the review service.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]

In a standard Kubernetes Deployment, the application is accessed via a specific URL and port that routes to the productpage service, for example, http://192.168.39.116:31395/productpage.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]

Build and Deployment

The application is deployed using Kubernetes manifests located in samples/bookinfo/platform/kube/bookinfo.yaml.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]

Building Images

Docker images for the microservices can be built using the src/build-services.sh script, requiring a <version> tag and a registry <prefix>.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]

Pushing Images

To automate the build, push, and update process, the build_push_update_images.sh script is provided.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md] This script pushes images to a Docker repository (e.g., Docker Hub) and automatically updates the image tags in the platform/kube/bookinfo*.yaml files.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]

Verification and Testing

After deployment, verification involves ensuring all pods reach the Running state.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md] Functionality can be verified in two ways:

  1. CLI: Executing a curl command from within a Pod (e.g., the ratings service) to check the productpage HTML title.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]
  2. Browser: Accessing the productpage URL to visually confirm the "Simple Bookstore App" is displayed.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]

The application is also subject to continuous integration testing via the Istio.io repository.^[400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md]

Sources

  • 400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__platform__kube__README.md
  • 400-devops__07-Monitoring-and-Observability__k8s-istio__samples__bookinfo__README.md